Frame 2
MochiAd.showPreGameAd({id:"5225294dfd0829db", res:"800x600"});
Frame 3
function setLastLevel(i) {
if (saveFile.data.lastLevel < i) {
saveFile.data.lastLevel = i;
saveFile.flush();
if (i > 1) {
gotoAndStop ("continue");
} else {
gotoAndStop ("main");
}
}
}
var lastLevel;
saveFile = SharedObject.getLocal("saveFile");
if (saveFile.data.lastLevel == undefined) {
lastLevel = 1;
gotoAndStop ("main");
} else {
lastLevel = saveFile.data.lastLevel;
gotoAndStop ("continue");
}
Frame 4
var theSuperDirector;
saveFile.data.lastLevel = 1;
saveFile.flush();
stop();
Frame 5
var theSuperDirector;
levelStepper.maximum = lastLevel;
levelStepper.value = lastLevel;
stop();
Instance of Symbol 1614 MovieClip [NumericStepper] "levelStepper" in Frame 5
//component parameters
onClipEvent (construct) {
maximum = 8;
minimum = 1;
stepSize = 1;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 6
stop();
Frame 7
var currentLevel = -3;
Symbol 44 MovieClip [button1_mc] Frame 1
function answer() {
answered = true;
}
function noResponse() {
if (!answered) {
getURL ("http://jayisgames.com/cgdc5/?ref=8fefdbfa");
}
}
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.addCallback("answer", this, answer);
}
var answered = false;
button_mc.onRelease = function () {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("close");
}
setTimeout(noResponse, 500);
};
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("8fefdbfa", this, 10301, true);
Symbol 47 MovieClip [mc_unit_tank] Frame 1
#initclip 177
Object.registerClass("mc_unit_tank", Tank);
#endinitclip
Symbol 50 MovieClip [mc_unit_humVee] Frame 1
#initclip 113
Object.registerClass("mc_unit_humVee", HumVee);
#endinitclip
Symbol 60 MovieClip Frame 19
stop();
Symbol 61 MovieClip [mc_goop] Frame 28
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 181 MovieClip Frame 21
_parent._parent.onAttackHit();
Symbol 182 MovieClip [mc_icon_edderkopp_down] Frame 1
#initclip 114
Object.registerClass("mc_icon_edderkopp_down", EnemyIcon);
#endinitclip
stop();
Symbol 182 MovieClip [mc_icon_edderkopp_down] Frame 2
stop();
Symbol 182 MovieClip [mc_icon_edderkopp_down] Frame 3
stop();
Symbol 182 MovieClip [mc_icon_edderkopp_down] Frame 4
gotoAndStop ("default");
Symbol 261 MovieClip Frame 21
_parent._parent.onAttackHit();
Symbol 262 MovieClip [mc_icon_edderkopp_up] Frame 1
#initclip 115
Object.registerClass("mc_icon_edderkopp_up", EnemyIcon);
#endinitclip
stop();
Symbol 262 MovieClip [mc_icon_edderkopp_up] Frame 2
stop();
Symbol 262 MovieClip [mc_icon_edderkopp_up] Frame 3
stop();
Symbol 262 MovieClip [mc_icon_edderkopp_up] Frame 4
gotoAndStop ("default");
Symbol 391 MovieClip Frame 20
_parent._parent.onAttackHit();
Symbol 392 MovieClip [mc_icon_edderkopp] Frame 1
#initclip 116
Object.registerClass("mc_icon_edderkopp", EnemyIcon);
#endinitclip
Symbol 392 MovieClip [mc_icon_edderkopp] Frame 20
stop();
Symbol 392 MovieClip [mc_icon_edderkopp] Frame 21
stop();
Symbol 392 MovieClip [mc_icon_edderkopp] Frame 22
stop();
Symbol 392 MovieClip [mc_icon_edderkopp] Frame 23
gotoAndStop ("default");
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 51
stop();
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 34
onUpgradedFinish();
Symbol 416 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 16
stop();
Symbol 420 MovieClip [mc_miniHpBar] Frame 1
#initclip 117
Object.registerClass("mc_miniHpBar", HpBar);
#endinitclip
Symbol 421 MovieClip [mc_enemy_edderkopp] Frame 1
#initclip 118
Object.registerClass("mc_enemy_edderkopp", Edderkopp);
#endinitclip
stop();
Symbol 421 MovieClip [mc_enemy_edderkopp] Frame 2
stop();
Symbol 421 MovieClip [mc_enemy_edderkopp] Frame 3
stop();
Symbol 421 MovieClip [mc_enemy_edderkopp] Frame 4
stop();
Symbol 421 MovieClip [mc_enemy_edderkopp] Frame 5
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 2
stop();
Symbol 436 MovieClip Frame 3
stop();
Symbol 436 MovieClip Frame 4
stop();
Symbol 436 MovieClip Frame 5
stop();
Symbol 447 MovieClip Frame 2
stop();
Symbol 447 MovieClip Frame 12
stop();
Symbol 447 MovieClip Frame 22
stop();
Symbol 447 MovieClip Frame 32
stop();
Symbol 447 MovieClip Frame 33
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 15
stop();
Symbol 450 MovieClip Frame 29
stop();
Symbol 450 MovieClip Frame 43
stop();
Symbol 450 MovieClip Frame 44
stop();
Symbol 450 MovieClip Frame 45
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 11
stop();
Symbol 452 MovieClip Frame 21
stop();
Symbol 452 MovieClip Frame 31
stop();
Symbol 452 MovieClip Frame 32
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 2
stop();
Symbol 455 MovieClip Frame 2
stop();
Symbol 455 MovieClip Frame 13
stop();
Symbol 455 MovieClip Frame 23
stop();
Symbol 455 MovieClip Frame 34
stop();
Symbol 455 MovieClip Frame 35
stop();
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 2
stop();
Symbol 465 MovieClip Frame 3
stop();
Symbol 465 MovieClip Frame 4
stop();
Symbol 465 MovieClip Frame 5
stop();
Symbol 465 MovieClip Frame 6
stop();
Symbol 465 MovieClip Frame 7
stop();
Symbol 465 MovieClip Frame 8
stop();
Symbol 465 MovieClip Frame 9
stop();
Symbol 465 MovieClip Frame 10
stop();
Symbol 465 MovieClip Frame 11
stop();
Symbol 465 MovieClip Frame 12
stop();
Symbol 466 MovieClip [mc_unit_engineer] Frame 1
#initclip 119
Object.registerClass("mc_unit_engineer", Engineer);
#endinitclip
stop();
Symbol 466 MovieClip [mc_unit_engineer] Frame 2
stop();
Symbol 466 MovieClip [mc_unit_engineer] Frame 3
stop();
Symbol 466 MovieClip [mc_unit_engineer] Frame 4
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 2
stop();
Symbol 467 MovieClip Frame 3
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 480 MovieClip [mc_unit_garbageTruck] Frame 1
#initclip 120
Object.registerClass("mc_unit_garbageTruck", GarbageTruck);
#endinitclip
stop();
Symbol 480 MovieClip [mc_unit_garbageTruck] Frame 2
stop();
Symbol 480 MovieClip [mc_unit_garbageTruck] Frame 3
stop();
Symbol 480 MovieClip [mc_unit_garbageTruck] Frame 4
stop();
Symbol 493 Button
on (release) {
master.gotoMenu();
}
Symbol 496 Button
on (release) {
master.gotoHelp();
}
Symbol 507 Button
on (release) {
pressButton("bFarm");
}
on (rollOver) {
showBldgButton("Farm");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 510 Button
on (release) {
pressButton("b_PowerPlant");
}
on (rollOver) {
showBldgButton("_PowerPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 516 Button
on (release) {
pressButton("bMine");
}
on (rollOver) {
showBldgButton("Mine");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 522 Button
on (release) {
pressButton("bOilGasWell");
}
on (rollOver) {
showBldgButton("OilGasWell");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 529 Button
on (release) {
pressButton("bFactory");
}
on (rollOver) {
showBldgButton("Factory");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 533 Button
on (release) {
pressButton("bLab");
}
on (rollOver) {
showBldgButton("Lab");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 540 Button
on (release) {
pressButton("b_Defense");
}
on (rollOver) {
showBldgButton("Defense");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 544 Button
on (release) {
_parent.actionButton("demolish");
}
Symbol 545 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 2
stop();
Symbol 549 Button
on (release) {
pressButton("bLandfill");
}
on (rollOver) {
showBldgButton("Landfill");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 554 Button
on (release) {
pressButton("bNuclearDump");
}
on (rollOver) {
showBldgButton("NuclearDump");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 559 MovieClip [mc_cost] Frame 1
#initclip 121
Object.registerClass("mc_cost", CostDisplay);
#endinitclip
Instance of Symbol 465 MovieClip "resource2" in Symbol 559 MovieClip [mc_cost] Frame 1
onClipEvent (load) {
this.gotoAndStop("metal");
}
Symbol 728 MovieClip [mc_fly] Frame 1
#initclip 122
Object.registerClass("mc_fly", Fly);
#endinitclip
Symbol 734 MovieClip [mc_garbage] Frame 1
#initclip 123
Object.registerClass("mc_garbage", Garbage);
#endinitclip
stop();
Symbol 734 MovieClip [mc_garbage] Frame 2
stop();
Symbol 734 MovieClip [mc_garbage] Frame 3
stop();
Symbol 734 MovieClip [mc_garbage] Frame 4
stop();
Symbol 734 MovieClip [mc_garbage] Frame 5
stop();
Symbol 734 MovieClip [mc_garbage] Frame 6
stop();
Symbol 734 MovieClip [mc_garbage] Frame 7
stop();
Symbol 734 MovieClip [mc_garbage] Frame 8
stop();
Symbol 741 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 2
stop();
Symbol 741 MovieClip Frame 3
stop();
Symbol 741 MovieClip Frame 4
stop();
Symbol 741 MovieClip Frame 5
stop();
Symbol 741 MovieClip Frame 6
stop();
Symbol 741 MovieClip Frame 7
stop();
Symbol 741 MovieClip Frame 8
stop();
Symbol 741 MovieClip Frame 9
stop();
Symbol 741 MovieClip Frame 10
stop();
Symbol 741 MovieClip Frame 11
stop();
Symbol 741 MovieClip Frame 12
stop();
Symbol 741 MovieClip Frame 13
stop();
Symbol 741 MovieClip Frame 14
stop();
Symbol 741 MovieClip Frame 15
stop();
Symbol 741 MovieClip Frame 16
stop();
Symbol 741 MovieClip Frame 17
stop();
Symbol 741 MovieClip Frame 18
stop();
Instance of Symbol 513 MovieClip "g" in Symbol 741 MovieClip Frame 18
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 19
stop();
Instance of Symbol 520 MovieClip "g" in Symbol 741 MovieClip Frame 19
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 20
stop();
Symbol 741 MovieClip Frame 21
stop();
Symbol 741 MovieClip Frame 22
stop();
Symbol 741 MovieClip Frame 23
stop();
Symbol 741 MovieClip Frame 24
stop();
Symbol 741 MovieClip Frame 25
stop();
Symbol 741 MovieClip Frame 26
stop();
Symbol 741 MovieClip Frame 27
stop();
Symbol 741 MovieClip Frame 28
stop();
Symbol 741 MovieClip Frame 29
stop();
Symbol 741 MovieClip Frame 30
stop();
Symbol 741 MovieClip Frame 31
stop();
Symbol 741 MovieClip Frame 32
stop();
Symbol 741 MovieClip Frame 33
stop();
Symbol 741 MovieClip Frame 34
stop();
Symbol 741 MovieClip Frame 35
stop();
Symbol 741 MovieClip Frame 36
stop();
Symbol 741 MovieClip Frame 37
stop();
Symbol 741 MovieClip Frame 38
stop();
Symbol 741 MovieClip Frame 39
stop();
Symbol 741 MovieClip Frame 40
stop();
Symbol 741 MovieClip Frame 41
stop();
Symbol 741 MovieClip Frame 42
stop();
Symbol 741 MovieClip Frame 43
stop();
Symbol 741 MovieClip Frame 44
stop();
Symbol 741 MovieClip Frame 45
stop();
Symbol 741 MovieClip Frame 46
stop();
Symbol 741 MovieClip Frame 47
stop();
Symbol 741 MovieClip Frame 48
stop();
Symbol 741 MovieClip Frame 49
stop();
Symbol 741 MovieClip Frame 50
stop();
Symbol 741 MovieClip Frame 51
stop();
Symbol 741 MovieClip Frame 52
stop();
Symbol 741 MovieClip Frame 53
stop();
Symbol 741 MovieClip Frame 54
stop();
Symbol 741 MovieClip Frame 55
stop();
Symbol 741 MovieClip Frame 56
stop();
Symbol 741 MovieClip Frame 57
stop();
Symbol 741 MovieClip Frame 58
stop();
Symbol 741 MovieClip Frame 59
stop();
Symbol 741 MovieClip Frame 60
stop();
Symbol 741 MovieClip Frame 61
stop();
Symbol 741 MovieClip Frame 62
stop();
Symbol 741 MovieClip Frame 63
stop();
Symbol 741 MovieClip Frame 64
stop();
Symbol 741 MovieClip Frame 65
stop();
Symbol 741 MovieClip Frame 66
stop();
Symbol 741 MovieClip Frame 67
stop();
Symbol 741 MovieClip Frame 68
stop();
Symbol 741 MovieClip Frame 69
stop();
Symbol 741 MovieClip Frame 70
stop();
Symbol 741 MovieClip Frame 71
stop();
Symbol 741 MovieClip Frame 72
stop();
Symbol 741 MovieClip Frame 73
stop();
g.deactivateMe("lots");
Symbol 741 MovieClip Frame 74
stop();
g.deactivateMe("some");
Instance of Symbol 734 MovieClip [mc_garbage] "g" in Symbol 741 MovieClip Frame 74
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("some");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 75
stop();
g.deactivateMe("little");
Instance of Symbol 734 MovieClip [mc_garbage] "g" in Symbol 741 MovieClip Frame 75
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 76
stop();
Instance of Symbol 513 MovieClip "g" in Symbol 741 MovieClip Frame 76
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 77
stop();
Instance of Symbol 520 MovieClip "g" in Symbol 741 MovieClip Frame 77
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 78
stop();
Instance of Symbol 464 MovieClip "g" in Symbol 741 MovieClip Frame 78
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("rubble");
}
this.addEventListener("load", __f_load);
}
Symbol 741 MovieClip Frame 79
stop();
Symbol 741 MovieClip Frame 80
stop();
Symbol 741 MovieClip Frame 81
stop();
Symbol 741 MovieClip Frame 82
stop();
Symbol 741 MovieClip Frame 83
stop();
Symbol 741 MovieClip Frame 84
stop();
Symbol 741 MovieClip Frame 85
stop();
Symbol 741 MovieClip Frame 86
stop();
Symbol 741 MovieClip Frame 87
stop();
Symbol 741 MovieClip Frame 88
stop();
Symbol 741 MovieClip Frame 89
stop();
Symbol 741 MovieClip Frame 90
stop();
Symbol 741 MovieClip Frame 91
stop();
Symbol 741 MovieClip Frame 92
stop();
Symbol 741 MovieClip Frame 93
stop();
Symbol 741 MovieClip Frame 94
stop();
Symbol 742 Button
on (release) {
_parent.master.showCurrObjective();
}
Symbol 745 MovieClip [mc_objective] Frame 1
#initclip 124
Object.registerClass("mc_objective", Objective);
#endinitclip
Symbol 750 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 227
stop();
Symbol 753 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 28
gotoAndStop ("default");
Symbol 753 MovieClip Frame 29
stop();
Symbol 753 MovieClip Frame 30
stop();
Symbol 753 MovieClip Frame 31
stop();
Symbol 761 Button
on (release) {
goBackButton();
}
Symbol 763 Button
on (release) {
buildButton("scout");
}
Symbol 765 Button
on (release) {
buildButton("humVee");
}
Symbol 767 Button
on (release) {
buildButton("engineer");
}
Symbol 769 Button
on (release) {
buildButton("tank");
}
Symbol 772 Button
on (release) {
pressButton("uFuel");
}
Symbol 773 Button
on (release) {
pressButton("uPowerPlants");
}
Symbol 774 Button
on (release) {
pressButton("uDefense");
}
Symbol 778 Button
on (release) {
pressButton("uRecycling");
}
Symbol 779 Button
on (release) {
pressButton("uBuildings");
}
Symbol 780 Button
on (release) {
pressButton("uUnits");
}
Symbol 785 Button
on (release) {
pressButton("uFFPlant");
}
on (rollOver) {
showBldgButton("FFPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 788 Button
on (release) {
pressButton("uGasPlant");
}
Symbol 794 Button
on (release) {
pressButton("uWindPlant");
}
Symbol 796 Button
on (release) {
pressButton("uSolarPlant");
}
Symbol 799 Button
on (release) {
pressButton("uGeoPlant");
}
Symbol 801 Button
on (release) {
pressButton("uNuclearPlant");
}
Symbol 804 Button
on (release) {
upgradeButton("fuel", "gasoline", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "gasoline", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 806 MovieClip [mc_levelStatus] Frame 1
#initclip 125
Object.registerClass("mc_levelStatus", LevelStatus);
#endinitclip
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 2
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 3
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 4
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 5
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 6
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 7
stop();
Symbol 806 MovieClip [mc_levelStatus] Frame 8
stop();
Symbol 807 Button
on (release) {
upgradeButton("fuel", "electric", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "electric", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 808 Button
on (release) {
upgradeButton("fuel", "ethanol", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "ethanol", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 810 Button
on (release) {
upgradeButton("fuel", "natGas", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "natGas", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 814 Button
on (release) {
upgradeButton("ffplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("ffplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 816 Button
on (release) {
upgradeButton("gasplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("gasplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 818 Button
on (release) {
upgradeButton("hydroplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("hydroplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 820 Button
on (release) {
upgradeButton("windplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("windplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 822 Button
on (release) {
upgradeButton("geoplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("geoplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 824 Button
on (release) {
upgradeButton("solarplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("solarplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 826 Button
on (release) {
upgradeButton("nuclearplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("nuclearplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 831 Button
on (release) {
pressButton("uFloodLights");
}
Symbol 834 Button
on (release) {
pressButton("uGunTurret");
}
Symbol 837 Button
on (release) {
pressButton("uLaserTurret");
}
Symbol 839 Button
on (release) {
pressButton("uFlameTurret");
}
Symbol 857 Button
on (release) {
pressButton("rPETE");
}
Symbol 859 Button
on (release) {
pressButton("rMetal");
}
Symbol 861 Button
on (release) {
pressButton("rGas");
}
Symbol 863 Button
on (release) {
pressButton("rBiodiesel");
}
Symbol 872 Button
on (release) {
pressButton("bFFPlant");
}
on (rollOver) {
showBldgButton("FFPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 873 Button
on (release) {
pressButton("bGasPlant");
}
on (rollOver) {
showBldgButton("GasPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 874 Button
on (release) {
pressButton("bWindPlant");
}
on (rollOver) {
showBldgButton("WindPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 875 Button
on (release) {
pressButton("bSolarPlant");
}
on (rollOver) {
showBldgButton("SolarPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 876 Button
on (release) {
pressButton("bGeoPlant");
}
on (rollOver) {
showBldgButton("GeoPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 877 Button
on (release) {
pressButton("bNuclearPlant");
}
on (rollOver) {
showBldgButton("NuclearPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 878 Button
on (release) {
pressButton("bFloodLights");
}
on (rollOver) {
showBldgButton("FloodLights");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 879 Button
on (release) {
pressButton("bGunTurret");
}
on (rollOver) {
showBldgButton("GunTurret");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 880 Button
on (release) {
pressButton("bTeslaCoil");
}
on (rollOver) {
showBldgButton("TeslaCoil");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 881 Button
on (release) {
pressButton("bFlameTurret");
}
on (rollOver) {
showBldgButton("FlameTurret");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 896 MovieClip Frame 1
stop();
Symbol 896 MovieClip Frame 2
stop();
Symbol 896 MovieClip Frame 3
stop();
Symbol 896 MovieClip Frame 4
stop();
Symbol 896 MovieClip Frame 5
stop();
Symbol 896 MovieClip Frame 6
stop();
Symbol 896 MovieClip Frame 7
stop();
Symbol 896 MovieClip Frame 8
stop();
Symbol 896 MovieClip Frame 9
stop();
Symbol 896 MovieClip Frame 10
stop();
Symbol 902 MovieClip [mc_usageLine] Frame 1
#initclip 126
Object.registerClass("mc_usageLine", UsageLine);
#endinitclip
stop();
Symbol 902 MovieClip [mc_usageLine] Frame 2
stop();
Symbol 902 MovieClip [mc_usageLine] Frame 3
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 1
#initclip 127
Object.registerClass("mc_usage_key", UsageMeter);
#endinitclip
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 2
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 3
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 4
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 5
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 6
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 7
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 8
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 9
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 10
stop();
Symbol 904 MovieClip [mc_usage_key] Frame 11
stop();
Symbol 912 Button
on (release) {
directorUnClickBuildings();
}
Symbol 918 MovieClip [mc_hpbar] Frame 1
#initclip 128
Object.registerClass("mc_hpbar", HpBar);
#endinitclip
Symbol 945 MovieClip Frame 1
stop();
Symbol 945 MovieClip Frame 2
stop();
Symbol 945 MovieClip Frame 3
stop();
Symbol 945 MovieClip Frame 4
stop();
Symbol 945 MovieClip Frame 5
stop();
Symbol 945 MovieClip Frame 6
stop();
Symbol 945 MovieClip Frame 7
stop();
Symbol 950 Button
on (release) {
pressButton("uFFPlant");
}
Symbol 959 MovieClip [mc_disabletoggle] Frame 1
#initclip 129
Object.registerClass("mc_disabletoggle", ToggleButton);
#endinitclip
stop();
Symbol 959 MovieClip [mc_disabletoggle] Frame 2
stop();
Symbol 961 Button
on (release) {
repairSelected();
}
Symbol 964 Button
on (release) {
pressButton("uNuclearPlant");
}
Symbol 965 Button
on (release) {
pressButton("uWindPlant");
}
Symbol 966 Button
on (release) {
pressButton("uSolarPlant");
}
Symbol 967 Button
on (release) {
pressButton("uGeoPlant");
}
Symbol 968 Button
on (release) {
pressButton("uGasPlant");
}
Symbol 988 Button
on (release) {
buildButton("garbageTruck");
}
on (rollOver) {
showUnitButton("garbageTruck");
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 990 Button
on (release) {
buildButton("engineer");
}
on (rollOver) {
showUnitButton("engineer");
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 991 Button
on (release) {
pressButton("uFactory");
}
Symbol 997 MovieClip Frame 6
stop();
Symbol 1008 MovieClip Frame 6
stop();
Symbol 1016 Button
on (release) {
_parent.onCancelBuild();
}
Symbol 1022 MovieClip [mc_unitProduction] Frame 1
#initclip 130
Object.registerClass("mc_unitProduction", UnitProduction);
#endinitclip
stop();
Symbol 1022 MovieClip [mc_unitProduction] Frame 2
stop();
Symbol 1022 MovieClip [mc_unitProduction] Frame 3
stop();
Symbol 1022 MovieClip [mc_unitProduction] Frame 4
stop();
Symbol 1034 Button
on (release) {
setFleetFuel(K.GASOLINE, "gasoline");
}
Symbol 1035 Button
on (release) {
setFleetFuel(K.ETHANOL, "ethanol");
}
Symbol 1036 Button
on (release) {
setFleetFuel(K.ELECTRIC, "electric");
}
Symbol 1037 Button
on (release) {
setFleetFuel(K.NATGAS, "natgas");
}
Symbol 1040 MovieClip [mc_interface] Frame 1
#initclip 131
Object.registerClass("mc_interface", Interface);
#endinitclip
resourceText = "";
pollutionText = "";
nutrientText = "";
materialText = "";
stop();
Instance of Symbol 419 MovieClip "sideRegion" in Symbol 1040 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 419 MovieClip "topRegion" in Symbol 1040 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 419 MovieClip "bottomRegion" in Symbol 1040 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 559 MovieClip [mc_cost] "theCost" in Symbol 1040 MovieClip [mc_interface] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1040 MovieClip [mc_interface] Frame 2
stop();
Symbol 1040 MovieClip [mc_interface] Frame 3
stop();
Symbol 1040 MovieClip [mc_interface] Frame 4
stop();
Instance of Symbol 559 MovieClip [mc_cost] "theCost" in Symbol 1040 MovieClip [mc_interface] Frame 4
onClipEvent (load) {
_visible = false;
}
Symbol 1040 MovieClip [mc_interface] Frame 5
stop();
Symbol 1040 MovieClip [mc_interface] Frame 6
stop();
Symbol 1040 MovieClip [mc_interface] Frame 7
stop();
Symbol 1040 MovieClip [mc_interface] Frame 8
stop();
Symbol 1040 MovieClip [mc_interface] Frame 9
stop();
Symbol 1040 MovieClip [mc_interface] Frame 10
stop();
Symbol 1040 MovieClip [mc_interface] Frame 11
stop();
Symbol 1040 MovieClip [mc_interface] Frame 12
stop();
Symbol 1040 MovieClip [mc_interface] Frame 13
stop();
Symbol 1040 MovieClip [mc_interface] Frame 14
stop();
Symbol 1040 MovieClip [mc_interface] Frame 15
stop();
Symbol 1040 MovieClip [mc_interface] Frame 16
stop();
Symbol 1040 MovieClip [mc_interface] Frame 17
stop();
Symbol 1040 MovieClip [mc_interface] Frame 18
stop();
Symbol 1040 MovieClip [mc_interface] Frame 19
stop();
Symbol 1040 MovieClip [mc_interface] Frame 20
stop();
Symbol 1040 MovieClip [mc_interface] Frame 21
stop();
Symbol 1040 MovieClip [mc_interface] Frame 22
stop();
Symbol 1040 MovieClip [mc_interface] Frame 23
resourceText = "";
pollutionText = "";
nutrientText = "";
materialText = "";
stop();
Symbol 1040 MovieClip [mc_interface] Frame 24
stop();
Symbol 1040 MovieClip [mc_interface] Frame 25
stop();
Symbol 1040 MovieClip [mc_interface] Frame 26
stop();
Symbol 1040 MovieClip [mc_interface] Frame 27
stop();
Symbol 1040 MovieClip [mc_interface] Frame 28
stop();
Symbol 1040 MovieClip [mc_interface] Frame 29
stop();
Symbol 1040 MovieClip [mc_interface] Frame 30
stop();
Symbol 1040 MovieClip [mc_interface] Frame 31
stop();
Symbol 1040 MovieClip [mc_interface] Frame 32
stop();
Symbol 1040 MovieClip [mc_interface] Frame 33
stop();
Symbol 1040 MovieClip [mc_interface] Frame 34
stop();
Symbol 1040 MovieClip [mc_interface] Frame 35
stop();
Symbol 1040 MovieClip [mc_interface] Frame 36
stop();
Symbol 1040 MovieClip [mc_interface] Frame 37
stop();
Symbol 1040 MovieClip [mc_interface] Frame 38
stop();
Symbol 1040 MovieClip [mc_interface] Frame 39
stop();
Symbol 1040 MovieClip [mc_interface] Frame 40
stop();
Symbol 1040 MovieClip [mc_interface] Frame 41
stop();
Symbol 1040 MovieClip [mc_interface] Frame 42
stop();
Symbol 1040 MovieClip [mc_interface] Frame 43
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 43
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 44
stop();
Symbol 1040 MovieClip [mc_interface] Frame 45
stop();
Symbol 1040 MovieClip [mc_interface] Frame 46
stop();
Symbol 1040 MovieClip [mc_interface] Frame 47
stop();
Symbol 1040 MovieClip [mc_interface] Frame 48
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 48
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 49
stop();
Symbol 1040 MovieClip [mc_interface] Frame 50
stop();
Symbol 1040 MovieClip [mc_interface] Frame 51
stop();
Symbol 1040 MovieClip [mc_interface] Frame 52
stop();
Symbol 1040 MovieClip [mc_interface] Frame 53
stop();
Symbol 1040 MovieClip [mc_interface] Frame 54
stop();
Symbol 1040 MovieClip [mc_interface] Frame 55
stop();
Symbol 1040 MovieClip [mc_interface] Frame 56
stop();
Symbol 1040 MovieClip [mc_interface] Frame 57
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 57
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 58
stop();
Symbol 1040 MovieClip [mc_interface] Frame 59
stop();
Symbol 1040 MovieClip [mc_interface] Frame 60
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 60
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 61
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 61
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 62
stop();
Symbol 1040 MovieClip [mc_interface] Frame 63
stop();
Symbol 1040 MovieClip [mc_interface] Frame 64
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 64
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 65
stop();
Symbol 1040 MovieClip [mc_interface] Frame 66
stop();
Symbol 1040 MovieClip [mc_interface] Frame 67
stop();
Instance of Symbol 959 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1040 MovieClip [mc_interface] Frame 67
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1040 MovieClip [mc_interface] Frame 68
stop();
Symbol 1040 MovieClip [mc_interface] Frame 69
stop();
Symbol 1040 MovieClip [mc_interface] Frame 70
stop();
Symbol 1040 MovieClip [mc_interface] Frame 71
stop();
Symbol 1040 MovieClip [mc_interface] Frame 72
stop();
Symbol 1040 MovieClip [mc_interface] Frame 73
stop();
Symbol 1040 MovieClip [mc_interface] Frame 74
stop();
Symbol 1043 MovieClip [mc_superDirector] Frame 1
#initclip 132
Object.registerClass("mc_superDirector", SuperDirector);
#endinitclip
Symbol 1048 MovieClip [mc_r_FF] Frame 1
#initclip 133
Object.registerClass("mc_r_FF", ResourceAmount);
#endinitclip
stop();
Symbol 1048 MovieClip [mc_r_FF] Frame 2
stop();
Symbol 1053 MovieClip [mc_r_gas] Frame 1
#initclip 134
Object.registerClass("mc_r_gas", ResourceAmount);
#endinitclip
stop();
Symbol 1053 MovieClip [mc_r_gas] Frame 2
stop();
Symbol 1058 MovieClip [mc_r_research] Frame 1
#initclip 135
Object.registerClass("mc_r_research", ResourceAmount);
#endinitclip
stop();
Symbol 1058 MovieClip [mc_r_research] Frame 2
stop();
Symbol 1063 MovieClip [mc_r_metal] Frame 1
#initclip 136
Object.registerClass("mc_r_metal", ResourceAmount);
#endinitclip
stop();
Symbol 1063 MovieClip [mc_r_metal] Frame 2
stop();
Symbol 1067 MovieClip Frame 1
stop();
Symbol 1067 MovieClip Frame 2
stop();
Symbol 1067 MovieClip Frame 3
stop();
Symbol 1067 MovieClip Frame 4
stop();
Symbol 1067 MovieClip Frame 5
stop();
Symbol 1067 MovieClip Frame 6
stop();
Symbol 1067 MovieClip Frame 7
stop();
Symbol 1067 MovieClip Frame 8
stop();
Symbol 1067 MovieClip Frame 9
stop();
Symbol 1067 MovieClip Frame 10
stop();
Symbol 1074 MovieClip [mc_r_smog] Frame 1
#initclip 137
Object.registerClass("mc_r_smog", ResourceAmount);
#endinitclip
stop();
Symbol 1074 MovieClip [mc_r_smog] Frame 2
stop();
Symbol 1074 MovieClip [mc_r_smog] Frame 3
stop();
Symbol 1074 MovieClip [mc_r_smog] Frame 4
stop();
Symbol 1077 MovieClip Frame 1
stop();
Symbol 1077 MovieClip Frame 6
stop();
Symbol 1077 MovieClip Frame 19
stop();
gotoAndStop ("default");
Symbol 1077 MovieClip Frame 32
stop();
gotoAndStop ("default");
Symbol 1077 MovieClip Frame 45
stop();
gotoAndStop ("default");
Symbol 1085 MovieClip Frame 1
stop();
Symbol 1085 MovieClip Frame 2
stop();
Symbol 1085 MovieClip Frame 3
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 1
#initclip 138
Object.registerClass("mc_r_food", ResourceAmount);
#endinitclip
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 2
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 3
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 4
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 5
stop();
Symbol 1092 MovieClip [mc_r_food] Frame 6
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 1
#initclip 139
Object.registerClass("mc_r_energy", ResourceAmount);
#endinitclip
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 2
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 3
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 4
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 5
stop();
Symbol 1101 MovieClip [mc_r_energy] Frame 6
stop();
Symbol 1102 MovieClip [mc_terrain] Frame 1
#initclip 140
Object.registerClass("mc_terrain", Terrain);
#endinitclip
Symbol 1109 MovieClip Frame 1
stop();
Symbol 1110 MovieClip Frame 1
stop();
Symbol 1110 MovieClip Frame 61
stop();
_parent.nowItsNight();
Symbol 1110 MovieClip Frame 121
stop();
_parent.nowItsDay();
Symbol 1113 MovieClip [mc_director] Frame 1
#initclip 141
Object.registerClass("mc_director", Director);
#endinitclip
Symbol 1136 MovieClip [mc_arrow] Frame 1
#initclip 142
Object.registerClass("mc_arrow", ArrowCursor);
#endinitclip
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 2
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 3
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 4
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 5
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 6
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 7
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 8
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 9
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 10
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 11
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 12
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 15
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 16
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 17
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 18
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 19
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 20
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 21
stop();
Symbol 1136 MovieClip [mc_arrow] Frame 22
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 1
#initclip 143
Object.registerClass("mc_buildIcon", BuildIcon);
#endinitclip
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 2
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 3
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 4
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 5
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 6
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 7
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 8
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 9
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 10
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 11
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 12
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 13
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 14
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 15
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 16
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 17
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 18
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 19
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 20
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 21
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 22
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 23
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 24
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 25
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 26
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 27
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 28
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 29
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 30
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 31
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 32
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 33
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 34
stop();
Symbol 1140 MovieClip [mc_buildIcon] Frame 35
stop();
Symbol 1150 MovieClip Frame 1
stop();
Symbol 1150 MovieClip Frame 73
stop();
Symbol 1150 MovieClip Frame 145
stop();
Symbol 1150 MovieClip Frame 217
stop();
Symbol 1150 MovieClip Frame 289
stop();
Symbol 1150 MovieClip Frame 361
stop();
Symbol 1150 MovieClip Frame 433
stop();
Symbol 1150 MovieClip Frame 440
stop();
Symbol 1150 MovieClip Frame 447
stop();
Symbol 1150 MovieClip Frame 519
stop();
Symbol 1150 MovieClip Frame 591
stop();
Symbol 1152 MovieClip [mc_building_FloodLights] Frame 1
#initclip 144
Object.registerClass("mc_building_FloodLights", FloodLights);
#endinitclip
stop();
Symbol 1152 MovieClip [mc_building_FloodLights] Frame 4
playAttackSound();
Symbol 1152 MovieClip [mc_building_FloodLights] Frame 46
onBounceEnd();
stop();
Symbol 1158 MovieClip Frame 1
_parent.onBounceEnd();
stop();
Symbol 1158 MovieClip Frame 2
_parent.onBounceEnd();
Symbol 1158 MovieClip Frame 25
_parent.onBounceEnd();
Symbol 1159 MovieClip [mc_building_gunturret] Frame 1
#initclip 145
Object.registerClass("mc_building_gunturret", GunTurret);
#endinitclip
Symbol 1171 MovieClip [mc_building_teslaCoil] Frame 1
#initclip 146
Object.registerClass("mc_building_teslaCoil", TeslaCoil);
#endinitclip
stop();
Symbol 1171 MovieClip [mc_building_teslaCoil] Frame 12
playAttackSound();
Symbol 1171 MovieClip [mc_building_teslaCoil] Frame 36
onFire();
Symbol 1171 MovieClip [mc_building_teslaCoil] Frame 46
onBounceEnd();
Symbol 1172 MovieClip [mc_building_fortress] Frame 1
#initclip 147
Object.registerClass("mc_building_fortress", Fortress);
#endinitclip
stop();
Symbol 1172 MovieClip [mc_building_fortress] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1173 MovieClip [mc_building_lab] Frame 1
#initclip 148
Object.registerClass("mc_building_lab", Lab);
#endinitclip
stop();
Symbol 1173 MovieClip [mc_building_lab] Frame 32
onBounceEnd();
Symbol 1174 MovieClip [mc_building_OilGasWell] Frame 1
#initclip 149
Object.registerClass("mc_building_OilGasWell", OilGasWell);
#endinitclip
stop();
Symbol 1174 MovieClip [mc_building_OilGasWell] Frame 32
onBounceEnd();
Symbol 1175 MovieClip [mc_building_Mine] Frame 1
#initclip 150
Object.registerClass("mc_building_Mine", Mine);
#endinitclip
stop();
Symbol 1175 MovieClip [mc_building_Mine] Frame 32
onBounceEnd();
Symbol 1176 MovieClip [mc_building_super_GeoPlant] Frame 1
#initclip 151
Object.registerClass("mc_building_super_GeoPlant", SuperGeoPlant);
#endinitclip
stop();
Symbol 1176 MovieClip [mc_building_super_GeoPlant] Frame 32
onBounceEnd();
Symbol 1177 MovieClip [mc_building_GeoPlant] Frame 1
#initclip 152
Object.registerClass("mc_building_GeoPlant", GeoPlant);
#endinitclip
stop();
Symbol 1177 MovieClip [mc_building_GeoPlant] Frame 32
onBounceEnd();
Symbol 1178 MovieClip [mc_building_GasPlant] Frame 1
#initclip 153
Object.registerClass("mc_building_GasPlant", GasPlant);
#endinitclip
stop();
Symbol 1178 MovieClip [mc_building_GasPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1179 MovieClip [mc_building_super_farm] Frame 1
#initclip 154
Object.registerClass("mc_building_super_farm", SuperFarm);
#endinitclip
stop();
Symbol 1179 MovieClip [mc_building_super_farm] Frame 32
onBounceEnd();
Symbol 1180 MovieClip [mc_building_farm] Frame 1
#initclip 155
Object.registerClass("mc_building_farm", Farm);
#endinitclip
stop();
Symbol 1180 MovieClip [mc_building_farm] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1181 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 13
stop();
Symbol 1181 MovieClip Frame 25
stop();
Symbol 1182 MovieClip [mc_building_nucleardump] Frame 1
#initclip 156
Object.registerClass("mc_building_nucleardump", NuclearDump);
#endinitclip
stop();
Symbol 1182 MovieClip [mc_building_nucleardump] Frame 2
stop();
Symbol 1182 MovieClip [mc_building_nucleardump] Frame 3
stop();
Symbol 1182 MovieClip [mc_building_nucleardump] Frame 4
stop();
Symbol 1182 MovieClip [mc_building_nucleardump] Frame 5
stop();
Symbol 1183 MovieClip [mc_building_landfill] Frame 1
#initclip 157
Object.registerClass("mc_building_landfill", Landfill);
#endinitclip
stop();
Symbol 1183 MovieClip [mc_building_landfill] Frame 2
stop();
Symbol 1183 MovieClip [mc_building_landfill] Frame 3
stop();
Symbol 1183 MovieClip [mc_building_landfill] Frame 4
stop();
Symbol 1183 MovieClip [mc_building_landfill] Frame 5
stop();
Symbol 1184 MovieClip [mc_building_factory] Frame 1
#initclip 158
Object.registerClass("mc_building_factory", Factory);
#endinitclip
stop();
Symbol 1184 MovieClip [mc_building_factory] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1185 MovieClip [mc_building_SolarPlant] Frame 1
#initclip 159
Object.registerClass("mc_building_SolarPlant", SolarPlant);
#endinitclip
stop();
Symbol 1185 MovieClip [mc_building_SolarPlant] Frame 32
onBounceEnd();
Symbol 1186 MovieClip [mc_building_WindPlant] Frame 1
#initclip 160
Object.registerClass("mc_building_WindPlant", WindPlant);
#endinitclip
stop();
Symbol 1186 MovieClip [mc_building_WindPlant] Frame 32
onBounceEnd();
Symbol 1187 MovieClip [mc_building_NuclearPlant] Frame 1
#initclip 161
Object.registerClass("mc_building_NuclearPlant", NuclearPlant);
#endinitclip
stop();
Symbol 1187 MovieClip [mc_building_NuclearPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1188 MovieClip [mc_building_FFPlant] Frame 1
#initclip 162
Object.registerClass("mc_building_FFPlant", FFPlant);
#endinitclip
stop();
Symbol 1188 MovieClip [mc_building_FFPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1189 MovieClip [mc_ff] Frame 1
#initclip 163
Object.registerClass("mc_ff", FFResource);
#endinitclip
stop();
Symbol 1189 MovieClip [mc_ff] Frame 2
stop();
Symbol 1189 MovieClip [mc_ff] Frame 3
stop();
Symbol 1189 MovieClip [mc_ff] Frame 4
stop();
Symbol 1190 MovieClip [mc_nwaste] Frame 1
#initclip 164
Object.registerClass("mc_nwaste", NuclearWaste);
#endinitclip
stop();
Symbol 1190 MovieClip [mc_nwaste] Frame 2
stop();
Symbol 1190 MovieClip [mc_nwaste] Frame 3
stop();
Symbol 1190 MovieClip [mc_nwaste] Frame 4
stop();
Symbol 1191 MovieClip [mc_gas] Frame 1
#initclip 165
Object.registerClass("mc_gas", GasResource);
#endinitclip
stop();
Symbol 1191 MovieClip [mc_gas] Frame 2
stop();
Symbol 1191 MovieClip [mc_gas] Frame 3
stop();
Symbol 1191 MovieClip [mc_gas] Frame 4
stop();
Symbol 1192 MovieClip [mc_metal] Frame 1
#initclip 166
Object.registerClass("mc_metal", MetalResource);
#endinitclip
stop();
Symbol 1192 MovieClip [mc_metal] Frame 2
stop();
Symbol 1192 MovieClip [mc_metal] Frame 3
stop();
Symbol 1192 MovieClip [mc_metal] Frame 4
stop();
Symbol 1193 MovieClip [mc_smokeCloud] Frame 22
_parent.halfDemolishAnim();
Symbol 1193 MovieClip [mc_smokeCloud] Frame 40
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 1194 MovieClip [mc_explodeCloud] Frame 22
_parent.halfDestroyAnim();
Symbol 1194 MovieClip [mc_explodeCloud] Frame 40
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 1195 MovieClip [mc_smog] Frame 1
#initclip 167
Object.registerClass("mc_smog", Smog);
#endinitclip
Symbol 1195 MovieClip [mc_smog] Frame 46
stop();
timeToDie();
Symbol 1195 MovieClip [mc_smog] Frame 71
stop();
timeToDie();
Symbol 1195 MovieClip [mc_smog] Frame 105
stop();
timeToDie();
Symbol 1207 MovieClip [mc_toggle_deploy] Frame 1
#initclip 168
Object.registerClass("mc_toggle_deploy", ToggleButton);
#endinitclip
stop();
Symbol 1207 MovieClip [mc_toggle_deploy] Frame 2
stop();
Symbol 1209 MovieClip [mc_ripple] Frame 15
stop();
this.removeMovieClip();
Symbol 1212 MovieClip [mc_build_button_toggle] Frame 1
#initclip 169
Object.registerClass("mc_build_button_toggle", ToggleButton);
#endinitclip
stop();
Symbol 1212 MovieClip [mc_build_button_toggle] Frame 2
stop();
Symbol 1214 MovieClip [mc_inspect_button_toggle] Frame 1
#initclip 170
Object.registerClass("mc_inspect_button_toggle", ToggleButton);
#endinitclip
stop();
Symbol 1214 MovieClip [mc_inspect_button_toggle] Frame 2
stop();
Symbol 1218 MovieClip [mc_progressbar] Frame 1
#initclip 171
Object.registerClass("mc_progressbar", ProgressBar);
#endinitclip
Symbol 1229 MovieClip [mc_terrainSquare] Frame 1
#initclip 172
Object.registerClass("mc_terrainSquare", TerrainSquare);
#endinitclip
stop();
Symbol 1229 MovieClip [mc_terrainSquare] Frame 2
stop();
Symbol 1229 MovieClip [mc_terrainSquare] Frame 3
stop();
Symbol 1229 MovieClip [mc_terrainSquare] Frame 4
stop();
Symbol 1229 MovieClip [mc_terrainSquare] Frame 5
stop();
Symbol 1232 MovieClip [mc_zoomCircle] Frame 21
stop();
this.removeMovieClip();
Symbol 1249 MovieClip [mc_levelBaker] Frame 1
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 2
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 3
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 4
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 5
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 6
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 7
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 8
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 9
stop();
Symbol 1249 MovieClip [mc_levelBaker] Frame 10
stop();
Symbol 1258 Button
on (release) {
_parent.endTextThing();
}
Symbol 1284 MovieClip Frame 1
stop();
Symbol 1284 MovieClip Frame 2
stop();
Symbol 1284 MovieClip Frame 3
stop();
Symbol 1284 MovieClip Frame 4
stop();
Symbol 1284 MovieClip Frame 5
stop();
Symbol 1457 MovieClip Frame 1
stop();
Symbol 1457 MovieClip Frame 2
stop();
Symbol 1457 MovieClip Frame 3
stop();
Symbol 1457 MovieClip Frame 4
stop();
Symbol 1457 MovieClip Frame 5
stop();
Symbol 1457 MovieClip Frame 6
stop();
Symbol 1457 MovieClip Frame 7
stop();
Symbol 1457 MovieClip Frame 8
stop();
Symbol 1457 MovieClip Frame 9
stop();
Symbol 1457 MovieClip Frame 10
stop();
Symbol 1457 MovieClip Frame 11
stop();
Symbol 1457 MovieClip Frame 12
stop();
Symbol 1457 MovieClip Frame 13
stop();
Symbol 1457 MovieClip Frame 14
stop();
Symbol 1457 MovieClip Frame 15
stop();
Symbol 1457 MovieClip Frame 16
stop();
Symbol 1457 MovieClip Frame 17
stop();
Symbol 1457 MovieClip Frame 18
stop();
Symbol 1457 MovieClip Frame 19
stop();
Symbol 1457 MovieClip Frame 20
stop();
Symbol 1462 MovieClip [mc_textThing] Frame 1
#initclip 173
Object.registerClass("mc_textThing", TextThing);
#endinitclip
stop();
Symbol 1462 MovieClip [mc_textThing] Frame 2
stop();
Symbol 1464 MovieClip [mc_parrowww] Frame 1
#initclip 174
Object.registerClass("mc_parrowww", Arrow);
#endinitclip
Symbol 1467 MovieClip [mc_slider] Frame 1
#initclip 175
Object.registerClass("mc_slider", VolumeSlider);
#endinitclip
Symbol 1477 Button
on (release) {
_parent.master.gotoMenu();
}
Symbol 1478 Button
on (release) {
_parent.saveOptions(this);
_parent.master.gotoMenu();
}
Symbol 1483 Button
on (release) {
_parent.quitTheGame();
}
Symbol 1493 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 1495 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 1498 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 1500 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 1503 MovieClip [Defaults] Frame 1
#initclip 94
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 1504 MovieClip [UIObjectExtensions] Frame 1
#initclip 95
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 1505 MovieClip [UIObject] Frame 1
#initclip 96
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 1508 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 1509 MovieClip Frame 1
#initclip 97
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 1510 MovieClip [FocusRect] Frame 1
#initclip 98
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 1511 MovieClip [FocusManager] Frame 1
#initclip 99
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 1512 MovieClip [UIComponentExtensions] Frame 1
#initclip 100
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 1513 MovieClip [UIComponent] Frame 1
#initclip 101
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 1514 MovieClip [SimpleButton] Frame 1
#initclip 102
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 1515 MovieClip [Border] Frame 1
#initclip 103
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 1516 MovieClip [RectBorder] Frame 1
#initclip 104
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 1517 MovieClip [ButtonSkin] Frame 1
#initclip 105
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 1518 MovieClip [Button] Frame 1
#initclip 106
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 1514 MovieClip [SimpleButton] in Symbol 1518 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1523 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1527 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1533 MovieClip [RadioButtonAssets] Frame 1
#initclip 107
mx.controls.RadioButton.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local5 = _local2._width + 4;
var _local6 = _local2._height + 4;
_local4.setSize(_local5, _local6, 8, 100, _local3);
var _local8 = _local2._x;
var _local7 = _local2._y;
_local4.move((this.x - 2) + _local8, (this.y + _local7) - 2);
};
#endinitclip
Symbol 1534 MovieClip [RadioButton] Frame 1
#initclip 108
Object.registerClass("RadioButton", mx.controls.RadioButton);
#endinitclip
stop();
Instance of Symbol 1518 MovieClip [Button] "foo" in Symbol 1534 MovieClip [RadioButton] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1562 Button
on (release) {
_parent.restartTheGame();
}
Symbol 1568 Button
on (release) {
_parent.master.gotoMenu();
}
Symbol 1571 Button
on (release) {
tutorial.gotoAndStop(tutorial._currentframe - 1);
}
Symbol 1572 Button
on (release) {
tutorial.gotoAndStop(tutorial._currentframe + 1);
}
Symbol 1573 MovieClip [mc_menu] Frame 1
#initclip 176
Object.registerClass("mc_menu", MenuThingy);
#endinitclip
stop();
Instance of Symbol 1534 MovieClip [RadioButton] "r_normalCursor" in Symbol 1573 MovieClip [mc_menu] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "cursorGroup";
label = "normal";
labelPlacement = "right";
selected = false;
}
onClipEvent (load) {
function __f_click(eventObj) {
_parent.fancyCursorOff();
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 1534 MovieClip [RadioButton] "r_fancyCursor" in Symbol 1573 MovieClip [mc_menu] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "cursorGroup";
label = "fancy";
labelPlacement = "right";
selected = true;
}
onClipEvent (load) {
function __f_click(eventObj) {
_parent.fancyCursorOn();
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 1534 MovieClip [RadioButton] "r_lowquality" in Symbol 1573 MovieClip [mc_menu] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "qualityGroup";
label = "low";
labelPlacement = "right";
selected = false;
}
onClipEvent (load) {
function __f_click(eventObj) {
K.setTheQuality("low");
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 1534 MovieClip [RadioButton] "r_midquality" in Symbol 1573 MovieClip [mc_menu] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "qualityGroup";
label = "medium";
labelPlacement = "right";
selected = false;
}
onClipEvent (load) {
function __f_click(eventObj) {
K.setTheQuality("medium");
}
this.addEventListener("click", __f_click);
}
Instance of Symbol 1534 MovieClip [RadioButton] "r_highquality" in Symbol 1573 MovieClip [mc_menu] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "qualityGroup";
label = "high";
labelPlacement = "right";
selected = false;
}
onClipEvent (load) {
function __f_click(eventObj) {
K.setTheQuality("high");
}
this.addEventListener("click", __f_click);
}
Symbol 1573 MovieClip [mc_menu] Frame 2
stop();
Symbol 1574 MovieClip [mc_transitioner] Frame 30
stop();
_parent.onMidTransition();
Symbol 1574 MovieClip [mc_transitioner] Frame 59
stop();
_parent.onTransitionEnd();
this.removeMovieClip();
Symbol 1579 MovieClip [CheckThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1590 MovieClip [CheckBoxAssets] Frame 1
#initclip 109
mx.controls.CheckBox.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local8 = _local2._width + 4;
var _local5 = _local2._height + 4;
_local4.setSize(_local8, _local5, 0, 100, _local3);
var _local7 = _local2._x;
var _local6 = _local2._y;
_local4.move((this.x - 2) + _local7, (this.y + _local6) - 2);
};
#endinitclip
Symbol 1591 MovieClip [CheckBox] Frame 1
#initclip 110
Object.registerClass("CheckBox", mx.controls.CheckBox);
#endinitclip
stop();
Instance of Symbol 1518 MovieClip [Button] in Symbol 1591 MovieClip [CheckBox] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1595 MovieClip [TextInput] Frame 1
#initclip 111
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 1602 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1614 MovieClip [NumericStepper] Frame 1
#initclip 112
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 1514 MovieClip [SimpleButton] in Symbol 1614 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1595 MovieClip [TextInput] in Symbol 1614 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1689 MovieClip [__Packages.K] Frame 0
class K
{
function K () {
}
static function propertyToBuilding(i) {
switch (i) {
case _FFPLANT :
return("FFPlant");
case _GASPLANT :
return("GasPlant");
case _NUCLEARPLANT :
return("NuclearPlant");
case _WINDPLANT :
return("WindPlant");
case _SOLARPLANT :
return("SolarPlant");
case _GEOPLANT :
return("GeoPlant");
case _SUPERGEOPLANT :
return("superGeoPlant");
case _FARM :
return("Farm");
case _MINE :
return("Mine");
case _SUPERFARM :
return("superFarm");
case _NUCLEARDUMP :
return("NuclearDump");
case _OILGASWELL :
return("OilGasWell");
case _FACTORY :
return("Factory");
case _LAB :
return("Lab");
case _LANDFILL :
return("Landfill");
case _FLOODLIGHTS :
return("Floodlights");
case _TESLACOIL :
return("TesslaCoil");
case _GUNTURRET :
return("GunTurret");
case _FLAMETURRET :
return("FlameTurret");
}
return("");
}
static function setTheQuality(s) {
_quality = s.toUpperCase();
}
static function killResearch() {
level_f_gasoline = 0;
level_f_diesel = -1;
level_f_electric = -1;
level_f_ethanol = -1;
level_f_natgas = -1;
level_f_fuelcell = -1;
level_ffplant = 0;
level_gasplant = 0;
level_solarplant = 0;
level_hydroplant = 0;
level_geoplant = 0;
level_nuclearplant = 0;
level_windplant = 0;
level_mine = [0, 0];
level_farm = [0, 0];
level_gunturret = [0, 0];
level_flameturret = [0, 0];
level_teslacoil = [0, 0];
level_factory = [0, 0];
level_lab = [0, 0];
level_landfill = [0, 0];
level_oilgaswell = [0, 0];
level_floodlights = [0, 0];
}
static function propertyToBuildingCode(i) {
switch (i) {
case START :
return(FORTRESS);
case _FFPLANT :
return(FFPLANT);
case _GASPLANT :
return(GASPLANT);
case _NUCLEARPLANT :
return(NUCLEARPLANT);
case _WINDPLANT :
return(WINDPLANT);
case _SOLARPLANT :
return(SOLARPLANT);
case _GEOPLANT :
return(GEOPLANT);
case _FARM :
return(FARM);
case _MINE :
return(MINE);
case _SUPERFARM :
return(SUPERFARM);
case _NUCLEARDUMP :
return(NUCLEARDUMP);
case _OILGASWELL :
return(OILGASWELL);
case _FACTORY :
return(FACTORY);
case _LAB :
return(LAB);
case _LANDFILL :
return(LANDFILL);
case _FLOODLIGHTS :
return(FLOODLIGHTS);
case _TESLACOIL :
return(TESLACOIL);
case _GUNTURRET :
return(GUNTURRET);
case _FLAMETURRET :
return(FLAMETURRET);
}
return(-100);
}
static function getE_Usage(theName) {
var _local2 = K["level_" + theName.toLowerCase()];
var _local1 = getEfficiency(theName, _local2);
return(Math.round(_local1 * 10) / 10);
}
static function getS_Usage(theName) {
var _local2 = K["level_" + theName.toLowerCase()];
var _local1 = getEmissions(theName, _local2);
return(Math.round(_local1 * 10) / 10);
}
static function getEmissions(theName, level) {
var _local2 = K["S_OUT_" + theName.toUpperCase()];
var _local3 = K["U_EM_" + theName.toUpperCase()];
var _local1 = 0;
while (_local1 < level) {
_local2 = _local2 * _local3;
_local1++;
}
return(_local2);
}
static function getEfficiency(theName, level) {
var _local2 = K["E_OUT_" + theName.toUpperCase()];
var factor = K["U_EF_" + theName.toUpperCase()];
var _local1 = 0;
while (_local1 < level) {
_local2 = _local2 * factor;
_local1++;
}
return(_local2);
}
static function error(c, f, msg) {
}
static function success(c, f, msg) {
if (VERBOSE) {
}
}
static function adjustDestRange(destX, destY) {
if (destY < INT_OFF_Y_PX) {
destY = INT_OFF_Y_PX;
} else if (destY > (Stage.height - (TILE_SIZE * 2))) {
destY = Stage.height - (TILE_SIZE * 2);
}
if (destX < TILE_SIZE) {
destX = TILE_SIZE;
} else if (destX > (Stage.width - INT_OFF_X_PX)) {
destX > (Stage.width - INT_OFF_X_PX);
}
return([destX, destY]);
}
static function getDist(thing1, thing2) {
var _local2 = thing1._x - thing2._x;
var _local1 = thing1._y - thing2._y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
static function getLocalRawPath() {
var _local1 = _url;
_local1 = chopEndPath(_local1);
return(_local1);
}
static function chopEndPath(somePath) {
var _local3;
var _local1 = somePath.length;
while (_local1 > 0) {
if ((somePath.charAt(_local1 - 1) == "/") || (somePath.charCodeAt(_local1 - 1) == 92)) {
_local3 = _local1;
_local1 = 0;
}
_local1--;
}
var _local4 = somePath.slice(0, _local3);
return(_local4);
}
static function codeToState(code) {
switch (code) {
case PAUSE_CODE :
return(PAUSE_STATE);
case MENU_CODE :
return(MENU_STATE);
}
}
static function getStateName(state) {
var _local1 = "";
switch (state) {
case PAUSE_STATE :
_local1 = "paused";
break;
case MENU_STATE :
_local1 = "menu";
break;
case GAME_STATE :
_local1 = "game";
break;
case START_STATE :
_local1 = "start";
}
return(_local1);
}
static function getFuelLevel(fuel) {
var _local1 = getFuelLevels();
return(_local1[fuel]);
}
static function getFuelLevels() {
var _local1 = new Array();
_local1[0] = level_f_gasoline;
_local1[1] = level_f_diesel;
_local1[2] = level_f_electric;
_local1[3] = level_f_ethanol;
_local1[4] = level_f_natgas;
_local1[5] = level_f_fuelcell;
return(_local1);
}
static function getLevels(s) {
var _local1;
_local1 = K["level_" + s.toLowerCase()];
return(_local1);
}
static function upgradeLevel(target, upgrade) {
var _local4 = K["level_" + target.toLowerCase()];
var _local3;
if (target.toLowerCase() == "fuel") {
K["level_f_" + upgrade.toLowerCase()]++;
_local3 = K["level_f_" + upgrade.toLowerCase()];
} else if (upgrade.toLowerCase() == "both") {
K["level_" + target.toLowerCase()]++;
_local3 = K["level_" + target.toLowerCase()];
}
return(_local3);
}
static function getUpgradeCost(s) {
var _local1 = new Array();
var _local3 = K["level_" + s.toLowerCase()];
if (_local3 < 3) {
_local1[0] = K["COST_U_" + s.toUpperCase()][0];
_local1[1] = K["COST_U_" + s.toUpperCase()][1];
_local1[2] = K["COST_U_" + s.toUpperCase()][2];
var _local2 = 0;
while (_local2 < _local3) {
_local1[0] = _local1[0] * _local1[2];
_local1[1] = _local1[1] * _local1[2];
_local2++;
}
} else {
_local1 = undefined;
}
return(_local1);
}
static function getFuelCost(s) {
var _local1 = new Array();
var _local3 = K["level_f_" + s.toLowerCase()];
if (_local3 < 3) {
_local1[0] = K["COST_U_" + s.toUpperCase()][0];
_local1[1] = K["COST_U_" + s.toUpperCase()][1];
_local1[2] = K["COST_U_" + s.toUpperCase()][2];
var _local2 = 0;
while (_local2 < _local3) {
_local1[0] = _local1[0] * _local1[2];
_local1[1] = _local1[1] * _local1[2];
_local2++;
}
} else {
_local1 = undefined;
}
return(_local1);
}
static function getCost(s) {
var _local1 = new Array();
_local1[0] = K["COST_" + s.toUpperCase()][0];
_local1[1] = K["COST_" + s.toUpperCase()][1];
_local1[2] = K["COST_" + s.toUpperCase()][2];
return(_local1);
}
static var VERBOSE = false;
static var FRAME_RATE = 30;
static var SCROLL_SPEED = 10;
static var MAX_LEVEL = 15;
static var TILESET_WIDTH = 26;
static var TILESET_HEIGHT = 25;
static var TILE_SIZE = 16;
static var TILESET_WIDTH_PX = TILESET_WIDTH * TILE_SIZE;
static var TILESET_HEIGHT_PX = TILESET_HEIGHT * TILE_SIZE;
static var STAGE_WIDTH = Math.floor(Stage.width / TILE_SIZE);
static var STAGE_HEIGHT = Math.floor(Stage.height / TILE_SIZE);
static var TILE_MILES = 7.5;
static var HORIZONTAL = 1;
static var VERTICAL = 2;
static var FANCYCURSOR = false;
static var QUALITY = "medium";
static var INT_OFF_Y_PX = 80;
static var INT_OFF_X_PX = 140;
static var TERRAIN_OFFSET_Y = 3;
static var MAX_X_TILE = 20;
static var MAX_Y_TILE = 15;
static var MAX_X_UNIT_TILE = MAX_X_TILE * 2;
static var MAX_Y_UNIT_TILE = MAX_Y_TILE * 2;
static var INT_OFF_Y = INT_OFF_Y_PX / TILE_SIZE;
static var INT_OFF_X = INT_OFF_X_PX / TILE_SIZE;
static var SCROLL_FUDGE_X = 11;
static var SCROLL_FUDGE_Y = 10;
static var DEMOLISH = 0;
static var REPAIR = 1;
static var CLICK = 2;
static var BUILD = 3;
static var MOVE = 4;
static var ATTACK = 5;
static var IDLE = 0;
static var GETGARBAGE = 1;
static var GETWASTE = 2;
static var GETRESOURCE = 2;
static var DUMPGARBAGE = 3;
static var DELIVERRESOURCE = 4;
static var IDLE_GARBAGE = 5;
static var IDLE_RESOURCE = 6;
static var GOTOSPILL = 7;
static var CLEANUPSPILL = 8;
static var GOTOBUILDING = 9;
static var ATTACKTASK = 10;
static var ATTACKPOSITION = 11;
static var DYING = 12;
static var DMG_EDDERKOP = 2;
static var WASTE = 104;
static var SCREEN_WIDTH = STAGE_WIDTH - INT_OFF_X;
static var SCREEN_HEIGHT = STAGE_HEIGHT - INT_OFF_Y;
static var SCREEN_WIDTH_PX = Stage.width - INT_OFF_X_PX;
static var SCREEN_HEIGHT_PX = Stage.height - INT_OFF_Y_PX;
static var UP_CODE = 38;
static var DOWN_CODE = 40;
static var LEFT_CODE = 37;
static var RIGHT_CODE = 39;
static var UP_CODE_ = 87;
static var LEFT_CODE_ = 65;
static var RIGHT_CODE_ = 68;
static var DOWN_CODE_ = 83;
static var PAUSE_CODE = 192;
static var MENU_CODE = 27;
static var START_BUTT_CODE = 13;
static var ABUTT_CODE = 32;
static var BBUTT_CODE = 90;
static var CBUTT_CODE = 70;
static var MOUSEBUTT_CODE = -1;
static var MOUSEMOVE_CODE = -2;
static var START_STATE = 2;
static var GAME_STATE = 3;
static var PAUSE_STATE = -1;
static var MENU_STATE = 1;
static var TILES = 0;
static var PROPERTIES = 1;
static var DIRT = 0;
static var START = 1;
static var GRASS = 2;
static var HARD = 3;
static var STONE = 4;
static var WALL = 5;
static var WATER = 6;
static var WATER_HI = 7;
static var WATER_FALL = 8;
static var GEO = 9;
static var GEO_BIG = 10;
static var OIL = 11;
static var OIL_BIG = 12;
static var _FFPLANT = 13;
static var _GASPLANT = 14;
static var _NUCLEARPLANT = 15;
static var _WINDPLANT = 16;
static var _SOLARPLANT = 17;
static var _SUPERGEOPLANT = 18;
static var _MINE = 20;
static var _FARM = 21;
static var _NUCLEARDUMP = 38;
static var _OILGASWELL = 39;
static var _FACTORY = 40;
static var _LAB = 41;
static var _LANDFILL = 42;
static var _FLOODLIGHTS = 43;
static var _TESLACOIL = 44;
static var _GUNTURRET = 45;
static var _FLAMETURRET = 46;
static var _POLLUTION = -9;
static var _GEOPLANT = -8;
static var _SUPERFARM = -7;
static var POLLUTED = 99;
static var SCORCHED = 100;
static var ALT_LOW = -1;
static var ALT_NORM = 0;
static var ALT_HIGH = 1;
static var EDGE_CRATER = -1;
static var EDGE_FLAT = 0;
static var EDGE_CLIFF = 1;
static var GRID_WIDTH = 30;
static var GRID_HEIGHT = 30;
static var GRID_SIZE = 20;
static var GRID_HEIGHT_PX = GRID_SIZE * GRID_HEIGHT;
static var GRID_WIDTH_PX = GRID_SIZE * GRID_WIDTH;
static var MOUSE_IS_DOWN = false;
static var TICK_COUNT = 20;
static var REFUEL_COUNT = TICK_COUNT - 2;
static var FAST_TICK_AMOUNT = 3;
static var UNIT = 0;
static var BUILDING = 1;
static var ENEMY = 2;
static var ENERGY = 0;
static var FOOD = 1;
static var METAL = 2;
static var FF = 3;
static var GAS = 4;
static var SMOG = 5;
static var NWASTE = 6;
static var RESEARCH = 7;
static var FORTRESS = 0;
static var FFPLANT = 1;
static var GASPLANT = 2;
static var HYDROPLANT = 3;
static var SOLARPLANT = 4;
static var GEOPLANT = 5;
static var WINDPLANT = 6;
static var NUCLEARPLANT = 7;
static var FARM = 8;
static var MINE = 9;
static var OILGASWELL = 10;
static var LAB = 11;
static var SUPERFARM = -8;
static var FOODTIME = LAB + 1;
static var REPAIRTIME = FOODTIME + 1;
static var RESETTIME = REPAIRTIME + 1;
static var CYCLETIME = RESETTIME;
static var LANDFILL = 20;
static var NUCLEARDUMP = 21;
static var FACTORY = 22;
static var GUNTURRET = 23;
static var FLAMETURRET = 24;
static var TESLACOIL = 25;
static var FLOODLIGHTS = 26;
static var ENGINEER = 0;
static var GARBAGETRUCK = 1;
static var SCOUT = 2;
static var HUMVEE = 3;
static var TANK = 4;
static var ZOMBIE = 99;
static var EDDERKOP = 100;
static var SQUAGLER = 101;
static var GRUGGA = 102;
static var GIANTENEMYCRAB = 103;
static var NIGHT = 0;
static var DAY = 1;
static var TWILIGHT = 2;
static var DAYTIMEAMOUNT = RESETTIME * 10;
static var E_IN_FORTRESS = 5;
static var S_OUT_FORTRESS = 4;
static var G_OUT_FORTRESS = 5;
static var F_IN_FORTRESS = 1;
static var E_OUT_FFPLANT = 50;
static var FF_IN_FFPLANT = 1;
static var S_OUT_FFPLANT = 20;
static var S_OUT_TRUCK = S_OUT_FFPLANT / 10;
static var S_OUT_CAR = S_OUT_FFPLANT / 30;
static var F_OUT_SUPERFARM = 16;
static var E_IN_FARM = 0.2;
static var F_OUT_FARM = 8;
static var G_OUT_FARM = 0.5;
static var S_OUT_FARM = 2;
static var E_IN_MINE = 2.5;
static var M_OUT_MINE = 12.5;
static var G_OUT_MINE = 2.5;
static var E_IN_FACTORY = 0.2;
static var M_IN_FACTORY = 4;
static var S_OUT_FACTORY = 0.1;
static var G_OUT_FACTORY = 10;
static var GAS_IN_GASPLANT = 0.8;
static var E_OUT_GASPLANT = 40;
static var S_OUT_GASPLANT = 6;
static var E_OUT_SUPERGEOPLANT = 10;
static var E_OUT_GEOPLANT = 5;
static var S_OUT_GEOPLANT = 0.2;
static var E_OUT_HYDROPLANT = 100;
static var E_OUT_WINDPLANT = 2;
static var E_OUT_SOLARPLANT = 0.5;
static var E_OUT_NUCLEARPLANT = 15;
static var NWASTE_OUT_NUCLEARPLANT = 1;
static var E_IN_OILGASWELL = 0;
static var FF_OUT_OILGASWELL = 33.3 / RESETTIME;
static var GAS_OUT_OILGASWELL = 33.3 / RESETTIME;
static var G_OUT_OILGASWELL = 0.25;
static var E_IN_LAB = 0.11;
static var M_IN_LAB = 0;
static var G_OUT_LAB = 0;
static var R_OUT_LAB = 5;
static var E_IN_TESLACOIL = 5;
static var DMG_TESLACOIL = 25;
static var E_IN_FLOODLIGHTS = 1;
static var DMG_FLOODLIGHTS = 1;
static var M_IN_GUNTURRET = 0.1;
static var DMG_GUNTURRET = 3;
static var COOLDOWN_GUNTURRET = 0;
static var FF_IN_FLAMETURRET = 1;
static var GAS_IN_FLAMETURRET = 1;
static var DMG_FLAMETURRET = 15;
static var COST_FFPLANT = [200, 40];
static var COST_GASPLANT = [200, 40];
static var COST_SOLARPLANT = [120, 25];
static var COST_HYDROPLANT = [75, 15];
static var COST_GEOPLANT = [50, 10];
static var COST_NUCLEARPLANT = [250, 50];
static var COST_WINDPLANT = [60, 10];
static var COST_MINE = [1, 0];
static var COST_FARM = [50, 0];
static var COST_GUNTURRET = [25, 5];
static var COST_FLAMETURRET = [50, 10];
static var COST_TESLACOIL = [75, 10];
static var COST_FACTORY = [75, 15];
static var COST_LAB = [75, 15];
static var COST_LANDFILL = [25, 0];
static var COST_NUCLEARDUMP = [25, 0];
static var COST_OILGASWELL = [1, 0];
static var COST_FLOODLIGHTS = [10, 0];
static var level_f_gasoline = 0;
static var level_f_diesel = -1;
static var level_f_electric = -1;
static var level_f_ethanol = -1;
static var level_f_natgas = -1;
static var level_f_fuelcell = -1;
static var level_ffplant = 0;
static var level_gasplant = 0;
static var level_solarplant = 0;
static var level_hydroplant = 0;
static var level_geoplant = 0;
static var level_nuclearplant = 0;
static var level_windplant = 0;
static var U_EF_FFPLANT = 1.5;
static var U_EM_FFPLANT = 0.75;
static var U_EF_GASPLANT = 1.5;
static var U_EM_GASPLANT = 0.75;
static var U_EF_SOLARPLANT = 1.5;
static var U_EM_SOLARPLANT = 0.75;
static var U_EF_GEOPLANT = 1.5;
static var U_EM_GEOPLANT = 0.75;
static var U_EF_NUCLEARPLANT = 1.5;
static var U_EM_NUCLEARPLANT = 0.75;
static var U_EF_WINDPLANT = 1.5;
static var U_EM_WINDPLANT = 0.75;
static var level_mine = [0, 0];
static var level_farm = [0, 0];
static var level_gunturret = [0, 0];
static var level_flameturret = [0, 0];
static var level_teslacoil = [0, 0];
static var level_factory = [0, 0];
static var level_lab = [0, 0];
static var level_landfill = [0, 0];
static var level_oilgaswell = [0, 0];
static var level_floodlights = [0, 0];
static var COST_ENGINEER = [10, 2.5];
static var COST_GARBAGETRUCK = [10, 2.5];
static var COST_SCOUT = [10, 0];
static var COST_HUMVEE = [30, 10];
static var COST_TANK = [75, 25];
static var COST_EFFICIENCY_1 = [100, 25];
static var COST_EFFICIENCY_2 = [200, 35];
static var COST_EFFICIENCY_3 = [350, 50];
static var COST_EMISSIONS_1 = [100, 25];
static var COST_U_FFPLANT = [100, 10, 1.25];
static var COST_U_GASPLANT = [100, 10, 1.5];
static var COST_U_WINDPLANT = [100, 5, 2];
static var COST_U_NUCLEARPLANT = [100, 10, 1.5];
static var COST_U_GEOPLANT = [100, 10, 1.5];
static var COST_U_SOLARPLANT = [100, 10, 2];
static var COST_U_DIESEL = [50, 2, 2];
static var COST_U_GASOLINE = [25, 1, 2];
static var COST_U_ELECTRIC = [100, 5, 2];
static var COST_U_FUELCELL = [150, 7, 2];
static var COST_U_ETHANOL = [75, 1, 2];
static var COST_U_NATGAS = [50, 3, 2];
static var GASOLINE = 0;
static var DIESEL = 1;
static var ELECTRIC = 2;
static var ETHANOL = 3;
static var NATGAS = 4;
static var FUELCELL = 5;
static var BARREL_GASOLINE = 22;
static var MUSIC_VOLUME_MAX = 50;
static var FX_VOLUME_MAX = 50;
}
Symbol 1690 MovieClip [__Packages.ClickableThing] Frame 0
class ClickableThing extends MovieClip
{
var master, xTile, yTile, attachMovie, getNextHighestDepth, _visible, removeMovieClip, repairBeacon, outline;
function ClickableThing () {
super();
}
function onLoad() {
}
function setMaster(d) {
master = d;
}
function selectMe() {
}
function onRelease() {
switch (master.actionMode) {
case K.CLICK :
selectMe();
break;
case K.DEMOLISH :
demolishMe();
break;
case K.REPAIR :
repairMe();
break;
case K.MOVE :
selectMe();
break;
case K.BUILD :
master.doClickThing();
}
}
function enterFrameFunction() {
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
}
function destroyMe() {
if (!destroying) {
onRemove();
master.playSound(1, "explosion.wav", 1);
var _local3 = master.getBuildingX(xTile);
var _local2 = master.getBuildingY(yTile);
attachMovie("mc_explodeCloud", "theSmoke", getNextHighestDepth());
destroying = true;
}
}
function demolishMe() {
if (!destroying) {
onRemove();
var _local3 = master.getBuildingX(xTile);
var _local2 = master.getBuildingY(yTile);
master.playSound(1, "demolish.wav", 1);
attachMovie("mc_smokeCloud", "theSmoke", getNextHighestDepth());
destroying = true;
}
}
function halfDestroyAnim() {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, 20, true);
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, 15, false);
}
function halfDemolishAnim() {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, 20, true);
_visible = false;
}
function onDestroyAnim() {
(removeMovieClip());// not popped
}
function repairMe() {
if (hp < maxhp) {
repairing = true;
showRepairBeacon();
}
}
function showRepairBeacon() {
repairBeacon._visible = true;
}
function hideRepairBeacon() {
repairBeacon._visible = false;
}
function unClick() {
outline._visible = false;
amSelected = false;
}
function onRemove() {
}
var amSelected = false;
var myMenu = "";
var repairing = false;
var destroying = false;
var hp = 100;
var maxhp = ClickableThing.prototype.hp;
}
Symbol 1691 MovieClip [__Packages.Director] Frame 0
class Director extends MovieClip
{
var master, music0, underLayer, music1, resourceLayer, music2, groundLayer, music3, unitLayer, fxInterface, fxGame, fxGame2, fxGame3, bldgArray, gArray, lArray, rArray, sArray, uArray, eArray, dragBoxCoords, dragBoxBound, oldState, gListen, attachMovie, getNextHighestDepth, theTerrain, smogLayer, drawLayer, night, bigMask, theInterface, lData, nextLevel, selectedThings, buildingTicks, timeTicks, transition, tickInterval, state, cursor, r_energy, r_FF, r_gas, r_research, r_metal, removeMovieClip, selectedThing, theAlert, fleetFuelType, fleetFuelString, r_food, buildIcon, currCursor, alertTarget, _xmouse, _ymouse;
function Director () {
super();
}
function onLoad() {
}
function setMaster(s) {
master = s;
}
function doFirstStuff() {
goToState(K.GAME_STATE);
music0 = new Sound(underLayer);
music1 = new Sound(resourceLayer);
music2 = new Sound(groundLayer);
music3 = new Sound(unitLayer);
music0.setVolume(K.MUSIC_VOLUME_MAX);
music1.setVolume(K.MUSIC_VOLUME_MAX);
music2.setVolume(K.MUSIC_VOLUME_MAX);
music3.setVolume(K.MUSIC_VOLUME_MAX);
fxInterface = new Sound();
fxInterface.setVolume(K.FX_VOLUME_MAX);
fxGame = new Sound();
fxGame.setVolume(K.FX_VOLUME_MAX);
fxGame2 = new Sound();
fxGame2.setVolume(K.FX_VOLUME_MAX);
fxGame3 = new Sound();
fxGame3.setVolume(K.FX_VOLUME_MAX);
bldgArray = new Array();
gArray = new Array();
lArray = new Array();
rArray = new Array();
sArray = new Array();
uArray = new Array();
eArray = new Array();
dragBoxCoords = new Array(2);
dragBoxBound = new Array(4);
oldState = new StateStack();
gListen = new GameListener();
gListen.setMaster(this);
attachMovie("mc_terrain", "theTerrain", getNextHighestDepth());
theTerrain.setMaster(this);
theTerrain._y = theTerrain._y + K.INT_OFF_Y_PX;
underLayer.swapDepths(theTerrain.getDepth() + 1);
groundLayer.swapDepths(theTerrain.getDepth() + 2);
resourceLayer.swapDepths(theTerrain.getDepth() + 3);
unitLayer.swapDepths(theTerrain.getDepth() + 4);
smogLayer.swapDepths(theTerrain.getDepth() + 5);
drawLayer.swapDepths(theTerrain.getDepth() + 6);
underLayer._alpha = 100;
groundLayer._alpha = 100;
resourceLayer._alpha = 100;
unitLayer._alpha = 100;
smogLayer._alpha = 100;
drawLayer._alpha = 100;
night.swapDepths(theTerrain.getDepth() + 7);
bigMask.swapDepths(theTerrain.getDepth() + 40);
setupDrawLayer();
attachMovie("mc_interface", "theInterface", getNextHighestDepth());
var _local2 = new flash.filters.DropShadowFilter();
_local2.angle = 135;
_local2.strength = 1;
_local2.blurX = 15;
_local2.blurY = 15;
_local2.distance = 2;
var _local3 = theInterface.filters;
_local3.push(_local2);
theInterface.filters = _local3;
theInterface.setMaster(this);
theInterface._x = theInterface._width / 2;
theInterface._y = theInterface._height / 2;
lData = new LevelData();
if (nextLevel == undefined) {
lData.initialize(1, this);
} else {
lData.initialize(nextLevel, this);
}
selectedThings = new Array();
multiSelect = false;
startTicking();
buildingTicks = 0;
timeTicks = 0;
setFleetFuel(K.GASOLINE);
normalCursor();
transition.swapDepths(getNextHighestDepth());
fscommand ("showmenu", "false");
}
function unloadItAll() {
music0.stop();
music1.stop();
music2.stop();
music3.stop();
delete music0;
delete music1;
delete music2;
delete music3;
fxInterface.stop();
fxGame.stop();
fxGame2.stop();
fxGame3.stop();
delete fxInterface;
delete fxGame;
delete fxGame2;
delete fxGame3;
delete bldgArray;
delete gArray;
delete lArray;
delete rArray;
delete sArray;
delete uArray;
delete eArray;
delete dragBoxCoords;
delete dragBoxBound;
delete oldState;
delete gListen;
theTerrain.removeMovieClip();
underLayer.removeMovieClip();
groundLayer.removeMovieClip();
resourceLayer.removeMovieClip();
unitLayer.removeMovieClip();
smogLayer.removeMovieClip();
drawLayer.removeMovieClip();
night.removeMovieClip();
theInterface.removeMovieClip();
delete lData;
delete selectedThings;
stopTicking();
}
function setupDrawLayer() {
drawLayer.lineStyle(1, 65280);
}
function onInterfaceLoaded() {
setResourceAmounts();
setSmog(0);
setResourceVisibility();
}
function stopTicking() {
clearInterval(tickInterval);
}
function startTicking() {
tickInterval = setInterval(this, "enterFrameFunction", 1000 / K.FRAME_RATE, this);
}
function enterFrameFunction() {
if ((state != K.PAUSE_STATE) && (state != K.MENU_STATE)) {
buildingTickFunction();
timeTickFunction();
drawDragBox();
runAllEntities();
}
if (K.FANCYCURSOR == true) {
Mouse.hide();
} else {
Mouse.show();
}
}
function runAllEntities() {
var _local2 = 0;
while (_local2 < eArray.length) {
eArray[_local2].enterFrameFunction();
_local2++;
}
_local2 = 0;
while (_local2 < bldgArray.length) {
bldgArray[_local2].enterFrameFunction();
_local2++;
}
_local2 = 0;
while (_local2 < uArray.length) {
uArray[_local2].enterFrameFunction();
_local2++;
}
_local2 = 0;
while (_local2 < sArray.length) {
sArray[_local2].enterFrameFunction();
_local2++;
}
}
function gotoHelp() {
switchState(K.MENU_STATE);
if (state == K.MENU_STATE) {
theInterface.showHelp();
} else {
theInterface.hideOptions();
}
}
function gotoMenu() {
switchState(K.MENU_STATE);
if (state == K.MENU_STATE) {
theInterface.showOptions(false);
} else {
theInterface.hideOptions();
}
}
function onlyShowTextThing() {
if (state != K.PAUSE_STATE) {
switchState(K.PAUSE_STATE);
if (state == K.PAUSE_STATE) {
theInterface.showTextThing();
}
}
}
function showTutorialCrap() {
}
function showCurrObjective() {
switchState(K.PAUSE_STATE);
if (state == K.PAUSE_STATE) {
theInterface.showCurrObjective();
} else {
theInterface.hideTextThing();
}
}
function gotoTextThing() {
switchState(K.PAUSE_STATE);
if (state == K.PAUSE_STATE) {
theInterface.showTextThing();
} else {
theInterface.hideTextThing();
}
}
function loseLevel() {
switchState(K.PAUSE_STATE);
if (state == K.PAUSE_STATE) {
theInterface.showTextThingLose();
} else {
theInterface.hideTextThing();
}
}
function resetLevel() {
master.resetLevel();
}
function pauseGame() {
var _local2 = 0;
while (_local2 < eArray.length) {
eArray[_local2].pauseMe();
_local2++;
}
}
function unPauseGame() {
var _local2 = 0;
while (_local2 < eArray.length) {
eArray[_local2].unPauseMe();
_local2++;
}
}
function eraseDragBox() {
drawLayer.clear();
}
function drawDragBox() {
if (dragBoxOn) {
drawLayer.clear();
drawLayer.lineStyle(1, 65280);
drawLayer.moveTo(dragBoxCoords[0], dragBoxCoords[1]);
drawLayer.lineTo(cursor._x, dragBoxCoords[1]);
drawLayer.lineTo(cursor._x, cursor._y);
drawLayer.lineTo(dragBoxCoords[0], cursor._y);
drawLayer.lineTo(dragBoxCoords[0], dragBoxCoords[1]);
if (cursor._x < dragBoxCoords[0]) {
dragBoxBound[0] = cursor._x;
dragBoxBound[2] = dragBoxCoords[0];
} else {
dragBoxBound[2] = cursor._x;
dragBoxBound[0] = dragBoxCoords[0];
}
if (cursor._y < dragBoxCoords[1]) {
dragBoxBound[1] = cursor._y;
dragBoxBound[3] = dragBoxCoords[1];
} else {
dragBoxBound[3] = cursor._y;
dragBoxBound[1] = dragBoxCoords[1];
}
}
}
function scrollFunction() {
}
function scrollCheckFunction() {
}
function tickTime() {
if (dayTime != K.TWILIGHT) {
if (infiniteTime == false) {
setGameTime(gameTime - 1);
checkDayNight();
}
}
checkCurrentObjective();
}
function checkCurrentObjective() {
var _local2 = lData.getCurrObjInfo();
if ((_local2.substr(0, 2) == "b_") || (_local2.substr(0, 2) == "u_")) {
_local2 = _local2.substr(0, _local2.length - 3);
} else if (_local2.substr(0, 2) == "r_") {
_local2 = _local2.substr(0, _local2.length - 4);
} else if (_local2.substr(0, 7) == "less_r_") {
_local2 = _local2.substr(0, _local2.length - 4);
}
if ((_local2 != "wait_dark") && (_local2 != "morning_survive")) {
checkObjectives(_local2);
}
}
function checkObjectives(code) {
var _local2 = true;
var _local5 = lData.getCurrObjInfo();
var _local10 = _local5.substr(0, code.length);
if (code.toLowerCase() == _local5.toLowerCase()) {
if (code == "survive") {
var _local3 = 0;
while (_local3 < eArray.length) {
if (eArray[_local3] != undefined) {
if (eArray[_local3].destroying == false) {
_local2 = false;
}
} else {
_local2 = false;
}
_local3++;
}
} else if (code == "wait_dark") {
_local2 = true;
} else if (code == "morning_survive") {
_local2 = false;
lData.setCurrObjInfo("survive");
} else if (code == "clean_garbage") {
if (gArray.length == 0) {
_local2 = true;
} else {
_local2 = false;
}
} else if (code == "talk") {
_local2 = true;
} else if (_local5.substr(0, 2) == "d_") {
var _local6 = _local5.substr(2, code.length - 2);
var _local8 = code.substr(2, code.length - 2);
if (((_local6.toLowerCase() == _local8.toLowerCase()) && (_local6 != undefined)) && (_local8 != undefined)) {
if (!checkDisableBuildings(_local6)) {
_local2 = false;
}
} else {
_local2 = false;
}
} else if (code.substr(0, 3) == "up_") {
_local2 = checkUpgrade(code.substr(3, code.length - 3));
} else {
_local2 = false;
}
} else if ((_local5.substr(0, 12) == "days_survive") && (_local5.susbstr(0, 12) == "days_survive")) {
var _local9 = _local5.susbtr(code.length + 1, 2);
var _local7 = Number(_local9);
if (daysSurvived >= _local7) {
lData.setCurrObjInfo("survive");
_local2 = false;
} else {
_local2 = false;
}
} else if (_local5.substr(0, 7) == "less_r_") {
if ((code == "less_r_smog") && (_local5.substr(0, 11) == "less_r_smog")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if (smogLevel <= _local7) {
_local2 = true;
} else {
_local2 = false;
}
}
} else if (_local5.substr(0, 2) == "r_") {
if ((code == "r_energy") && (_local5.substr(0, 8) == "r_energy")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if (r_energy >= _local7) {
_local2 = true;
} else {
_local2 = false;
}
} else if ((code == "r_ffgas") && (_local5.substr(0, 6) == "r_ffgas")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if ((r_FF >= _local7) && (r_gas >= _local7)) {
_local2 = true;
} else {
_local2 = false;
}
} else if ((code == "r_research") && (_local5.substr(0, 10) == "r_research")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if (r_research >= _local7) {
_local2 = true;
} else {
_local2 = false;
}
} else if ((code == "r_gas") && (_local5.substr(0, 10) == "r_gas")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if (r_gas >= _local7) {
_local2 = true;
} else {
_local2 = false;
}
} else if ((code == "r_metal") && (_local5.substr(0, 7) == "r_metal")) {
var _local9 = _local5.substr(code.length + 1, 3);
var _local7 = Number(_local9);
if (r_metal >= _local7) {
_local2 = true;
} else {
_local2 = false;
}
} else {
_local2 = false;
}
} else if ((code.substr(0, 2) == "b_") || (code.substr(0, 2) == "u_")) {
var _local6 = _local5.substr(2, code.length - 2);
var _local8 = code.substr(2, code.length - 2);
var _local9 = _local5.substr(code.length + 1, 2);
var _local7 = Number(_local9);
if (((_local6.toLowerCase() == _local8.toLowerCase()) && (_local6 != undefined)) && (_local8 != undefined)) {
if (_local7 != undefined) {
if (code.substr(0, 2) == "b_") {
if (!countBuildings(_local6, _local7)) {
_local2 = false;
}
} else if (code.substr(0, 2) == "u_") {
if (!countUnits(_local6, _local7)) {
_local2 = false;
}
} else {
_local2 = false;
}
} else {
_local2 = false;
}
} else {
_local2 = false;
}
} else {
_local2 = false;
}
if (_local2 == true) {
achieveObjective();
}
}
function checkUpgrade(s) {
var _local1 = K.getLevels(s);
if (_local1 > 0) {
return(true);
}
return(false);
}
function countUnits(thing, num) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < uArray.length) {
if (uArray[_local2].myMenu.toLowerCase() == thing.toLowerCase()) {
_local3++;
}
if (_local3 >= num) {
return(true);
}
_local2++;
}
return(false);
}
function checkDisableBuildings(thing) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myMenu.toLowerCase() == thing.toLowerCase()) {
if (bldgArray[_local2].disabled == false) {
return(false);
}
}
_local2++;
}
return(true);
}
function countBuildings(thing, num) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myMenu.toLowerCase() == thing.toLowerCase()) {
_local3++;
} else if (bldgArray[_local2].myMenu.toLowerCase() == ("super" + thing.toLowerCase())) {
_local3++;
}
if (_local3 >= num) {
return(true);
}
_local2++;
}
return(false);
}
function doThisLevel(i) {
master.doThisLevel(i);
}
function doNextLevel() {
master.doNextLevel();
}
function deleteMe() {
unloadItAll();
removeMovieClip();
}
function doCurrentActions() {
var _local4 = lData.getCurrAction();
if (_local4 == "multi") {
var _local3 = lData.getCurrMultiActions();
var _local2 = 0;
while (_local2 < _local3.length) {
parseAction(_local3[_local2]);
_local2++;
}
} else {
parseAction(_local4);
}
}
function parseAction(action) {
if (action == "spawn") {
spawnEnemies(lData.getCurrWave());
} else if (action == "night_spawn") {
spawnWaveAtNight = true;
nightFall();
} else if (action.substr(0, 5) == "time_") {
var _local4 = Number(action.substr(5, action.length));
setGameTime(_local4 * K.CYCLETIME);
} else if (action.substr(0, 2) == "e_") {
var _local3 = action.substr(2, action.length - 2);
enableThing(_local3);
} else if (action == "victory") {
doNextLevel();
} else if (action == "talk") {
checkObjectives("talk");
} else if (action == "defeat") {
resetLevel();
} else if (action == "resupply") {
resupply();
} else if (action == "killresearch") {
killResearch();
} else if (action == "ultimatevictory") {
quitTheGame();
}
theInterface.hideBldgButton();
}
function achieveObjective() {
onlyShowTextThing();
}
function onEnemyDie() {
}
function checkDayNight() {
if (gameTime <= 0) {
if (dayTime == K.DAY) {
nightFall();
} else if (dayTime == K.NIGHT) {
sunRise();
}
dayTime = K.TWILIGHT;
setGameTime(0);
}
}
function nightFall() {
night.gotoAndPlay("night");
musicTheyApproach();
putBuildingsToSleep();
spawnTicks = 0;
}
function setNightImmediately() {
night.gotoAndStop("night_now");
musicThePump();
putBuildingsToSleep();
nowItsNight();
}
function nowItsNight() {
setGameTime(lData.getNightHours());
dayTime = K.NIGHT;
if (spawnWaveAtNight == true) {
spawnEnemies(lData.getCurrWave());
spawnWaveAtNight = false;
} else {
spawnEnemies(lData.getLevelEnemies());
}
checkObjectives("wait_dark");
}
function setDayImmediately() {
night.gotoAndStop("day_now");
musicDayTime();
nowItsDay();
}
function nowItsDay() {
setGameTime(lData.getDayHours());
dayTime = K.DAY;
wakeBuildingsUp();
}
function setGameTime(g) {
gameTime = g;
if (g >= 0) {
theInterface.updateGameTime(gameTime);
infiniteTime = false;
} else {
theInterface.updateGameTime(-1);
infiniteTime = true;
}
}
function sunRise() {
night.gotoAndPlay("day");
dayTime = K.DAY;
musicDayTime();
checkObjectives("morning_survive");
daysSurvived++;
}
function putBuildingsToSleep() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].doesSleep == true) {
bldgArray[_local2].showSleepAlert();
}
_local2++;
}
}
function wakeBuildingsUp() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].asleep == true) {
bldgArray[_local2].wakeUp();
}
_local2++;
}
_local2 = 0;
while (_local2 < uArray.length) {
if (uArray[_local2].asleep == true) {
uArray[_local2].wakeUp();
}
_local2++;
}
}
function disableToggleBuilding() {
selectedThing.disableToggle();
}
function syncDisableAlerts() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].disabled == true) {
bldgArray[_local2].syncDisableAlert();
}
_local2++;
}
}
function syncSleepAlerts() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].asleep == true) {
bldgArray[_local2].syncSleepAlert();
}
_local2++;
}
}
function timeTickFunction() {
if ((timeTicks % K.TICK_COUNT) == 0) {
tickTime();
}
timeTicks++;
}
function buildingTickFunction() {
if (alertNextFrame) {
alertNextFrame = false;
messageAlert(theAlert);
}
if ((buildingTicks % K.TICK_COUNT) == 0) {
tickUnits();
tickBuilding(K.FLOODLIGHTS);
tickBuilding(K.GUNTURRET);
}
if ((buildingTicks % 3) == 0) {
doCheckTicks();
}
if ((buildingTicks % ((K.TICK_COUNT * K.FAST_TICK_AMOUNT) * 3)) == 0) {
tickBuilding(K.OILGASWELL);
}
if ((buildingTicks % (K.TICK_COUNT * K.FAST_TICK_AMOUNT)) == 0) {
tickBuilding(K.FACTORY);
tickBuilding(K.LAB);
tickEnemies();
repairTick();
calculateNets();
}
if ((buildingTicks % K.TICK_COUNT) == 0) {
checkForAlerts();
diluteSmog();
landfillAlertReady = true;
}
switch (buildingTicks) {
case K.FORTRESS * K.TICK_COUNT :
tickBuilding(K.FORTRESS);
break;
case K.FFPLANT * K.TICK_COUNT :
tickBuilding(K.FFPLANT);
break;
case K.GASPLANT * K.TICK_COUNT :
tickBuilding(K.GASPLANT);
break;
case K.HYDROPLANT * K.TICK_COUNT :
tickBuilding(K.HYDROPLANT);
break;
case K.SOLARPLANT * K.TICK_COUNT :
tickBuilding(K.SOLARPLANT);
break;
case K.GEOPLANT * K.TICK_COUNT :
tickBuilding(K.GEOPLANT);
break;
case K.WINDPLANT * K.TICK_COUNT :
tickBuilding(K.WINDPLANT);
break;
case K.NUCLEARPLANT * K.TICK_COUNT :
tickBuilding(K.NUCLEARPLANT);
break;
case K.FARM * K.TICK_COUNT :
tickBuilding(K.FARM);
break;
case K.MINE * K.TICK_COUNT :
tickBuilding(K.MINE);
break;
case K.OILGASWELL * K.TICK_COUNT :
break;
case K.FOODTIME * K.TICK_COUNT :
foodTick();
break;
case K.REPAIRTIME * K.TICK_COUNT :
}
buildingTicks++;
if (buildingTicks > (K.RESETTIME * K.TICK_COUNT)) {
buildingTicks = 0;
}
}
function doCheckTicks() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].isWeapon) {
bldgArray[_local2].onCheckTick();
}
_local2++;
}
}
function tickBuilding(index) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myIndex == index) {
bldgArray[_local2].tick();
}
_local2++;
}
}
function repairTick(index) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].repairing == true) {
bldgArray[_local2].doRepairs();
}
_local2++;
}
}
function foodTick(index) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].eatsFood == true) {
bldgArray[_local2].foodTick();
}
_local2++;
}
}
function tickUnits() {
var _local2 = 0;
while (_local2 < uArray.length) {
uArray[_local2].tick();
_local2++;
}
}
function tickEnemies() {
var _local2 = 0;
while (_local2 < eArray.length) {
eArray[_local2].tick();
_local2++;
}
if (dayTime == K.NIGHT) {
if ((spawnTicks++) >= lData.spawnTicks) {
spawnEnemies();
spawnTicks = 0;
}
}
}
function makeEnemyAt(xTile, yTile, str, levelUps) {
makeEnemy(getUnitX(xTile), getUnitY(yTile), xTile, yTile, str, levelUps);
}
function makeEnemy(xx, yy, xTile, yTile, str, levelUps) {
var _local3;
var _local5 = unitLayer.getNextHighestDepth();
var _local6 = "mc_enemy_" + str;
_local3 = unitLayer.attachMovie(_local6, "enemy_" + _local5, _local5);
_local3.setMaster(this);
if (_local3 != undefined) {
_local3._x = xx;
_local3._y = yy;
_local3.setLoc(xTile * 2, yTile * 2);
eArray.push(_local3);
}
var _local2 = 0;
while (_local2 < levelUps) {
_local3.doNextLevel();
_local2++;
}
cursor.swapDepths(_local3);
}
function updateFleetFuel() {
setFleetFuel(fleetFuelType);
}
function setFleetFuel(f) {
switch (f) {
case K.GASOLINE :
fleetFuelString = "gasoline";
break;
case K.DIESEL :
fleetFuelString = "diesel";
break;
case K.ETHANOL :
fleetFuelString = "ethanol";
break;
case K.ELECTRIC :
fleetFuelString = "electric";
break;
case K.NATGAS :
fleetFuelString = "natGas";
break;
case K.FUELCELL :
fleetFuelString = "fuelCell";
}
fleetFuelType = f;
var _local3 = K.getFuelLevel(fleetFuelType);
var _local2 = 0;
while (_local2 < uArray.length) {
uArray[_local2].setFuelEconomy(fleetFuelType, _local3);
_local2++;
}
}
function makeUnitAt(xTile, yTile, str, startUpSound) {
makeUnit(getUnitX(xTile), getUnitY(yTile), xTile, yTile, str, startUpSound);
}
function makeUnit(xx, yy, xTile, yTile, str, startUpSound) {
var _local2;
var _local3 = unitLayer.getNextHighestDepth();
var _local4 = "mc_unit_" + str;
_local2 = unitLayer.attachMovie(_local4, "unit_" + _local3, _local3);
_local2.startUpSound = startUpSound;
_local2.setMaster(this);
if (_local2 != undefined) {
_local2._x = xx;
_local2._y = yy;
_local2.setLoc(xTile * 2, yTile * 2);
uArray.push(_local2);
}
cursor.swapDepths(_local2);
updateFleetFuel();
}
function setResourceVisibility() {
theInterface.setResourceVisibility(lData.visibleResources);
}
function setResourceAmounts() {
var _local2 = lData.rAmounts;
setResources(_local2[0], _local2[1], _local2[2], _local2[3], _local2[4], _local2[5], _local2[6]);
}
function resupply() {
setFood(r_food + 100);
setMetal(r_metal + 100);
setGas(r_gas + 50);
}
function setResources(e, f, s, r, m, g, ff) {
setEnergy(e);
setFood(f);
setSmog(s);
setMetal(m);
setGas(g);
setFF(ff);
setResearch(r);
}
function addSmog(s) {
if (s != undefined) {
smogLevel = smogLevel + s;
theInterface.setSmog(smogLevel);
}
updateSmog();
}
function diluteSmog() {
smogLevel = smogLevel - 3;
if (smogLevel <= 0) {
smogLevel = 0;
}
theInterface.setSmog(smogLevel);
updateSmog();
}
function updateSmog() {
if (smogLevel > 999) {
smogLevel = 999;
}
var _local2 = Math.floor(100 * (smogLevel / 999));
smogLayer.gotoAndStop(_local2);
smogLevelUps = Math.round(smogLevel / 250);
}
function setSmog(s) {
if (s != undefined) {
smogLevel = s;
theInterface.setSmog(s);
}
updateSmog();
}
function setEnergy(e) {
r_energy = e;
theInterface.setEnergy(e);
}
function setFood(f) {
r_food = f;
theInterface.setFood(f);
}
function setNetEnergy(e) {
energyNet = e;
theInterface.setEnergyNet(e);
}
function setNetFood(f) {
foodNet = f;
theInterface.setFoodNet(f);
}
function checkForAlerts() {
if ((energyNet < 0) && (foodNet < 0)) {
doMessageAlert("efDefecit");
} else if (energyNet < 0) {
doMessageAlert("eDefecit");
} else if (foodNet < 0) {
doMessageAlert("fDefecit");
}
}
function setMetal(m) {
r_metal = m;
theInterface.setMetal(m);
}
function setGas(g) {
r_gas = g;
theInterface.setGas(g);
}
function setFF(ff) {
r_FF = ff;
theInterface.setFF(ff);
}
function setResearch(r) {
r_research = r;
theInterface.setResearch(r);
}
function calculateNets() {
var _local3 = 0;
var _local4 = 0;
if (fleetFuelType == K.ELECTRIC) {
var _local2 = 0;
while (_local2 < uArray.length) {
if (uArray[_local2].myIndex == K.ENGINEER) {
_local3 = _local3 - uArray.fuelConsumption;
} else {
_local3 = _local3 - (uArray.fuelConsumption * 3);
}
_local2++;
}
}
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (((bldgArray[_local2].disabled == false) && (bldgArray[_local2].asleep == false)) && (bldgArray[_local2].isAlert == false)) {
if ((bldgArray[_local2].myIndex == K.FACTORY) || (bldgArray[_local2].myIndex == K.LAB)) {
if (bldgArray[_local2].producing == true) {
_local3 = _local3 - ((bldgArray[_local2].energyIn * K.REPAIRTIME) / K.FAST_TICK_AMOUNT);
}
} else {
_local3 = _local3 + bldgArray[_local2].energyOut;
_local3 = _local3 - bldgArray[_local2].energyIn;
_local4 = _local4 + bldgArray[_local2].foodOut;
}
if (bldgArray[_local2].eatsFood) {
if (dayTime == K.DAY) {
_local4 = _local4 - bldgArray[_local2].foodIn;
}
}
}
_local2++;
}
_local3 = Math.round(_local3);
_local4 = Math.round(_local4);
setNetEnergy(_local3);
setNetFood(_local4);
}
function farmDrain() {
setEnergy(r_energy - K.E_IN_FARM);
}
function gasPlantDrain() {
setGas(r_gas - 1);
}
function labDrain(e, m) {
setEnergy(r_energy - e);
setMetal(r_metal - m);
}
function factoryDrain(e, m) {
setEnergy(r_energy - e);
setMetal(r_metal - m);
}
function makeFF(f) {
setFF(r_FF + f);
}
function makeResearch(r) {
setResearch(r_research + r);
}
function drainFF(f) {
setFF(r_FF - f);
}
function drainResearch(r) {
setResearch(r_research - r);
}
function makeGas(g) {
setGas(r_gas + g);
}
function drainGas(g) {
setGas(r_gas - g);
}
function makeEnergy(e) {
setEnergy(r_energy + e);
}
function drainEnergy(e) {
setEnergy(r_energy - e);
}
function makeFood(f) {
setFood(r_food + f);
}
function drainFood(f) {
setFood(r_food - f);
}
function makeMetal(m) {
setMetal(r_metal + m);
}
function drainMetal(m) {
setMetal(r_metal - m);
}
function unitFFDrain() {
setFF(r_FF - 1);
}
function FFPlantDrain() {
setFF(r_FF - 1);
}
function foodDrain(f) {
setFood(r_food - f);
}
function energyDrain(e) {
setEnergy(r_energy - e);
}
function mineDrain() {
setEnergy(r_energy - K.E_IN_MINE);
}
function farmMake() {
setFood(r_food + 5);
}
function superFarmMake() {
setFood(r_food + 10);
}
function gasPlantMake() {
setEnergy(r_energy + 20);
}
function giveMetal(m) {
setMetal(r_metal + m);
}
function FFPlantMake() {
setEnergy(r_energy + 30);
}
function mineMake() {
setMetal(r_metal + 5);
}
function lessThanMaxResearch() {
if (r_research < 999) {
return(true);
}
return(false);
}
function lessThanMaxFood() {
if (r_food < 999) {
return(true);
}
return(false);
}
function lessThanMaxMetal() {
if (r_metal < 999) {
return(true);
}
return(false);
}
function hasFood(amt) {
if (r_food >= amt) {
return(true);
}
return(false);
}
function hasEnergy(amt) {
if (r_energy >= amt) {
return(true);
}
return(false);
}
function hasResearch(amt) {
if (r_research >= amt) {
return(true);
}
return(false);
}
function hasMetal(amt) {
if (r_metal >= amt) {
return(true);
}
return(false);
}
function hasGas(amt) {
if (r_gas >= amt) {
return(true);
}
return(false);
}
function hasFF(amt) {
if (r_FF >= amt) {
return(true);
}
return(false);
}
function lessThanMaxGas() {
if (r_gas < 999) {
return(true);
}
return(false);
}
function lessThanMaxFF() {
if (r_FF < 999) {
return(true);
}
return(false);
}
function lessThanMaxEnergy() {
if (r_energy < 999) {
return(true);
}
return(false);
}
function interfaceHasFocus() {
interfaceFocus = true;
if (buildCursor) {
buildIcon.deactivate();
}
}
function interfaceLoseFocus() {
interfaceFocus = false;
if (buildCursor) {
buildIcon.activate();
}
}
function showCursor(str) {
if (K.FANCYCURSOR == true) {
cursor.showCursor(str);
cursor._visible = true;
} else {
cursor.showCursor("_" + str);
cursor._visible = true;
}
currCursor = str;
}
function updateCursor() {
showCursor(currCursor);
}
function cursorOnTop(d) {
cursor.swapDepths(d);
}
function levelDataLoaded(type) {
loadData(type);
}
function loadData(type) {
if (type == K.TILES) {
theTerrain.makeMap();
} else if (type == K.PROPERTIES) {
if (lData.noMansLand[0] == true) {
makeNoMansLand(0, K.VERTICAL);
}
if (lData.noMansLand[1] == true) {
makeNoMansLand(1, K.VERTICAL);
}
if (lData.noMansLand[2] == true) {
makeNoMansLand(0, K.HORIZONTAL);
}
if (lData.noMansLand[3] == true) {
makeNoMansLand(1, K.HORIZONTAL);
}
makeStartLocation();
}
}
function makeStartGarbage() {
var _local3 = 0;
while (_local3 < lData.gArray.length) {
var _local2 = 0;
while (_local2 < lData.gArray[_local3].length) {
if (lData.gArray[_local3][_local2] != 0) {
if (lData.gArray[_local3][_local2] < 0) {
makeResourceUnit(_local2 * 2, _local3 * 2, Math.abs(lData.gArray[_local3][_local2]), "nWaste");
} else {
makeGarbageUnit(_local2 * 2, _local3 * 2, lData.gArray[_local3][_local2], false);
}
}
_local2++;
}
_local3++;
}
}
function makeStartLocation() {
var _local3 = lData.getStartLoc();
var _local2 = 0;
while (_local2 < _local3.length) {
buildBuilding(_local3[_local2][0], _local3[_local2][1], "fortress", false, true);
_local2++;
}
makeStartGarbage();
disableThings();
makeStartBuildings();
setDefecits();
startDayTime();
gotoTextThing();
}
function enableThing(str) {
var _local4 = 0;
while (_local4 < lData.disables.length) {
if (lData.disables[_local4].toLowerCase() == str.toLowerCase()) {
if (((str.toLowerCase() == "floodlights") || (str.toLowerCase() == "gunturret")) || (str.toLowerCase() == "teslacoil")) {
var _local2 = 0;
while (_local2 < lData.disables.length) {
if (lData.disables[_local2].toLowerCase() == "defenses") {
lData.disables.splice(_local2, 1);
theInterface["showGlowy" + str]();
}
_local2++;
}
}
lData.disables.splice(_local4, 1);
}
_local4++;
}
if (str.toLowerCase() == "gas") {
lData.setVisibleResource(4, true);
setResourceVisibility();
} else if (str.toLowerCase() == "food") {
lData.setVisibleResource(1, true);
setResourceVisibility();
} else if (str.toLowerCase() == "energy") {
lData.setVisibleResource(0, true);
setResourceVisibility();
} else if (str.toLowerCase() == "ff") {
lData.setVisibleResource(5, true);
setResourceVisibility();
} else if (str.toLowerCase() == "metal") {
lData.setVisibleResource(3, true);
setResourceVisibility();
} else if (str.toLowerCase() == "smog") {
lData.setVisibleResource(2, true);
setResourceVisibility();
}
theInterface["showGlowy" + str]();
}
function disableThings() {
theInterface.disableAllFuelsExcept(fleetFuelString);
var _local2 = 0;
while (_local2 < lData.disables.length) {
theInterface["disable" + lData.disables[_local2]]();
_local2++;
}
}
function setDefecits() {
energyDefecits = lData.energyDefecits;
foodDefecits = lData.foodDefecits;
}
function makeStartBuildings() {
var _local3 = lData.getBuildingArray();
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = false;
if (_local3[_local2].name.substr(0, 5) == "super") {
_local4 = true;
_local3[_local2].p = _local3[_local2].p.substr(5, _local3[_local2].p.length - 5);
}
buildBuilding(_local3[_local2].xLoc, _local3[_local2].yLoc, _local3[_local2].p, _local4, true);
_local2++;
}
}
function startDayTime() {
var _local2 = lData.getStartDayTime();
if (_local2 == K.DAY) {
setDayImmediately();
} else if (_local2 == K.NIGHT) {
setNightImmediately();
}
}
function makeNoMansLand(i, dir) {
var _local2 = 0;
switch (i) {
case 0 :
if (dir == K.HORIZONTAL) {
i = 0;
while (i <= (K.MAX_X_TILE / 2)) {
drawTerrainTile(i * 2, -1.5, K.SCORCHED, K.HORIZONTAL);
lData.setProp(_local2, 0, K.SCORCHED);
lData.setProp(_local2 + 1, 0, K.SCORCHED);
_local2 = _local2 + 2;
i++;
}
} else if (dir == K.VERTICAL) {
i = -1;
while (i < (K.MAX_Y_TILE / 2)) {
drawTerrainTile(-1, i * 2, K.SCORCHED, K.VERTICAL);
lData.setProp(0, _local2, K.SCORCHED);
lData.setProp(0, _local2 + 1, K.SCORCHED);
_local2 = _local2 + 2;
i++;
}
}
break;
case 1 :
if (dir == K.HORIZONTAL) {
i = 0;
while (i <= (K.MAX_X_TILE / 2)) {
drawTerrainTile(i * 2, K.MAX_Y_TILE - 0.5, K.SCORCHED, K.HORIZONTAL);
lData.setProp(_local2, K.MAX_Y_TILE, K.SCORCHED);
lData.setProp(_local2 + 1, K.MAX_Y_TILE, K.SCORCHED);
_local2 = _local2 + 2;
i++;
}
} else {
if (dir != K.VERTICAL) {
break;
}
i = 0;
for(;;){
if (i >= (K.MAX_Y_TILE / 2)) {
break;
}
drawTerrainTile(K.MAX_X_TILE, i * 2, K.SCORCHED, K.VERTICAL);
lData.setProp(K.MAX_X_TILE, _local2, K.SCORCHED);
lData.setProp(K.MAX_X_TILE, _local2 + 1, K.SCORCHED);
_local2 = _local2 + 2;
i++;
};
}
}
}
function onMapDrawn() {
attachMovie("mc_buildIcon", "buildIcon", getNextHighestDepth());
buildIcon.setMaster(this);
theInterface.swapDepths(buildIcon);
attachMovie("mc_arrow", "cursor", getNextHighestDepth());
cursor.setMaster(this);
var _local2 = new flash.filters.DropShadowFilter();
_local2.angle = 135;
_local2.strength = 0.5;
_local2.blurX = 5;
_local2.blurY = 5;
_local2.distance = 2;
var _local3 = cursor.filters;
_local3.push(_local2);
cursor.filters = _local3;
}
function showError(str) {
playSound(1, "error2.wav", 1);
showMessage(str);
}
function doMessageAlert(str, thing) {
if (str == "eDefecit") {
if (energyDefecits) {
theAlert = str;
alertNextFrame = true;
}
} else if (str == "fDefecit") {
if (foodDefecits) {
theAlert = str;
alertNextFrame = true;
}
} else if (str == "efDefecit") {
if (foodDefecits && (energyDefecits)) {
theAlert = str;
alertNextFrame = true;
}
} else {
theAlert = str;
alertNextFrame = true;
}
alertTarget = thing;
}
function messageAlert(str) {
if (str == "starvation") {
showMessage("People are starving! Build farms!");
playSound(1, "alert.wav", 1);
theInterface.showGlowyFarm();
} else if (str == "eDefecit") {
if (energyDefecits) {
showMessage("Energy Defecit!");
playSound(1, "alert.wav", 1);
theInterface.showGlowyEnergy();
theInterface.showGlowyPowerPlant();
}
} else if (str == "fDefecit") {
if (foodDefecits) {
showMessage("Food Defecit!");
playSound(1, "alert.wav", 1);
theInterface.showGlowyFarm();
theInterface.showGlowyFood();
}
} else if (str == "efDefecit") {
if (foodDefecits && (energyDefecits)) {
showMessage("Food AND Energy Defecit!");
playSound(1, "alert.wav", 1);
theInterface.showGlowyEnergy();
theInterface.showGlowyFood();
theInterface.showGlowyFarm();
theInterface.showGlowyPowerPlant();
}
} else if (str == "gPollute") {
showMessage("Garbage is polluting! Build engineers!");
playSound(1, "alert.wav", 1);
alertZoom();
theInterface.showGlowyFactory();
} else if (str == "gWarning") {
showMessage("Garbage levels critical! Build garbage trucks!");
playSound(1, "alert.wav", 1);
alertZoom();
theInterface.showGlowyFactory();
} else if (str == "mPickupAlert") {
showMessage("Metal is piling up! Make some engineers to get it!");
playSound(1, "alert.wav", 1);
alertZoom();
theInterface.showGlowyFactory();
} else if (str == "nWastePickupAlert") {
showMessage("Nuclear waste levels critical! Make some engineers to get it!");
playSound(1, "alert.wav", 1);
alertZoom();
theInterface.showGlowyFactory();
} else if (str == "noWasteDump") {
showMessage("Nowhere to take Nuclear Waste! Build a N. Waste Dump!");
playSound(1, "alert.wav", 1);
alertZoom();
theInterface.showGlowyFactory();
} else if (str == "noLandfill") {
if ((landfillAlertReady == true) && (landfillAlertReady != undefined)) {
landfillAlertReady = false;
showMessage("Nowhere to take garbage! Build a landfill!");
playSound(1, "alert.wav", 1);
theInterface.showGlowyLandFill();
}
}
}
function repairSelected() {
selectedThing.repairMe();
}
function alertZoom() {
if (alertTarget != undefined) {
var _local3 = drawLayer.getNextHighestDepth();
var _local2 = drawLayer.attachMovie("mc_zoomCircle", "theZoomer_" + _local3, _local3);
if (((alertTarget.myIndex == K.WASTE) || (alertTarget.isResource == true)) || (alertTarget.typeOfThing == K.UNIT)) {
_local2._x = alertTarget._x + (alertTarget._width / 2);
_local2._y = alertTarget._y - (alertTarget._height / 2);
} else {
_local2._x = alertTarget._x + (alertTarget._width / 2);
_local2._y = alertTarget._y;
}
alertTarget = undefined;
}
}
function showMessage(str) {
theInterface.showMessage(str);
}
function unitButton(str) {
if (str == "cleanup") {
}
}
function actionButton(str) {
if (str == "repair") {
theInterface.demolishOff();
if (actionMode == K.REPAIR) {
theInterface.repairOff();
defaultAction();
} else {
actionMode = K.REPAIR;
theInterface.repairOn();
showCursor(str);
}
} else if (str == "demolish") {
theInterface.repairOff();
if (actionMode == K.DEMOLISH) {
theInterface.demolishOff();
defaultAction();
} else {
actionMode = K.DEMOLISH;
theInterface.demolishOn();
showCursor(str);
}
}
}
function defaultAction() {
if (actionMode == K.DEMOLISH) {
theInterface.demolishOff();
} else if (actionMode == K.REPAIR) {
theInterface.repairOff();
}
actionMode = K.CLICK;
normalCursor();
}
function moveMode() {
buildCursor = false;
actionMode = K.MOVE;
}
function doBuildCursor(str) {
buildMode(str);
showCursor("build");
}
function buildMode(str) {
buildCursor = true;
actionMode = K.BUILD;
buildIcon.activate(str);
}
function unBuildMode() {
buildCursor = false;
actionMode = K.CLICK;
theTerrain.unBuildMode();
buildIcon.deactivate();
}
function onPressTerrain() {
dragBoxCoords = [cursor._x, cursor._y];
dragBoxOn = true;
}
function onClickInterfaceRegion() {
onClickTerrain();
unClickEverything();
playSound(0, "click2.wav", 1);
}
function onClickTerrain() {
dragBoxOn = false;
eraseDragBox();
var _local2 = Math.abs(dragBoxCoords[0] - cursor._x);
var _local3 = Math.abs(dragBoxCoords[1] - cursor._y);
if ((_local2 < K.TILE_SIZE) || (_local3 < K.TILE_SIZE)) {
doClickThing();
} else {
doDragThing();
}
}
function onClickTerrainOutside() {
if (dragBoxOn) {
onClickTerrain();
}
}
function onClickInterface() {
}
function doDragThing() {
unClickEverything();
var _local5 = false;
var _local3 = 0;
var _local4 = false;
var _local2 = 0;
while (_local2 < uArray.length) {
if (((uArray[_local2]._x + (uArray[_local2]._width / 2)) >= dragBoxBound[0]) && ((uArray[_local2]._x - (uArray[_local2]._width / 2)) <= dragBoxBound[2])) {
if (_local3 < 9) {
if (((uArray[_local2]._y + (uArray[_local2]._height / 2)) >= dragBoxBound[1]) && ((uArray[_local2]._y - (uArray[_local2]._width / 2)) <= dragBoxBound[3])) {
if (uArray[_local2].myIndex != K.GARBAGETRUCK) {
if (_local4 == false) {
startMultiSelect();
_local4 = true;
}
uArray[_local2].multiSelectMe(_local3);
_local3++;
_local5 = true;
}
}
}
}
_local2++;
}
if (_local5) {
onMultiSelect();
}
}
function startMultiSelect() {
selectedThings = new Array();
}
function onMultiSelect() {
multiSelect = true;
playSound(1, selectedThings[0].selectSound, 1);
}
function onJuicyButtonClick(isDown) {
stickyClicky = isDown;
}
function doClickThing() {
switch (actionMode) {
case K.REPAIR :
unClickEverything();
defaultAction();
playSound(0, "click2.wav", 1);
break;
case K.DEMOLISH :
unClickEverything();
defaultAction();
playSound(0, "click2.wav", 1);
break;
case K.BUILD :
playSound(0, "click2.wav", 1);
break;
case K.MOVE :
if (!multiSelect) {
moveUnit(cursor._x, cursor._y);
playSound(1, selectedThing.affirmSound, 1);
} else {
playSound(1, selectedThings[0].affirmSound, 1);
moveUnits(cursor._x, cursor._y);
}
break;
default :
unClickEverything();
playSound(0, "click2.wav", 1);
}
if (buildCursor) {
var _local3 = checkTerrain(buildIcon.tileX, buildIcon.tileY, buildIcon.myString);
if (_local3 == 1) {
var _local2 = checkPurchase(buildIcon.myString);
if (_local2 == 1) {
buildBuilding(buildIcon.tileX, buildIcon.tileY, buildIcon.myString, false);
} else if (_local2 == -1) {
errorBuilding(0, 1, 0);
} else if (_local2 == -2) {
errorBuilding(0, 0, 1);
} else if (_local2 == -3) {
errorBuilding(0, 1, 1);
} else {
errorBuilding(0, 0, 0);
}
} else if (_local3 == 2) {
var _local2 = checkPurchase(buildIcon.myString);
if (_local2 == 1) {
buildBuilding(buildIcon.tileX, buildIcon.tileY, buildIcon.myString, true);
} else if (_local2 == -1) {
errorBuilding(0, 1, 0);
} else if (_local2 == -2) {
errorBuilding(0, 0, 1);
} else if (_local2 == -3) {
errorBuilding(0, 1, 1);
} else {
errorBuilding(0, 0, 0);
}
} else {
errorBuilding(1, 0, 0);
}
}
}
function multiSelectUnit(s, n, what) {
var _local4 = false;
var _local2 = 0;
while (_local2 < selectedThings.length) {
if (selectedThings[_local2] == what) {
_local4 = true;
}
_local2++;
}
if (!_local4) {
selectedThings.push(what);
}
var _local3 = new Object();
_local2 = 0;
while (_local2 < 9) {
if (selectedThings[_local2] != undefined) {
_local3["u" + _local2] = selectedThings[_local2].myMenu;
} else {
_local3["u" + _local2] = "nothing";
}
_local2++;
}
theInterface.showUnitMenu("imultiUnits", n, _local3);
selectedThing = undefined;
enemyTargetted = false;
}
function selectEnemy(s, n, what) {
theInterface.showEnemyMenu("i" + s, n);
selectedThing = what;
playSound(1, selectedThing.selectSound, 1);
enemyTargetted = true;
}
function selectUnit(s, n, what) {
theInterface.showUnitMenu("i" + s, n);
selectedThing = what;
playSound(1, selectedThing.selectSound, 1);
}
function moveUnit(xx, yy) {
var _local4 = getUnitLocX(xx);
var _local3 = getUnitLocY(yy);
var _local2 = drawLayer.attachMovie("mc_ripple", "theRipple", drawLayer.getNextHighestDepth());
_local2._x = xx;
_local2._y = yy;
selectedThing.moveToLoc(_local4, _local3, xx, yy);
if (!stickyClicky) {
unClickEverything();
}
}
function moveUnits(xx, yy) {
var _local6 = getUnitLocX(xx);
var _local5 = getUnitLocY(yy);
if (_local6 < 2) {
_local6 = 2;
} else if (_local6 > (K.MAX_X_UNIT_TILE - 2)) {
_local6 = K.MAX_X_UNIT_TILE - 2;
}
if (_local5 < 2) {
_local5 = 2;
} else if (_local5 > (K.MAX_Y_UNIT_TILE - 2)) {
_local5 = K.MAX_Y_UNIT_TILE - 2;
}
var _local7 = drawLayer.attachMovie("mc_ripple", "theRipple", drawLayer.getNextHighestDepth());
_local7._x = xx;
_local7._y = yy;
var _local4 = 0;
while (_local4 < selectedThings.length) {
var _local3 = _local6;
var _local2 = _local5;
switch (_local4) {
case 0 :
_local3 = _local3 - 2;
_local2 = _local2 - 2;
break;
case 1 :
_local2 = _local2 - 2;
break;
case 2 :
_local2 = _local2 - 2;
_local3 = _local3 + 2;
break;
case 3 :
_local3 = _local3 - 2;
break;
case 4 :
break;
case 5 :
_local3 = _local3 + 2;
break;
case 6 :
_local2 = _local2 + 2;
_local3 = _local3 - 2;
break;
case 7 :
_local2 = _local2 + 2;
break;
case 8 :
_local2 = _local2 + 2;
_local3 = _local3 + 2;
}
selectedThings[_local4].moveToLoc(_local3, _local2);
_local4++;
}
if (!stickyClicky) {
unClickEverything();
}
}
function selectBuilding(s, n, what) {
theInterface.showBuildingMenu("i" + s, n, what);
selectedThing = what;
}
function doUpgrade(target, upgrade, type, cost) {
var _local2 = checkEnoughRE(cost[0], cost[1]);
switch (_local2) {
case 1 :
upgradeSomething(target, upgrade, type);
break;
case -1 :
errorResearch(0, 1, 0);
break;
case -2 :
errorResearch(0, 0, 1);
break;
case -3 :
errorResearch(0, 1, 1);
}
}
function upgradeSomething(target, upgrade, type) {
var _local5 = K.upgradeLevel(target, upgrade);
var _local3;
if (type == K.BUILDING) {
_local3 = bldgArray;
} else if (type == K.UNIT) {
_local3 = uArray;
}
var _local2 = 0;
while (_local2 < _local3.length) {
if ((_local3[_local2].myMenu.toLowerCase() == target) || (target.toLowerCase() == "fuel")) {
_local3[_local2].setUpgradeLevel(upgrade, _local5);
}
_local2++;
}
if (target == "fuel") {
theInterface.showFuelLevels();
} else {
theInterface.showLevels(target);
}
}
function checkEnoughRE(rCost, eCost) {
if (rCost <= r_research) {
if (eCost <= r_energy) {
setResearch(r_research - rCost);
setEnergy(r_energy - eCost);
return(1);
}
return(-2);
}
if (eCost < r_energy) {
return(-3);
}
return(-1);
}
function checkEnoughEM(eCost, mCost) {
if ((r_energy - eCost) >= 0) {
if ((r_metal - mCost) >= 0) {
setEnergy(r_energy - eCost);
setMetal(r_metal - mCost);
return(1);
}
return(-2);
}
if ((r_metal - mCost) < 0) {
return(-3);
}
return(-1);
}
function checkPurchase(s) {
var _local2 = K.getCost(s)[0];
var _local3 = K.getCost(s)[1];
return(checkEnoughEM(_local2, _local3, 0));
}
function getBuildingDepth(xx, yy) {
var _local1 = (yy * K.MAX_X_TILE) + xx;
return(_local1);
}
function getResourceDepth(xx, yy) {
return(resourceLayer.getNextHighestDepth());
}
function getGarbageDepth(xx, yy) {
return(resourceLayer.getNextHighestDepth());
}
function polluteTile(xx, yy) {
var _local3 = false;
var _local4;
var _local2 = 0;
while (_local2 < lArray.length) {
if ((lArray[_local2].xx == xx) && (lArray[_local2].yy == yy)) {
_local3 = true;
_local4 = lArray[_local2];
}
_local2++;
}
if (!_local3) {
drawTerrainTileOffset(xx, yy, K.POLLUTED);
} else {
_local4.setHp(100);
}
}
function drawTerrainTileOffset(xx, yy, type, dir) {
xx = xx - 0.5;
yy = yy - 1;
drawTerrainTile(xx, yy, type, dir);
}
function drawTerrainTile(xx, yy, type, dir) {
var _local4 = underLayer.getNextHighestDepth();
var _local2 = underLayer.attachMovie("mc_terrainSquare", "terr_" + _local4, _local4);
_local2._x = getBuildingX(xx);
_local2._y = getBuildingY(yy);
var _local3;
switch (type) {
case K.DIRT :
_local3 = "dirt";
break;
case K.POLLUTED :
_local3 = "polluted";
break;
case K.SCORCHED :
_local3 = "scorch";
}
switch (dir) {
case K.HORIZONTAL :
_local3 = _local3 + "_h";
break;
case K.VERTICAL :
_local3 = _local3 + "_v";
break;
}
_local2.gotoAndStop(_local3);
if (_local3 == "polluted") {
_local2.amSpill = true;
}
_local2.setHp(100);
_local2.setIndex(type);
_local2.setLoc(xx, yy);
_local2.setMaster(this);
lArray.push(_local2);
}
function deleteTerrainTile(t) {
var _local2 = 0;
while (_local2 < lArray.length) {
if (lArray[_local2] == t) {
lArray[_local2].splice(_local2, 1);
}
_local2++;
}
t.removeMovieClip();
}
function buildBuilding(xx, yy, thing, buildSuper, dontSelectIt) {
var _local3 = getBuildingDepth(xx, yy);
var _local2;
if (buildSuper) {
_local2 = groundLayer.attachMovie("mc_building_super_" + thing, "bldg_" + _local3, _local3);
} else {
_local2 = groundLayer.attachMovie("mc_building_" + thing, "bldg_" + _local3, _local3);
}
if (_local2 != undefined) {
_local2._x = getBuildingX(xx);
_local2._y = getBuildingY(yy);
cursor.swapDepths(_local2);
playSound(0, "thump.wav", 1);
_local2.setMaster(this);
_local2.setLoc(xx, yy);
bldgArray.push(_local2);
if (_local2.myIndex == K.FACTORY) {
checkFactoryFlag(_local2);
}
if (!Key.isDown(32)) {
normalCursor();
theInterface.goBackButton();
unClickEverything();
} else {
buildMode();
}
}
if (dayTime == K.NIGHT) {
if (_local2.doesSleep) {
_local2.showSleepAlert();
}
}
recalculateBuildingAttackLocs();
checkTutorialBeacon(_local2);
}
function checkTutorialBeacon(bldg) {
}
function recalculateBuildingAttackLocs() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
bldgArray[_local2].calculateAttackVacancy();
_local2++;
}
}
function deleteBuilding(b) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2] == b) {
bldgArray.splice(_local2, 1);
}
_local2++;
}
recalculateBuildingAttackLocs();
}
function normalCursor() {
showCursor("cursor");
unBuildMode();
}
function checkFactoryFlag(b) {
var _local3 = true;
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myIndex == K.FACTORY) {
if (bldgArray[_local2].deployHere == true) {
_local3 = false;
}
}
_local2++;
}
if (_local3) {
b.setMeUp = function () {
this.deployTheFlag();
};
}
}
function undeployFactoryFlags() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myIndex == K.FACTORY) {
if (bldgArray[_local2].deployHere == true) {
bldgArray[_local2].undeployTheFlag();
}
}
_local2++;
}
}
function deleteGarbage(g) {
var _local2 = 0;
while (_local2 < gArray.length) {
if (gArray[_local2] == g) {
gArray.splice(_local2, 1);
g.deleteMe();
break;
}
_local2++;
}
}
function deleteResourceToken(r) {
var _local2 = 0;
while (_local2 < rArray.length) {
if (rArray[_local2] == r) {
rArray.splice(_local2, 1);
}
_local2++;
}
r.deleteMe();
}
function checkResourceThere(xT, yT) {
var _local2 = 0;
while (_local2 < rArray.length) {
if ((rArray[_local2].xTile == xT) && (rArray[_local2].yTile == yT)) {
return(rArray[_local2]);
}
_local2++;
}
return(undefined);
}
function checkGarbageThere(xT, yT) {
var _local2 = 0;
while (_local2 < gArray.length) {
if ((gArray[_local2].xTile == xT) && (gArray[_local2].yTile == yT)) {
return(gArray[_local2]);
}
_local2++;
}
return(undefined);
}
function makeResourceUnit(xT, yT, amt, theKind) {
var _local3 = checkResourceThere(xT, yT);
var _local4 = false;
if (_local3 != undefined) {
if (_local3.myMenu.toLowerCase() == theKind.toLowerCase()) {
_local3.addAmount(amt);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
if (_local4 == true) {
var _local2;
var _local7 = getResourceDepth(xT, yT);
_local2 = resourceLayer.attachMovie("mc_" + theKind, "resource_" + _local7, _local7);
_local2.setMaster(this);
if (_local2 != undefined) {
_local2._x = getUnitX(xT);
_local2._y = getUnitY(yT);
_local2.setLoc(xT, yT);
_local2.setAmount(amt);
rArray.push(_local2);
}
cursor.swapDepths(_local2);
return(_local2);
}
return(_local3);
}
function makeGarbageUnit(xT, yT, amt, isRubble) {
var _local4 = checkGarbageThere(xT, yT);
var _local3 = false;
if (_local4 != undefined) {
if (_local4.isRubble == isRubble) {
_local4.addGarbage(amt);
} else {
_local3 = true;
}
} else {
_local3 = true;
}
if (_local3 == true) {
var _local2;
var _local7 = getGarbageDepth(xT, yT);
_local2 = resourceLayer.attachMovie("mc_garbage", "garbage_" + _local7, _local7);
_local2.setMaster(this);
if (_local2 != undefined) {
_local2._x = getUnitX(xT);
_local2._y = getUnitY(yT);
_local2.setLoc(xT, yT);
_local2.setAmount(amt);
if (isRubble) {
_local2.setRubble();
}
gArray.push(_local2);
}
cursor.swapDepths(_local2);
return(_local2);
}
}
function makeNWaste(x1, y1, x2, y2, amt) {
var _local2;
var _local5 = y1;
while (_local5 <= y2) {
var _local3 = x1;
while (_local3 <= x2) {
var _local7 = getGarbageDepth(_local3, _local5);
_local2 = resourceLayer.attachMovie("mc_nwaste", "nwaste_" + _local7, _local7);
_local2.setMaster(this);
if (_local2 != undefined) {
_local2._x = getBuildingX(x1) + ((_local3 - x1) * K.TILE_SIZE);
_local2._y = getBuildingY(y1) + ((_local5 - y1) * K.TILE_SIZE);
_local2.setLoc((x1 * 2) + (_local3 - x1), (y1 * 2) + (_local5 - y1));
_local2.setAmount(amt);
rArray.push(_local2);
}
_local3++;
}
_local5++;
}
cursor.swapDepths(_local2);
}
function makeGarbage(x1, y1, x2, y2, amt, isRubble) {
var _local2;
var _local5 = y1;
while (_local5 <= y2) {
var _local3 = x1;
while (_local3 <= x2) {
var _local7 = getGarbageDepth(_local3, _local5);
_local2 = resourceLayer.attachMovie("mc_garbage", "garbage_" + _local7, _local7);
_local2.setMaster(this);
if (_local2 != undefined) {
_local2._x = getBuildingX(x1) + ((_local3 - x1) * K.TILE_SIZE);
_local2._y = getBuildingY(y1) + ((_local5 - y1) * K.TILE_SIZE);
_local2.setLoc((x1 * 2) + (_local3 - x1), (y1 * 2) + (_local5 - y1));
_local2.setAmount(amt);
if (isRubble) {
_local2.setRubble();
}
gArray.push(_local2);
}
_local3++;
}
_local5++;
}
cursor.swapDepths(_local2);
}
function makeSmog(xx, yy, amt) {
var _local3 = smogLayer.getNextHighestDepth();
var _local2 = smogLayer.attachMovie("mc_smog", "smog_" + _local3, _local3);
if (_local2 != undefined) {
_local2._x = xx;
_local2._y = yy;
_local2.setAmount(amt);
_local2.setMaster(this, sArray.length - 1);
}
cursor.swapDepths(_local2);
}
function onSmogLeave(s) {
addSmog(s.amount);
s.removeMovieClip();
}
function getUnitLocX(xx) {
return(Math.floor(xx / K.TILE_SIZE));
}
function getUnitLocY(yy) {
yy = yy - K.INT_OFF_Y_PX;
return(Math.floor(yy / K.TILE_SIZE));
}
function getBuildingLocX(xx) {
return(Math.floor(getUnitLocX(xx) / 2));
}
function getBuildingLocY(yy) {
return(Math.floor(getUnitLocY(yy) / 2));
}
function getUnitX(xx) {
return(xx * K.TILE_SIZE);
}
function getUnitY(yy) {
return((yy * K.TILE_SIZE) + ((K.TERRAIN_OFFSET_Y * K.TILE_SIZE) * 2));
}
function getBuildingX(xx) {
return((xx * K.TILE_SIZE) * 2);
}
function getBuildingY(yy) {
return(((yy + K.TERRAIN_OFFSET_Y) * K.TILE_SIZE) * 2);
}
function errorResearch(a, b, c) {
playSound(0, "error2.wav", 1);
if (a == 1) {
} else if ((b == 1) && (c == 1)) {
showError("Need more research points and energy to implement upgrade!");
theInterface.r_energy.error();
theInterface.r_research.error();
} else if (c == 1) {
showError("Need more energy to implement upgrade!");
theInterface.r_energy.error();
} else if (b == 1) {
showError("Need more research points!");
theInterface.r_research.error();
}
}
function errorBuilding(a, b, c) {
playSound(0, "error2.wav", 1);
if (a == 1) {
showError("Can't build there!");
} else if ((b == 1) && (c == 1)) {
showError("We need more energy and metal!");
theInterface.r_energy.error();
theInterface.r_metal.error();
normalCursor();
theInterface.goBackButton();
} else if (b == 1) {
showError("We need more energy!");
theInterface.r_energy.error();
normalCursor();
theInterface.goBackButton();
} else if (c == 1) {
showError("We need more metal!");
theInterface.r_metal.error();
normalCursor();
theInterface.goBackButton();
}
}
function unClickEverything() {
defaultAction();
var _local2 = 0;
while (_local2 < bldgArray.length) {
bldgArray[_local2].unClick();
_local2++;
}
_local2 = 0;
while (_local2 < gArray.length) {
gArray[_local2].unClick();
_local2++;
}
_local2 = 0;
while (_local2 < rArray.length) {
rArray[_local2].unClick();
_local2++;
}
_local2 = 0;
while (_local2 < uArray.length) {
uArray[_local2].unClick();
_local2++;
}
_local2 = 0;
while (_local2 < eArray.length) {
eArray[_local2].unClick();
_local2++;
}
selectedThings = undefined;
multiSelect = false;
theInterface.unClickBuildings();
enemyTargetted = false;
}
function checkTerrain(xx, yy, thing) {
if (((xx >= 0) && (yy <= K.MAX_X_TILE)) && ((yy >= 0) && (yy <= K.MAX_Y_TILE))) {
if (checkGarbageClear(xx, yy) && (checkBuildingClear(xx, yy))) {
if (thing == "Mine") {
switch (getProp(xx, yy)) {
case K.STONE :
return(1);
case K.HARD :
return(1);
case K.SCORCHED :
return(0);
}
return(0);
}
if (thing == "Farm") {
switch (getProp(xx, yy)) {
case K.DIRT :
return(1);
case K.GRASS :
return(2);
case K.SCORCHED :
return(0);
}
return(0);
}
if (thing == "GeoPlant") {
switch (getProp(xx, yy)) {
case K.GEO :
return(1);
case K.GEO_BIG :
return(2);
case K.SCORCHED :
return(0);
if (thing == "OilGasWell") {
switch (getProp(xx, yy)) {
case K.OIL :
return(1);
case K.OIL_BIG :
return(2);
}
return(0);
}
if (thing == "Landfill") {
switch (getProp(xx, yy)) {
case K.OIL :
return(0);
case K.OIL_BIG :
return(0);
case K.GEO_BIG :
return(0);
case K.SCORCHED :
return(0);
case K.WATER :
return(0);
case K.STONE :
return(0);
}
return(1);
}
switch (getProp(xx, yy)) {
case K.WATER :
return(0);
case K.STONE :
return(0);
case K.OIL :
return(0);
case K.OIL_BIG :
return(0);
case K.GEO_BIG :
return(0);
case K.SCORCHED :
return(0);
}
return(1);
}
}
if (thing == "OilGasWell") {
switch (getProp(xx, yy)) {
case K.OIL :
return(1);
case K.OIL_BIG :
return(2);
}
return(0);
}
if (thing == "Landfill") {
switch (getProp(xx, yy)) {
case K.OIL :
return(0);
case K.OIL_BIG :
return(0);
case K.GEO_BIG :
return(0);
case K.SCORCHED :
return(0);
case K.WATER :
return(0);
case K.STONE :
return(0);
}
return(1);
}
switch (getProp(xx, yy)) {
case K.WATER :
return(0);
case K.STONE :
return(0);
case K.OIL :
return(0);
case K.OIL_BIG :
return(0);
case K.GEO_BIG :
return(0);
case K.SCORCHED :
return(0);
}
return(1);
}
}
}
function checkBuildingClear(xx, yy) {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if ((Math.floor(bldgArray[_local2].xTile) == xx) && (Math.floor(bldgArray[_local2].yTile) == yy)) {
return(false);
}
_local2++;
}
return(true);
}
function checkGarbageClear(xx, yy) {
var _local2 = 0;
while (_local2 < gArray.length) {
if ((Math.floor(gArray[_local2].xTile / 2) == xx) && (Math.floor(gArray[_local2].yTile / 2) == yy)) {
return(false);
}
_local2++;
}
return(true);
}
function checkResourceClear(xx, yy) {
var _local2 = 0;
while (_local2 < rArray.length) {
if ((Math.floor(rArray[_local2].xTile / 2) == xx) && (Math.floor(rArray[_local2].yTile / 2) == yy)) {
return(false);
}
_local2++;
}
return(true);
}
function getProp(xx, yy) {
return(lData.getProp(xx, yy));
}
function getLvlPxWidth() {
return(lData.getPxWidth());
}
function getLvlPxHeight() {
return(lData.getPxHeight());
}
function getLvlWidth() {
return(lData.getWidth());
}
function getLvlHeight() {
return(lData.getHeight());
}
function getLvlTile(xx, yy) {
return(lData.getTile(xx, yy));
}
function getState() {
return(state);
}
function getOldState() {
return(oldState.toNum());
}
function switchState(toState) {
switch (state) {
case K.MENU_STATE :
if (toState == K.MENU_STATE) {
returnToState();
unPauseGame();
} else {
goToState(toState);
}
break;
case K.GAME_STATE :
goToState(toState);
break;
case K.START_STATE :
goToState(toState);
break;
case K.PAUSE_STATE :
if (toState == K.PAUSE_STATE) {
returnToState();
unPauseGame();
} else {
goToState(toState);
}
break;
default :
goToState(toState);
}
}
function goToState(newState) {
if (state != undefined) {
oldState.push(state);
}
if (newState == K.START_STATE) {
newState = K.MENU_STATE;
} else if (newState == K.PAUSE_STATE) {
newState = K.PAUSE_STATE;
pauseGame();
paused = true;
} else if (newState == K.MENU_STATE) {
newState = K.MENU_STATE;
pauseGame();
paused = true;
} else {
paused = false;
}
state = newState;
onStateChange();
}
function returnToState() {
var _local2 = oldState.pop();
if (_local2 != undefined) {
state = _local2;
onStateChange();
}
}
function onStateChange() {
switch (state) {
case K.MENU_STATE :
break;
case K.GAME_STATE :
break;
case K.START_STATE :
break;
case K.PAUSE_STATE :
}
}
function cheat(code) {
}
function react(theKey, wasPushed) {
switch (state) {
case K.MENU_STATE :
break;
case K.GAME_STATE :
reactToKey(theKey, wasPushed);
break;
case K.START_STATE :
break;
case K.PAUSE_STATE :
}
}
function reactMouse(theMouse, wasPushed) {
switch (state) {
case K.MENU_STATE :
break;
case K.GAME_STATE :
reactToMouse(theMouse, wasPushed);
break;
case K.START_STATE :
break;
case K.PAUSE_STATE :
}
}
function reactToKey(theKey, wasPushed) {
if (wasPushed) {
switch (theKey) {
case 48 :
cheat(0);
break;
case 49 :
cheat(1);
break;
case 50 :
cheat(2);
break;
case 51 :
cheat(3);
break;
case 52 :
cheat(4);
break;
case 53 :
cheat(5);
break;
case 54 :
cheat(6);
break;
case 55 :
cheat(7);
break;
case 56 :
cheat(8);
break;
case 57 :
cheat(9);
break;
case 82 :
repairSelected();
}
}
}
function hideMap() {
mapHidden = true;
}
function showMap() {
mapHidden = false;
}
function reactToMouse(theMouse, wasPushed) {
if (theInterface.sideRegion.hitTest(_xmouse, _ymouse)) {
interfaceHasFocus();
} else if (theInterface.topRegion.hitTest(_xmouse, _ymouse)) {
interfaceHasFocus();
} else if (theInterface.bottomRegion.hitTest(_xmouse, _ymouse)) {
interfaceHasFocus();
} else if (!mapHidden) {
if (theInterface.mapRegion.hitTest(_xmouse, _ymouse)) {
interfaceHasFocus();
} else {
interfaceLoseFocus();
}
} else if (mapHidden) {
if (theInterface.mapHideRegion.hitTest(_xmouse, _ymouse)) {
interfaceHasFocus();
} else {
interfaceLoseFocus();
}
} else {
interfaceLoseFocus();
}
}
function newGame(theLevel) {
switchState(K.GAME_STATE);
}
function quitGame() {
fscommand ("quit");
}
function fadeNightMusic(f) {
var counter = 50;
var back = this;
var i = setInterval(function () {
back.music2.setVolume(counter--);
back.music3.setVolume(counter--);
if (counter <= 0) {
back.music2.setVolume(K.MUSIC_VOLUME_MAX);
back.music3.setVolume(K.MUSIC_VOLUME_MAX);
back.music2.stop();
back.music3.stop();
f();
clearInterval(i);
}
}, 100);
}
function fadeDayMusic(f) {
var counter = 50;
var back = this;
var i = setInterval(function () {
back.music0.setVolume(counter--);
back.music1.setVolume(counter--);
if (counter <= 0) {
back.music0.stop();
back.back.music1.stop();
this.music0.setVolume(K.MUSIC_VOLUME_MAX);
back.music1.setVolume(K.MUSIC_VOLUME_MAX);
f();
clearInterval(i);
}
}, 100);
}
function musicDayTime() {
var back = this;
fadeNightMusic(function () {
back.playMusic(0, "music_windsofchange_game.mp3", -1);
});
}
function getLevelEnemies() {
return(lData.getLevelEnemies());
}
function musicThePump() {
playMusic(2, "music_getpumped.wav", -1);
}
function musicTheyApproach() {
var back = this;
fadeDayMusic(function () {
back.playMusic(2, "music_getpumped.wav", -1);
});
}
function spawnEnemies(n) {
if (n == undefined) {
n = getLevelEnemies();
}
var _local4 = Math.round(smogLevel / 250);
var _local6 = 0;
if ((n > 0) && (n != undefined)) {
var _local5 = false;
var _local2 = 0;
while (!_local5) {
_local2 = K.randRange(0, lArray.length);
if (lArray[_local2].myIndex == K.SCORCHED) {
makeABadGuy(_local2, n, _local4, 0);
_local6++;
if (_local6 >= n) {
_local5 = true;
}
}
}
_local2 = 0;
while (_local2 < lArray.length) {
if (lArray[_local2].myIndex == K.POLLUTED) {
makeABadGuy(_local2, n, _local4, 0);
makeABadGuy(_local2, n, _local4, 1);
}
_local2++;
}
}
}
function makeABadGuy(i, n, levelUps, offset) {
if (offset == undefined) {
offset = 0;
}
var _local3 = lArray[i].xUnitLoc;
var _local2 = lArray[i].yUnitLoc;
if (_local3 >= 40) {
_local3 = 42;
}
if (_local2 >= 29) {
_local2 = 31;
}
makeEnemyAt((_local3 + 1) + offset, (_local2 + 1) + offset, "edderkopp", levelUps);
return(false);
}
function playMusic(num, file, loops) {
if (loops == -1) {
loops = 9999;
}
var _local2;
switch (num) {
case 0 :
_local2 = music0;
break;
case 1 :
_local2 = music1;
break;
case 2 :
_local2 = music2;
break;
case 3 :
_local2 = music3;
}
_local2.setVolume(K.MUSIC_VOLUME_MAX);
_local2.attachSound(file);
_local2.start(0, loops);
}
function playSwitchSound(file, loops) {
if (switchSounder == 0) {
switchSounder = 1;
playSound(2, file, loops);
} else if (switchSounder == 1) {
switchSounder = 0;
playSound(3, file, loops);
}
}
function playSound(num, file, loops) {
switch (num) {
case 0 :
fxInterface.attachSound(file);
fxInterface.start(0, loops);
break;
case 1 :
fxGame.attachSound(file);
fxGame.start(0, loops);
break;
case 2 :
fxGame2.attachSound(file);
fxGame2.start(0, loops);
break;
case 3 :
fxGame3.attachSound(file);
fxGame3.start(0, loops);
break;
}
}
function updateMusicVolume() {
music0.setVolume(K.MUSIC_VOLUME_MAX);
music1.setVolume(K.MUSIC_VOLUME_MAX);
music2.setVolume(K.MUSIC_VOLUME_MAX);
music3.setVolume(K.MUSIC_VOLUME_MAX);
}
function killResearch() {
K.killResearch();
}
function quitTheGame() {
killResearch();
master.directorQuit(lData.getCurrLevelIndex());
}
function updateFxVolume() {
fxGame.setVolume(K.FX_VOLUME_MAX);
fxGame2.setVolume(K.FX_VOLUME_MAX);
fxGame3.setVolume(K.FX_VOLUME_MAX);
fxInterface.setVolume(K.FX_VOLUME_MAX);
}
var daysSurvived = 0;
var spawnTicks = 0;
var inAMenu = false;
var energyDefecits = false;
var foodDefecits = false;
var infiniteTime = false;
var gameTime = 0;
var maxGameTime = 0;
var dayTime = K.DAY;
var landfillAlertReady = true;
var keyScrolling = false;
var mouseScrolling = false;
var interfaceFocus = false;
var smogLevel = 0;
var smogLevelUps = 0;
var buildCursor = false;
var actionMode = K.CLICK;
var enemyTargetted = false;
var multiSelect = false;
var stickyClicky = false;
var mapHidden = false;
var dragBoxOn = false;
var switchSounder = 0;
var windX = -2;
var windY = -2;
var alertNextFrame = false;
var spawnWaveAtNight = false;
var energyIn = 0;
var energyOut = 0;
var energyNet = 0;
var foodIn = 0;
var foodOut = 0;
var foodNet = 0;
var paused = false;
}
Symbol 1692 MovieClip [__Packages.SuperDirector] Frame 0
class SuperDirector extends MovieClip
{
var currentLevel, attachMovie, getNextHighestDepth, theDirector, theTransition, _parent, removeMovieClip;
function SuperDirector () {
super();
}
function onLoad() {
}
function setLevel(i) {
currentLevel = i;
}
function startTheGame() {
startGameLevel(currentLevel);
}
function startGameLevel(i) {
currentLevel = i;
attachMovie("mc_director", "theDirector", getNextHighestDepth());
theDirector.nextLevel = i;
theDirector.setMaster(this);
makeTransition();
onMidTransition = function () {
this.theDirector.doFirstStuff();
this.theTransition.play();
};
}
function nextGameLevel(theLevel) {
currentLevel = theLevel;
attachMovie("mc_director", "theDirector", getNextHighestDepth());
theTransition.swapDepths(theDirector);
theDirector.nextLevel = currentLevel;
theDirector.setMaster(this);
theDirector.doFirstStuff();
}
function sameGameLevel() {
attachMovie("mc_director", "theDirector", getNextHighestDepth());
theTransition.swapDepths(theDirector);
theDirector.nextLevel = currentLevel;
theDirector.setMaster(this);
theDirector.doFirstStuff();
}
function doThisLevel(i) {
makeTransition();
onMidTransition = function () {
this.theDirector.deleteMe();
this.nextGameLevel(i);
this.theTransition.play();
};
}
function doNextLevel() {
if (currentLevel == undefined) {
currentLevel = 1;
}
makeTransition();
onMidTransition = function () {
this.theDirector.deleteMe();
this.nextGameLevel(this.currentLevel + 1);
this.theTransition.play();
};
}
function resetLevel() {
makeTransition();
onMidTransition = function () {
this.theDirector.deleteMe();
this.sameGameLevel();
this.theTransition.play();
};
}
function directorQuit(lastLevel) {
makeTransition();
onMidTransition = function () {
this.theDirector.deleteMe();
this.onQuitGame(lastLevel);
this.theTransition.play();
};
}
function onQuitGame(lastLevel) {
Mouse.show();
_parent.setLastLevel(lastLevel);
_parent.gotoAndPlay("start");
removeMovieClip();
(removeMovieClip());// not popped
}
function makeTransition() {
if (theTransition != undefined) {
theTransition.removeMovieClip();
}
attachMovie("mc_transitioner", "theTransition", getNextHighestDepth());
}
function onMidTransition() {
}
}
Symbol 1693 MovieClip [__Packages.Interface] Frame 0
class Interface extends MovieClip
{
var lastMenu, currMenu, master, r_energy, r_food, r_smog, r_research, r_metal, r_gas, r_FF, attachMovie, getNextHighestDepth, theTextThing, theMenu, engineerGlow, farmGlow, defenseGlow, powerPlantGlow, landFillGlow, labGlow, factoryGlow, demolishGlow, teslaCoilGlow, gunTurretGlow, floodLightsGlow, flameTurretGlow, FFPlantGlow, gasPlantGlow, windPlantGlow, solarPlantGlow, nuclearPlantGlow, nuclearDumpGlow, oilGasGlow, geoPlantGlow, gasolineGlow, electricGlow, ethanolGlow, natgasGlow, garbageTruckGlow, mineGlow, gameTime, timeString, demolishB, repairB, theMessage, disableButt, gotoAndStop, portrait, theStatus, hp, theCost, usage, theLevel, gasolineLevel, dieselLevel, electricLevel, ethanolLevel, natGasLevel, fuelCellLevel, theProduction, objective;
function Interface () {
super();
lastMenu = new Array();
currMenu = "default";
}
function onLoad() {
makeResources();
master.onInterfaceLoaded();
}
function setMaster(d) {
master = d;
}
function setResourceVisibility(a) {
if (a[0] == false) {
r_energy.hideMe();
} else {
r_energy.showMe();
}
if (a[1] == false) {
r_food.hideMe();
} else {
r_food.showMe();
}
if (a[2] == false) {
r_smog.hideMe();
} else {
r_smog.showMe();
}
if (a[3] == false) {
r_research.hideMe();
} else {
r_energy.showMe();
}
if (a[4] == false) {
r_metal.hideMe();
} else {
r_metal.showMe();
}
if (a[5] == false) {
r_gas.hideMe();
} else {
r_gas.showMe();
}
if (a[6] == false) {
r_FF.hideMe();
} else {
r_FF.showMe();
}
}
function showCurrObjective() {
doTheActions = false;
master.unClickEverything();
attachMovie("mc_textThing", "theTextThing", getNextHighestDepth());
theTextThing.setObjective(master.lData.getCurrObjective());
theTextThing.setText(master.lData.getCurrText());
theTextThing.setPortrait(master.lData.getCurrPortrait());
theTextThing.setTutorial(master.lData.getCurrTutorial());
theTextThing.setTitle(master.lData.getTitle());
}
function resetLevel() {
master.resetLevel();
}
function restartTheGame() {
master.gotoMenu();
resetLevel();
}
function quitTheGame() {
master.quitTheGame();
}
function showTextThing() {
doTheActions = true;
master.unClickEverything();
normalCursor();
attachMovie("mc_textThing", "theTextThing", getNextHighestDepth());
theTextThing.setObjective(master.lData.getNextObjective());
theTextThing.setText(master.lData.getCurrText());
theTextThing.setPortrait(master.lData.getCurrPortrait());
theTextThing.setTutorial(master.lData.getCurrTutorial());
theTextThing.setTitle(master.lData.getTitle());
}
function showTextThingLose() {
attachMovie("mc_textThing", "theTextThing", getNextHighestDepth());
theTextThing.setObjective("");
theTextThing.setText("Can anyone hear me? We're being overrun! Send backup imme- \n -End of Transmission.-");
theTextThing.setPortrait("wurstwagen");
master.lData.defeat();
}
function endTextThing() {
master.gotoTextThing();
}
function hideTextThing() {
theTextThing.removeMovieClip();
if (doTheActions == true) {
master.doCurrentActions();
}
}
function showHelp() {
showOptions(true);
}
function showOptions(isHelp) {
attachMovie("mc_menu", "theMenu", getNextHighestDepth());
var _local2;
if (isHelp == true) {
_local2 = "help";
} else {
_local2 = "default";
}
theMenu.fx.setVal(K.FX_VOLUME_MAX);
theMenu.music.setVal(K.MUSIC_VOLUME_MAX);
theMenu.frame = _local2;
theMenu.gotoAndStop(_local2);
}
function fancyCursorOn() {
K.FANCYCURSOR = true;
master.updateCursor();
}
function fancyCursorOff() {
K.FANCYCURSOR = false;
master.updateCursor();
}
function hideOptions() {
theMenu.removeMovieClip();
}
function saveOptions() {
K.MUSIC_VOLUME_MAX = theMenu.music.val;
master.updateFxVolume();
master.updateMusicVolume();
}
function makeResources() {
attachMovie("mc_r_energy", "r_energy", getNextHighestDepth());
attachMovie("mc_r_food", "r_food", getNextHighestDepth());
attachMovie("mc_r_metal", "r_metal", getNextHighestDepth());
attachMovie("mc_r_research", "r_research", getNextHighestDepth());
attachMovie("mc_r_gas", "r_gas", getNextHighestDepth());
attachMovie("mc_r_FF", "r_FF", getNextHighestDepth());
attachMovie("mc_r_smog", "r_smog", getNextHighestDepth());
var _local3 = new flash.filters.DropShadowFilter();
_local3.angle = 45;
_local3.strength = 1;
_local3.blurX = 5;
_local3.blurY = 5;
_local3.distance = 2;
var _local2 = r_energy.filters;
_local2.push(_local3);
r_energy.filters = _local2;
r_food.filters = _local2;
r_research.filters = _local2;
r_metal.filters = _local2;
r_gas.filters = _local2;
r_FF.filters = _local2;
r_smog.filters = _local2;
r_energy._x = -320;
r_energy._y = -252;
r_energy.setType(K.ENERGY);
r_food._x = -190;
r_food._y = -250;
r_food._width = r_food._width * 0.8;
r_food._height = r_food._height * 0.8;
r_food.setType(K.FOOD);
r_smog._x = -60;
r_smog._y = -248;
r_smog._width = r_smog._width * 0.75;
r_smog._height = r_smog._height * 0.75;
r_smog.setType(K.SMOG);
r_research._x = 125;
r_research._y = -275;
r_research._width = r_research._width * 0.75;
r_research._height = r_research._height * 0.75;
r_research.setType(K.RESEARCH);
r_metal._x = 205;
r_metal._y = -275;
r_metal._width = r_metal._width * 0.75;
r_metal._height = r_metal._height * 0.75;
r_metal.setType(K.METAL);
r_gas._x = 275;
r_gas._y = -275;
r_gas._width = r_gas._width * 0.75;
r_gas._height = r_gas._height * 0.75;
r_gas.setType(K.GAS);
r_FF._x = 350;
r_FF._y = -275;
r_FF._width = r_FF._width * 0.75;
r_FF._height = r_FF._height * 0.75;
r_FF.setType(K.FF);
}
function setEnergy(e) {
r_energy.setAmount(e);
}
function setSmog(s) {
r_smog.setAmount(s);
}
function setEnergyIn(e) {
r_energy.setIn(e);
}
function setEnergyOut(e) {
r_energy.setOut(e);
}
function setEnergyNet(e) {
r_energy.setNet(e);
}
function setFood(f) {
r_food.setAmount(f);
}
function setFoodIn(f) {
r_food.setIn(f);
}
function setFoodOut(f) {
r_food.setOut(f);
}
function setFoodNet(f) {
r_food.setNet(f);
}
function setGas(g) {
r_gas.setAmount(g);
}
function setGasIn(g) {
r_gas.setIn(g);
}
function setGasOut(g) {
r_gas.setOut(g);
}
function setMetal(m) {
r_metal.setAmount(m);
}
function setMetalIn(m) {
r_metal.setIn(m);
}
function setMetalOut(m) {
r_metal.setOut(m);
}
function setFF(ff) {
r_FF.setAmount(ff);
}
function setResearch(r) {
r_research.setAmount(r);
}
function setFFIn(ff) {
r_FF.setIn(ff);
}
function setFFOut(ff) {
r_FF.setOut(ff);
}
function showGlowyEngineer() {
engineerGlow.gotoAndPlay("glow");
}
function showGlowyFarm() {
farmGlow.gotoAndPlay("glow");
}
function showGlowyDefenses() {
defenseGlow.gotoAndPlay("glow");
}
function showGlowyPowerPlant() {
powerPlantGlow.gotoAndPlay("glow");
}
function showGlowyLandFill() {
landFillGlow.gotoAndPlay("glow");
}
function showGlowyLab() {
labGlow.gotoAndPlay("glow");
}
function showGlowyFactory() {
factoryGlow.gotoAndPlay("glow");
}
function showGlowyDemolish() {
demolishGlow.gotoAndPlay("demolish");
}
function showGlowyTeslaCoil() {
teslaCoilGlow.gotoAndPlay("glow");
}
function showGlowyGunTurret() {
gunTurretGlow.gotoAndPlay("glow");
}
function showGlowyFloodLights() {
floodLightsGlow.gotoAndPlay("glow");
}
function showGlowyFlameTurret() {
flameTurretGlow.gotoAndPlay("glow");
}
function showGlowyFFPlant() {
FFPlantGlow.gotoAndPlay("glow");
}
function showGlowyGasPlant() {
gasPlantGlow.gotoAndPlay("glow");
}
function showGlowyWindPlant() {
windPlantGlow.gotoAndPlay("glow");
}
function showGlowySolarPlant() {
solarPlantGlow.gotoAndPlay("glow");
}
function showGlowyNuclearPlant() {
nuclearPlantGlow.gotoAndPlay("glow");
}
function showGlowyNuclearDump() {
nuclearDumpGlow.gotoAndPlay("glow");
}
function showGlowyOilGasWell() {
oilGasGlow.gotoAndPlay("glow");
}
function showGlowyGeoPlant() {
geoPlantGlow.gotoAndPlay("glow");
}
function setFleetFuel(fn, fs) {
master.setFleetFuel(fn);
master.disableThings();
disableAllFuelsExcept(fs);
}
function disableAllFuelsExcept(f) {
gasolineGlow.gotoAndStop("default");
electricGlow.gotoAndStop("default");
ethanolGlow.gotoAndStop("default");
natgasGlow.gotoAndStop("default");
gasolineGlow.onLoad = function () {
(this.gotoAndStop("default"));// not popped
};
electricGlow.onLoad = function () {
(this.gotoAndStop("default"));// not popped
};
ethanolGlow.onLoad = function () {
(this.gotoAndStop("default"));// not popped
};
natgasGlow.onLoad = function () {
(this.gotoAndStop("default"));// not popped
};
var _local2 = K.getFuelLevels();
if (_local2[0] == -1) {
disableGasoline();
}
if (_local2[2] == -1) {
disableElectric();
}
if (_local2[3] == -1) {
disableEthanol();
}
if (_local2[4] == -1) {
disableNatGas();
}
this[f.toLowerCase() + "Glow"].gotoAndStop("select");
this[f.toLowerCase() + "Glow"].onLoad = function () {
(this.gotoAndStop("select"));// not popped
};
}
function disableDemolish() {
demolishGlow.gotoAndStop("disable");
demolishGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableNatGas() {
natgasGlow.gotoAndStop("disable");
natgasGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableElectric() {
electricGlow.gotoAndStop("disable");
electricGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableEthanol() {
ethanolGlow.gotoAndStop("disable");
ethanolGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableGasoline() {
gasolineGlow.gotoAndStop("disable");
gasolineGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableFFPlant() {
FFPlantGlow.gotoAndStop("disable");
FFPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableGasPlant() {
gasPlantGlow.gotoAndStop("disable");
gasPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableWindPlant() {
windPlantGlow.gotoAndStop("disable");
windPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableSolarPlant() {
solarPlantGlow.gotoAndStop("disable");
solarPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableNuclearPlant() {
nuclearPlantGlow.gotoAndStop("disable");
nuclearPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableGeoPlant() {
geoPlantGlow.gotoAndStop("disable");
geoPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableGarbageTruck() {
garbageTruckGlow.gotoAndStop("disable");
garbageTruckGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableEngineer() {
engineerGlow.gotoAndStop("disable");
engineerGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableLandFill() {
landFillGlow.gotoAndStop("disable");
landFillGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableFactory() {
factoryGlow.gotoAndStop("disable");
factoryGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableDefenses() {
defenseGlow.gotoAndStop("disable");
defenseGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableOilGasWell() {
oilGasGlow.gotoAndStop("disable");
oilGasGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableNuclearDump() {
nuclearDumpGlow.gotoAndStop("disable");
nuclearDumpGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableLab() {
labGlow.gotoAndStop("disable");
labGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableMine() {
mineGlow.gotoAndStop("disable");
mineGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableTeslaCoil() {
teslaCoilGlow.gotoAndStop("disable");
teslaCoilGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableFloodLights() {
floodLightsGlow.gotoAndStop("disable");
floodLightsGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableGunTurret() {
gunTurretGlow.gotoAndStop("disable");
gunTurretGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableFlameTurret() {
flameTurretGlow.gotoAndStop("disable");
flameTurretGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disableFarm() {
farmGlow.gotoAndStop("disable");
farmGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function disablePowerPlant() {
powerPlantGlow.gotoAndStop("disable");
powerPlantGlow.onLoad = function () {
(this.gotoAndStop("disable"));// not popped
};
}
function showGlowyEnergy() {
r_energy.gotoAndStop("default");
r_energy.showGlowy();
}
function showGlowyFood() {
r_food.gotoAndStop("default");
r_food.showGlowy();
}
function showGlowyResearch() {
r_research.gotoAndStop("default");
r_research.showGlowy();
}
function showGlowyMetal() {
r_metal.showGlowy();
}
function showGlowyFF() {
r_FF.showGlowy();
}
function showGlowyGas() {
r_gas.showGlowy();
}
function showGlowySmog() {
r_smog.showGlowy();
}
function showGlowyNatGas() {
natgasGlow.gotoAndPlay("glow");
natgasGlow.onLoad = function () {
(this.gotoAndPlay("glow"));// not popped
};
}
function showGlowyElectric() {
electricGlow.gotoAndPlay("glow");
electricGlow.onLoad = function () {
(this.gotoAndPlay("glow"));// not popped
};
}
function showGlowyEthanol() {
ethanolGlow.gotoAndPlay("glow");
ethanolGlow.onLoad = function () {
(this.gotoAndPlay("glow"));// not popped
};
}
function showGlowyGasoline() {
gasolineGlow.gotoAndPlay("glow");
gasolineGlow.onLoad = function () {
(this.gotoAndPlay("glow"));// not popped
};
}
function updateGameTime(g) {
if (g >= 0) {
gameTime = g;
timeString = String(gameTime);
} else {
gameTime = 999;
timeString = "---";
}
}
function goBackButton() {
if (currMenu == lastMenu[lastMenu.length - 1]) {
currMenu = "default";
}
currMenu = String(lastMenu.pop());
if (currMenu != undefined) {
showMenu();
} else {
currMenu = "default";
showMenu();
}
checkCursor(currMenu);
master.playSound(0, "click2.wav", 1);
master.selectedThing.updateInterface();
}
function actionButton(s) {
master.actionButton(s);
}
function showEnemyMenu(s, n, m) {
buildingMenu = true;
currMenu = s;
showMenu(n, m);
}
function showUnitMenu(s, n, m) {
buildingMenu = true;
currMenu = s;
showMenu(n, m);
}
function showBuildingMenu(s, n, m) {
buildingMenu = true;
currMenu = s;
showMenu(n, m);
}
function directorUnClickBuildings() {
master.unClickEverything();
master.playSound(0, "click2.wav", 1);
}
function unClickBuildings() {
buildingMenu = false;
currMenu = "default";
showMenu();
}
function onClickRegion() {
master.onClickInterfaceRegion();
}
function demolishOn() {
demolishB.gotoAndStop("on");
}
function demolishOff() {
demolishB.gotoAndStop("off");
}
function repairOn() {
repairB.gotoAndStop("on");
}
function repairOff() {
repairB.gotoAndStop("off");
}
function showMessage(str) {
theMessage.text = str;
theMessage._alpha = 100;
theMessage.gotoAndPlay("show");
}
function setDisableButtDown() {
disableButt.onLoad = function () {
this.setDown();
this.setButton();
this.myFunction = function () {
this._parent._parent.disableToggleBuilding();
};
};
}
function setDisableButtUp() {
disableButt.onLoad = function () {
this.setButton();
this.myFunction = function () {
this._parent._parent.disableToggleBuilding();
};
this.setUp();
};
}
function showMenu(n, m) {
master.inAMenu = false;
(gotoAndStop(currMenu));// not popped
portrait.gotoAndStop(currMenu);
setTheHp(m.hp);
showUsage(currMenu.substr(1, currMenu.length - 1), m);
if (m.disabled == true) {
setDisableButtDown();
} else {
setDisableButtUp();
}
if (m.disabled == true) {
theStatus.gotoAndStop("disabled");
} else if (m.asleep == true) {
theStatus.gotoAndStop("asleep");
} else if (m.notEnoughFood == true) {
theStatus.gotoAndStop("food");
} else if (m.tooMuchGarbage == true) {
theStatus.gotoAndStop("waste");
} else if (m.needsRepair == true) {
theStatus.gotoAndStop("repair");
} else if (m.notEnoughEnergy == true) {
theStatus.gotoAndStop("energy");
} else {
theStatus.gotoAndStop("default");
}
if (currMenu == "imultiUnits") {
} else if (currMenu.substr(0, 1) == "b") {
showCost(currMenu.substr(1, currMenu.length - 1));
master.inAMenu = true;
} else if (currMenu.substr(0, 1) == "u") {
showLevels(currMenu.substr(1, currMenu.length - 1));
master.inAMenu = true;
hideCost();
}
if ((currMenu.substr(1, 7).toLowerCase() == "garbage") || (currMenu.substr(1, 7).toLowerCase() == "rubble")) {
amount = n;
} else if (currMenu.substr(1, 5).toLowerCase() == "metal") {
amount = n;
} else if (currMenu.substr(1, 2).toLowerCase() == "ff") {
amount = n;
} else if (currMenu.substr(1, 3).toLowerCase() == "gas") {
amount = n;
} else if (currMenu.substr(1, 6).toLowerCase() == "nwaste") {
amount = n;
} else if (currMenu.substr(1, 7).toLowerCase() == "factory") {
if (m.producing == false) {
hideUnitProduction();
}
} else if (currMenu.substr(1, 9).toLowerCase() == "teslacoil") {
amount = K.DMG_TESLACOIL;
} else if (currMenu.substr(1, 9).toLowerCase() == "gunturret") {
amount = K.DMG_GUNTURRET;
} else if (currMenu.substr(1, 11).toLowerCase() == "flameturret") {
amount = K.DMG_FLAMETURRET;
} else if (currMenu.substr(1, 11).toLowerCase() == "floodlights") {
amount = K.DMG_FLOODLIGHTS;
} else if (currMenu.substr(1, 8).toLowerCase() == "landfill") {
amount = m.getPercent();
} else if (currMenu.substr(1, 11).toLowerCase() == "nucleardump") {
amount = m.getPercent();
}
master.disableThings();
hideBldgButton();
}
function repairSelected() {
master.repairSelected();
}
function setTheHp(amt) {
hp.setAmount(amt);
hp.onLoad = function () {
this.setAmount(amt);
};
}
function onJuicyButtonClick(isDown) {
master.onJuicyButtonClick(isDown);
}
function setFactoryFlag() {
master.selectedThing.deployTheFlag();
master.playSound(0, "blop.wav", 1);
}
function hideCost() {
theCost._visible = false;
}
function showUsage(str, m) {
setUsageKinds(str, m);
setUsageAmounts(str, m);
}
function setUsageAmounts(theString) {
}
function setUsageKinds(theString, m) {
var use1 = "nothing";
var use2 = "nothing";
var make1 = "nothing";
var make2 = "nothing";
var make3 = "nothing";
var _local3 = 0;
var _local2 = 0;
var u1Amount = -1;
var u2Amount = -1;
var m1Amount = 1;
var m2Amount = 1;
var m3Amount = 1;
var _local4 = theString.toLowerCase();
if (_local4 == "farm") {
use1 = "energy";
make1 = "food";
make2 = "garbage";
make3 = "smog";
_local3 = 1;
_local2 = 3;
u1Amount = K.E_IN_FARM;
m1Amount = K.F_OUT_FARM;
m2Amount = K.G_OUT_FARM;
m3Amount = K.S_OUT_FARM;
} else if (_local4 == "superfarm") {
use1 = "energy";
make1 = "food";
make2 = "garbage";
make3 = "smog";
_local3 = 1;
_local2 = 3;
u1Amount = K.E_IN_FARM;
m1Amount = K.F_OUT_SUPERFARM;
m2Amount = K.G_OUT_FARM;
m3Amount = K.S_OUT_FARM;
} else if (_local4 == "mine") {
use1 = "energy";
make1 = "metal";
make2 = "garbage";
_local3 = 1;
_local2 = 2;
u1Amount = K.E_IN_MINE;
m1Amount = K.M_OUT_MINE;
m2Amount = K.G_OUT_MINE;
} else if (_local4 == "factory") {
use1 = "energy";
use2 = "metal";
make1 = "units";
make2 = "smog";
make3 = "garbage";
_local3 = 2;
_local2 = 3;
u1Amount = K.E_IN_FACTORY;
u2Amount = K.M_IN_FACTORY;
m1Amount = 0;
m2Amount = K.getS_Usage("factory");
m3Amount = K.G_OUT_FACTORY;
} else if (_local4 == "ffplant") {
use1 = "ff";
make1 = "energy";
make2 = "smog";
_local3 = 1;
_local2 = 2;
u1Amount = K.FF_IN_FFPLANT;
m1Amount = K.getE_Usage("ffplant");
m2Amount = K.getS_Usage("ffplant");
} else if (_local4 == "gasplant") {
use1 = "gas";
make1 = "energy";
make2 = "smog";
_local3 = 1;
_local2 = 2;
u1Amount = K.GAS_IN_GASPLANT;
m1Amount = K.getE_Usage("gasplant");
m2Amount = K.getS_Usage("gasplant");
} else if (_local4 == "geoplant") {
make1 = "energy";
_local3 = 0;
_local2 = 1;
m1Amount = K.E_OUT_GEOPLANT;
} else if (_local4 == "supergeoplant") {
make1 = "energy";
_local3 = 0;
_local2 = 1;
m1Amount = K.getE_Usage("geoplant") * 2;
} else if (_local4 == "solarplant") {
make1 = "energy";
_local3 = 0;
_local2 = 1;
m1Amount = K.getE_Usage("solarplant");
} else if (_local4 == "hydroplant") {
make1 = "energy";
_local3 = 0;
_local2 = 1;
m1Amount = K.getE_Usage("hydroplant");
} else if (_local4 == "nuclearplant") {
make1 = "energy";
make2 = "nWaste";
_local2 = 2;
_local3 = 0;
m1Amount = K.getE_Usage("nuclearplant");
m2Amount = K.NWASTE_OUT_NUCLEARPLANT;
} else if (_local4 == "landfill") {
_local3 = 0;
_local2 = 0;
} else if (_local4 == "windplant") {
_local3 = 0;
_local2 = 1;
use1 = "energy";
m1Amount = K.getE_Usage("windplant");
} else if (_local4 == "oilgaswell") {
_local3 = 1;
_local2 = 3;
use1 = "energy";
make1 = "FF";
make2 = "gas";
make3 = "garbage";
u1Amount = K.E_IN_OILGASWELL;
m1Amount = K.FF_OUT_OILGASWELL;
m2Amount = K.GAS_OUT_OILGASWELL;
m3Amount = K.G_OUT_OILGASWELL;
} else if (_local4 == "lab") {
_local3 = 1;
_local2 = 2;
use1 = "energy";
make1 = "research";
make2 = "garbage";
u1Amount = K.E_IN_LAB;
m1Amount = K.R_OUT_LAB;
m2Amount = K.G_OUT_LAB;
} else if (_local4 == "teslacoil") {
_local3 = 1;
use1 = "energy";
_local2 = 0;
u1Amount = K.E_IN_TESLACOIL;
} else if (_local4 == "floodlights") {
_local3 = 1;
use1 = "energy";
_local2 = 0;
u1Amount = K.E_IN_FLOODLIGHTS;
} else if (_local4 == "gunturret") {
_local3 = 1;
use1 = "metal";
_local2 = 0;
u1Amount = K.M_IN_GUNTURRET;
} else if (_local4 == "flameturret") {
_local3 = 1;
use1 = "ff";
_local2 = 0;
u1Amount = K.FF_IN_FLAMETURRET;
} else if (_local4 == "fortress") {
_local3 = 1;
use1 = "energy";
u1Amount = K.E_IN_FORTRESS;
_local2 = 2;
make1 = "smog";
make2 = "garbage";
m1Amount = K.S_OUT_FORTRESS;
m2Amount = K.G_OUT_FORTRESS;
}
var _local5 = "";
if (_local3 > 0) {
_local5 = _local5 + ("uses" + _local3);
}
if (_local2 > 0) {
_local5 = _local5 + ("makes" + _local2);
}
usage.gotoAndStop(_local5);
usage.onLoad = function () {
this.setUseResources(use1, use2);
this.setMakeResources(make1, make2, make3);
this.setUsage(u1Amount, u2Amount);
this.setMake(m1Amount, m2Amount, m3Amount);
};
usage.setUseResources(use1, use2);
usage.setMakeResources(make1, make2, make3);
usage.setUsage(u1Amount, u2Amount);
usage.setMake(m1Amount, m2Amount, m3Amount);
}
function showLevels(str) {
if (str.toLowerCase() == "factory") {
showFuelLevels();
} else {
var l = K.getLevels(str);
theLevel.onLoad = function () {
this.setStars(l, "gold");
};
theLevel.setStars(l, "gold");
}
}
function showFuelLevels() {
var f = K.getFuelLevels();
gasolineLevel.onLoad = function () {
this.setStars(f[0], "white");
};
dieselLevel.onLoad = function () {
this.setStars(f[1], "green");
};
electricLevel.onLoad = function () {
this.setStars(f[2], "red");
};
ethanolLevel.onLoad = function () {
this.setStars(f[3], "yellow");
};
natGasLevel.onLoad = function () {
this.setStars(f[4], "blue");
};
fuelCellLevel.onLoad = function () {
this.setStars(f[5], "magenta");
};
gasolineLevel.setStars(f[0], "white");
dieselLevel.setStars(f[1], "green");
electricLevel.setStars(f[2], "red");
ethanolLevel.setStars(f[3], "yellow");
natGasLevel.setStars(f[4], "blue");
fuelCellLevel.setStars(f[5], "magenta");
}
function getUpgradeCost(target, upgrade, type) {
var _local5 = K.getLevels(target);
var _local2;
if (target.toLowerCase() == "fuel") {
_local2 = K.getFuelCost(upgrade);
} else if (upgrade.toLowerCase() == "both") {
_local2 = K.getUpgradeCost(target);
}
_local2 = adjustUpgradeCost(_local2, target, type);
return(_local2);
}
function showLevelCost(target, upgrade, type) {
if (target.toLowerCase() == "fuel") {
showFuelCost(upgrade, target, type);
} else {
var _local4 = K.getLevels(target);
_local4[0] = _local4[0] + 1;
_local4[1] = _local4[1] + 1;
if (upgrade.toLowerCase() == "emissions") {
showCost((upgrade + "_") + _local4[0], true, target, type);
} else if (upgrade.toLowerCase() == "efficiency") {
showCost((upgrade + "_") + _local4[1], true, target, type);
} else if (upgrade.toLowerCase() == "both") {
showCost(target.toUpperCase(), true, target, type);
}
}
}
function adjustUpgradeCost(costs, str, type) {
var _local3;
switch (type) {
case K.BUILDING :
_local3 = master.bldgArray;
break;
case K.UNIT :
_local3 = master.uArray;
}
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].myMenu.toLowerCase() == str) {
_local4++;
}
_local2++;
}
costs[1] = costs[1] * _local4;
return(costs);
}
function showFuelCost(str, targetName, type) {
theCost._visible = true;
var c = K.getFuelCost(str);
if (c[0] == undefined) {
hideCost();
}
var r1;
var r2;
theCost.setResources("research", "energy");
c = adjustUpgradeCost(c, targetName, type);
r1 = "research";
r2 = "energy";
theCost.setCosts(c);
theCost.onLoad = function () {
this._visible = true;
this.setResources(r1, r2);
this.setCosts(c);
};
}
function showCost(str, isUpgrade, targetName, type) {
theCost._visible = true;
var c;
if (isUpgrade) {
c = K.getUpgradeCost(str);
} else {
c = K.getCost(str);
}
if (c[0] == undefined) {
hideCost();
}
var r1;
var r2;
if (isUpgrade != true) {
theCost.setResources("energy", "metal");
r1 = "energy";
r2 = "metal";
} else {
theCost.setResources("research", "energy");
c = adjustUpgradeCost(c, targetName, type);
r1 = "research";
r2 = "energy";
}
theCost.setCosts(c);
theCost.onLoad = function () {
this._visible = true;
this.setResources(r1, r2);
this.setCosts(c);
};
}
function checkCursor(str) {
if (str.substr(0, 1) == "b") {
if (str.substr(1, 1) != "_") {
buildCursor(str.substr(1, str.length - 1));
} else {
normalCursor();
}
} else {
normalCursor();
}
}
function pressButton(str) {
lastMenu.push(currMenu);
currMenu = str;
showMenu();
checkCursor(str);
master.playSound(0, "click1.wav", 1);
}
function researchButton(str) {
master.selectedThing.researchUpgrade(str);
showUnitProduction(master.selectedThing);
}
function upgradeButton(target, upgrade, type) {
var _local2 = getUpgradeCost(target, upgrade, type);
if (_local2 != undefined) {
master.doUpgrade(target, upgrade, type, _local2);
}
showUpgradeButton(target, upgrade, type);
}
function buildButton(str) {
master.selectedThing.buildUnit(str);
}
function onPauseBuild() {
}
function onCancelBuild() {
master.selectedThing.cancelUnit();
scrapUnitProduction(master.selectedThing);
master.playSound(0, "dull.wav", 1);
}
function scrapUnitProduction() {
hideUnitProduction();
theProduction.setPercent(0);
}
function showUnitProduction(what) {
theProduction.turnOn();
theProduction.setUnit(what.currUnit);
if ((what.percent < 1) || (what.percent == undefined)) {
theProduction.setPercent(1);
} else {
theProduction.setPercent(what.percent);
}
theProduction.onLoad = function () {
this.turnOn();
this.setUnit(what.currUnit);
if (what.percent <= 1) {
this.setPercent(1);
} else {
this.setPercent(what.percent);
}
};
}
function hideUnitProduction() {
theProduction.onLoad = function () {
this.turnOff();
};
theProduction.turnOff();
hideCost();
}
function showUpgradeButton(target, upgrade, type) {
showLevelCost(target, upgrade, type);
portrait.gotoAndStop("u" + upgrade);
}
function showUnitButton(str) {
showCost(str);
portrait.gotoAndStop("b" + str);
}
function showBldgButton(str) {
showCost(str);
hideObjective();
portrait.gotoAndStop("b" + str);
}
function hideUnitButton() {
portrait.gotoAndStop(currMenu);
hideCost();
showObjective();
}
function showObjective() {
objective._visible = true;
var theObj = master.lData.getCurrObjective();
objective.setText(theObj);
var _local2 = this;
objective.onLoad = function () {
this.setText(theObj);
};
}
function hideObjective() {
objective._visible = false;
}
function hideBldgButton() {
portrait.gotoAndStop(currMenu);
showObjective();
hideCost();
}
function buildCursor(str) {
master.doBuildCursor(str);
}
function normalCursor(str) {
master.normalCursor(str);
}
function upgradeMenu() {
if (currMenu == "build") {
pressButton("upgrade");
} else if (currMenu.substr(0, 1) == "b") {
var _local2 = currMenu.substr(1, currMenu.length - 1);
pressButton("u" + _local2);
}
}
function buildMenu() {
if (currMenu == "upgrade") {
pressButton("build");
} else if (currMenu.substr(0, 1) == "u") {
var _local2 = currMenu.substr(1, currMenu.length - 1);
pressButton("b" + _local2);
}
}
function matchScreen(xx, yy) {
}
function snapScreenTo(xx, yy) {
}
function minimapLoaded() {
}
function drawMinimap(w, h, a) {
}
function hideMap() {
master.hideMap();
}
function showMap() {
master.showMap();
}
var buildingMenu = false;
var amount = 0;
var waste = 0;
var doTheActions = false;
}
Symbol 1694 MovieClip [__Packages.MenuThingy] Frame 0
class MenuThingy extends MovieClip
{
var gotoAndStop, frame, fx, music, r_fancyCursor, r_normalCursor, r_lowquality, r_midquality, r_highquality, _parent;
function MenuThingy () {
super();
}
function onLoad() {
(gotoAndStop(frame));// not popped
fx.setVal(K.FX_VOLUME_MAX);
music.setVal(K.MUSIC_VOLUME_MAX);
if (K.FANCYCURSOR == true) {
r_fancyCursor.selected = true;
r_normalCursor.selected = false;
} else {
r_fancyCursor.selected = false;
r_normalCursor.selected = true;
}
r_lowquality.selected = false;
r_midquality.selected = false;
r_highquality.selected = false;
if (K.QUALITY.toLowerCase() == "low") {
r_lowquality.selected = true;
} else if (K.QUALITY.toLowerCase() == "medium") {
r_midquality.selected = true;
} else if (K.QUALITY.toLowerCase() == "high") {
r_highquality.selected = true;
}
}
function fancyCursorOff() {
_parent.fancyCursorOff();
}
function fancyCursorOn() {
_parent.fancyCursorOn();
}
}
Symbol 1695 MovieClip [__Packages.VolumeSlider] Frame 0
class VolumeSlider extends MovieClip
{
var val, a;
function VolumeSlider () {
super();
}
function updateVal(i) {
val = i;
}
function setVal(i) {
val = i;
a.setVal(i);
a._x = i;
}
}
Symbol 1696 MovieClip [__Packages.Arrow] Frame 0
class Arrow extends MovieClip
{
var _x, _parent;
function Arrow () {
super();
}
function onLoad() {
}
function onPress() {
followMouse = true;
}
function onRelease() {
followMouse = false;
}
function onReleaseOutside() {
followMouse = false;
}
function setVal(i) {
_x = Math.floor(i);
}
function onEnterFrame() {
if (followMouse) {
_x = _parent._xmouse;
if (_x < 0) {
_x = 0;
} else if (_x > 100) {
_x = 100;
}
_parent.updateVal(Math.floor(_x));
}
}
var followMouse = false;
}
Symbol 1485 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 1535 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 1536 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 1538 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 1537 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 1486 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 1487 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 1488 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local11 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local9 = (__width - borderW) - borderW;
var _local10 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local11 = Math.min(_local9 - _local7, _local15 + 5);
_local3._width = _local11;
_local8 = Math.min(_local10, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local9 - _local11) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local9 - _local11) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local11;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local10 - _local6) / 2;
_local4 = (_local10 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local11 = Math.min(_local9, _local15 + 5);
_local3._width = _local11;
_local8 = Math.min(_local10 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local9 - _local11) / 2;
_local2._x = (_local9 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local10 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local10 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.126";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 1489 MovieClip [__Packages.mx.controls.RadioButton] Frame 0
class mx.controls.RadioButton extends mx.controls.Button
{
var setToggle, __value, selected, releaseFocus, phase, dispatchEvent, _parent, __data, setState, __state, getFocusManager;
function RadioButton () {
super();
}
function init(Void) {
setToggle(__toggle);
__value = this;
super.init();
}
function size(Void) {
super.size();
}
function onRelease() {
if (selected) {
return(undefined);
}
releaseFocus();
phase = "up";
setSelected(true);
dispatchEvent({type:"click"});
_parent[__groupName].dispatchEvent({type:"click"});
}
function setData(val) {
__data = val;
}
function set data(val) {
__data = val;
//return(data);
}
function getData(val) {
return(__data);
}
function get data() {
return(__data);
}
function onUnload() {
if (_parent[__groupName].selectedRadio == this) {
_parent[__groupName].selectedRadio = undefined;
}
_parent[__groupName].radioList[indexNumber] = null;
delete _parent[__groupName].radioList[indexNumber];
}
function setSelected(val) {
var _local2 = _parent[__groupName];
var _local5 = _local2.selectedRadio.__width;
var _local4 = _local2.selectedRadio.__height;
if (val) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
} else if (_local2.selectedRadio == this) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = undefined;
}
setState(val);
}
function deleteGroupObj(groupName) {
delete _parent[groupName];
}
function getGroupName() {
return(__groupName);
}
function get groupName() {
return(__groupName);
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
delete _parent[__groupName].radioList[__data];
addToGroup(groupName);
__groupName = groupName;
}
function set groupName(groupName) {
setGroupName(groupName);
//return(this.groupName);
}
function addToGroup(groupName) {
if ((groupName == "") || (groupName == undefined)) {
return(undefined);
}
var _local2 = _parent[groupName];
if (_local2 == undefined) {
_local2 = (_parent[groupName] = new mx.controls.RadioButtonGroup());
_local2.__groupName = groupName;
}
_local2.addInstance(this);
if (__state) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
}
}
function get emphasized() {
return(undefined);
}
function keyDown(e) {
switch (e.code) {
case 40 :
setNext();
break;
case 38 :
setPrev();
break;
case 37 :
setPrev();
break;
case 39 :
setNext();
}
}
function setNext() {
var _local2 = _parent[groupName];
if ((_local2.selectedRadio.indexNumber + 1) == _local2.radioList.length) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : -1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 + _local3] != undefined) && (_local2.radioList[_local4 + _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 + _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function setPrev() {
var _local2 = _parent[groupName];
if (_local2.selectedRadio.indexNumber == 0) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : 1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 - _local3] != undefined) && (_local2.radioList[_local4 - _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 - _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "RadioButton";
static var symbolOwner = mx.controls.RadioButton;
static var version = "2.0.2.126";
var className = "RadioButton";
var btnOffset = 0;
var __toggle = true;
var __label = "Radio Button";
var __labelPlacement = "right";
var ignoreClassStyleDeclaration = {Button:1};
var __groupName = "radioGroup";
var indexNumber = 0;
var offset = false;
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "RadioFalseUp";
var falseDownIcon = "RadioFalseDown";
var falseOverIcon = "RadioFalseOver";
var falseDisabledIcon = "RadioFalseDisabled";
var trueUpIcon = "RadioTrueUp";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "RadioTrueDisabled";
var centerContent = false;
var borderW = 0;
var clipParameters = {labelPlacement:1, data:1, label:1, groupName:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.RadioButton.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
}
Symbol 1541 MovieClip [__Packages.mx.controls.RadioButtonGroup] Frame 0
class mx.controls.RadioButtonGroup
{
var radioList, __groupName, selectedRadio;
function RadioButtonGroup () {
init();
mx.events.UIEventDispatcher.initialize(this);
}
function init(Void) {
radioList = new Array();
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
}
function getGroupName() {
return(__groupName);
}
function addInstance(instance) {
instance.indexNumber = indexNumber++;
radioList.push(instance);
}
function getValue() {
if (selectedRadio.data == "") {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function getLabelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function setLabelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
}
function setEnabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
}
function setSize(val, val1) {
for (var _local3 in radioList) {
radioList[_local3].setSize(val, val1);
}
}
function getEnabled() {
for (var _local4 in radioList) {
var _local2 = radioList[_local4].enabled;
var _local3 = t + (_local2 + 0);
}
if (_local3 == radioList.length) {
return(true);
}
if (_local3 == 0) {
return(false);
}
}
function setStyle(name, val) {
for (var _local4 in radioList) {
radioList[_local4].setStyle(name, val);
}
}
function setInstance(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
}
function getInstance() {
return(selectedRadio);
}
function setValue(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio.hitArea_mc._height = selectedRadio.__height;
selectedRadio.hitArea_mc._width = selectedRadio.__width;
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
selectedRadio.hitArea_mc._height = (selectedRadio.hitArea_mc._width = 0);
}
}
function set groupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return;
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
//return(this.groupName);
}
function get groupName() {
return(__groupName);
}
function set selectedData(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
}
//return(selectedData);
}
function get selectedData() {
if ((selectedRadio.data == "") || (selectedRadio.data == undefined)) {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function get selection() {
return(selectedRadio);
}
function set selection(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
//return(selection);
}
function set labelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
//return(labelPlacement);
}
function get labelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function set enabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
//return(enabled);
}
function get enabled() {
var _local2 = 0;
for (var _local3 in radioList) {
_local2 = _local2 + radioList[_local3].enabled;
}
if (_local2 == 0) {
return(false);
}
if (_local2 == radioList.length) {
return(true);
}
}
static var symbolName = "RadioButtonGroup";
static var symbolOwner = mx.controls.RadioButtonGroup;
static var version = "2.0.2.126";
var className = "RadioButtonGroup";
var indexNumber = 0;
}
Symbol 1539 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1540 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 1697 MovieClip [__Packages.CostDisplay] Frame 0
class CostDisplay extends MovieClip
{
var resource1, resource2, resource1Cost, resource2Cost;
function CostDisplay () {
super();
}
function onLoad() {
}
function setResources(str1, str2) {
resource1.gotoAndStop(str1);
resource2.gotoAndStop(str2);
}
function setCostsN(c1, c2) {
resource1Cost = c1;
resource2Cost = c2;
}
function setCosts(a) {
resource1Cost = a[0];
resource2Cost = a[1];
}
}
Symbol 1698 MovieClip [__Packages.UnitProduction] Frame 0
class UnitProduction extends MovieClip
{
var gotoAndStop, theProgress, hammer, _visible;
function UnitProduction () {
super();
}
function onLoad() {
var _local1 = true;
}
function setUnit(s) {
gotoAndStop(s);
}
function setPercent(p) {
percent = p;
theProgress.setAmount(percent);
hammer.play();
}
function turnOn() {
_visible = true;
}
function turnOff() {
hammer.gotoAndStop(0);
_visible = false;
}
var percent = 0;
var loaded = false;
}
Symbol 1699 MovieClip [__Packages.ProgressBar] Frame 0
class ProgressBar extends MovieClip
{
var gotoAndStop;
function ProgressBar () {
super();
}
function onLoad() {
}
function setAmount(a) {
num = a;
(gotoAndStop(num));// not popped
amount = String(num + "%");
}
var amount = "100%";
var num = 100;
}
Symbol 1700 MovieClip [__Packages.ToggleButton] Frame 0
class ToggleButton extends MovieClip
{
var theButt, gotoAndStop, _parent;
function ToggleButton () {
super();
}
function onLoad() {
setButton();
}
function setButton() {
var back = this;
theButt.onRelease = function () {
back.toggleMe();
};
}
function setDown() {
isDown = true;
(gotoAndStop("down"));// not popped
}
function setUp() {
isDown = false;
(gotoAndStop("up"));// not popped
}
function toggleMe() {
if (!isDown) {
setDown();
_parent._parent.master.playSound(0, "click4.wav", 1);
} else {
setUp();
_parent._parent.master.playSound(0, "click5.wav", 1);
}
setButton();
myFunction();
}
function myFunction() {
}
var isDown = false;
}
Symbol 1701 MovieClip [__Packages.LevelStatus] Frame 0
class LevelStatus extends MovieClip
{
var gotoAndStop, s1, s2, s3;
function LevelStatus () {
super();
}
function onLoad() {
}
function setStars(i, color) {
stars = i;
setColor(color);
switch (i) {
case -1 :
gotoAndStop("blank");
break;
case 0 :
s1.gotoAndStop("empty");
s2.gotoAndStop("empty");
s3.gotoAndStop("empty");
break;
case 1 :
s1.gotoAndStop("default");
s2.gotoAndStop("empty");
s3.gotoAndStop("empty");
break;
case 2 :
s1.gotoAndStop("default");
s2.gotoAndStop("default");
s3.gotoAndStop("empty");
break;
case 3 :
s1.gotoAndStop("default");
s2.gotoAndStop("default");
s3.gotoAndStop("default");
}
}
function setGreen() {
setColor("green");
}
function setGold() {
setColor("gold");
}
function setColor(s) {
gotoAndStop(s);
}
var stars = 0;
}
Symbol 1702 MovieClip [__Packages.ResourceAmount] Frame 0
class ResourceAmount extends MovieClip
{
var _in, _out, net, myType, surplusDefecit, amount, _icon, hidden, gotoAndStop;
function ResourceAmount () {
super();
}
function onLoad() {
_in = 0;
_out = 0;
net = 0;
}
function boink() {
}
function setIn(i) {
_in = i;
}
function setOut(o) {
_out = o;
}
function setType(t) {
myType = t;
}
function setNet(n) {
net = n;
if (net == 0) {
surplusDefecit.gotoAndStop("default");
} else if (net > 0) {
surplusDefecit.gotoAndStop("surplus");
surplusDefecit.amount = net;
} else if (net < 0) {
surplusDefecit.gotoAndStop("defecit");
surplusDefecit.amount = Math.abs(net);
}
}
function showGlowy() {
surplusDefecit.glowy.gotoAndPlay("yellow");
}
function tick() {
}
function setAmount(a) {
a = Math.round(a * 10) / 10;
if (myType != K.SMOG) {
if (a < amount) {
_icon.gotoAndPlay("bounce");
} else if (a > amount) {
_icon.gotoAndPlay("make");
}
}
amount = a;
if (amount > 999) {
amount = 999;
}
if (!hidden) {
checkAmount();
}
}
function checkAmount() {
switch (myType) {
case K.ENERGY :
if (amount < 10) {
(gotoAndStop("1digit"));// not popped
} else if (amount < 100) {
(gotoAndStop("2digits"));// not popped
} else if (amount < 150) {
(gotoAndStop("low"));// not popped
} else if (amount < 350) {
(gotoAndStop("medium"));// not popped
} else {
(gotoAndStop("high"));// not popped
}
break;
case K.FOOD :
if (amount < 10) {
(gotoAndStop("1digit"));// not popped
} else if (amount < 25) {
(gotoAndStop("2digits"));// not popped
} else if (amount < 50) {
(gotoAndStop("medium"));// not popped
} else if (amount < 100) {
(gotoAndStop("high"));// not popped
} else {
(gotoAndStop("3digits"));// not popped
}
break;
case K.SMOG :
if (amount < 100) {
(gotoAndStop("low"));// not popped
} else if (amount < 500) {
(gotoAndStop("medium"));// not popped
} else {
(gotoAndStop("high"));// not popped
}
var _local2 = Math.floor(amount / 100) + 1;
var _local3 = "level" + _local2;
_icon.gotoAndStop(_local3);
break;
default :
(gotoAndStop("default"));// not popped
}
}
function hideMe() {
hidden = true;
(gotoAndStop("hide"));// not popped
}
function showMe() {
hidden = false;
setAmount(amount);
}
function error() {
if (myType != K.SMOG) {
_icon.gotoAndPlay("error");
}
}
}
Symbol 1703 MovieClip [__Packages.TextThing] Frame 0
class TextThing extends MovieClip
{
var theText, objective, obj, portrait, gotoAndStop, tutorial, titleName;
function TextThing () {
super();
}
function setText(t) {
theText = t;
}
function setObjective(o) {
objective = o;
o = o == undefined;
if (o) {
obj = "";
}
}
function setPortrait(p) {
portrait.gotoAndPlay(p);
}
function setTutorial(t) {
if ((t == undefined) || (t == "")) {
(gotoAndStop("default"));// not popped
} else {
(gotoAndStop("tutorial"));// not popped
tutorial.gotoAndStop(t);
}
}
function setTitle(t) {
titleName = t;
}
}
Symbol 1704 MovieClip [__Packages.HpBar] Frame 0
class HpBar extends MovieClip
{
var gotoAndStop;
function HpBar () {
super();
}
function onLoad() {
}
function setAmount(a) {
amount = Math.round(a);
(gotoAndStop(amount));// not popped
}
var amount = 100;
}
Symbol 1705 MovieClip [__Packages.UsageMeter] Frame 0
class UsageMeter extends MovieClip
{
var uses1, uses2, makes1, makes2, makes3;
function UsageMeter () {
super();
}
function onLoad() {
}
function setUsage(u1, u2) {
uses1.setAmount(-Math.abs(u1));
uses2.setAmount(-Math.abs(u2));
}
function setMake(m1, m2, m3) {
makes1.setAmount(m1);
makes2.setAmount(m2);
makes3.setAmount(m3);
}
function setUseResources(u1, u2) {
uses1.setResource(u1);
uses2.setResource(u2);
}
function setMakeResources(m1, m2, m3) {
makes1.setResource(m1);
makes2.setResource(m2);
makes3.setResource(m3);
}
}
Symbol 1706 MovieClip [__Packages.UsageLine] Frame 0
class UsageLine extends MovieClip
{
var theAmount, gotoAndStop, amount, theResource, resource;
function UsageLine () {
super();
}
function onLoad() {
}
function setAmount(amt) {
theAmount = amt;
if (theAmount < 0) {
(gotoAndStop("uses"));// not popped
} else if (theAmount > 0) {
(gotoAndStop("makes"));// not popped
} else {
(gotoAndStop("default"));// not popped
}
theAmount = Math.abs(amt);
amount = String(theAmount);
}
function setResource(what) {
onLoad = function () {
this.theResource = what;
this.resource.gotoAndStop(this.theResource);
};
theResource = what;
resource.gotoAndStop(theResource);
}
}
Symbol 1707 MovieClip [__Packages.Terrain] Frame 0
class Terrain extends MovieClip
{
var master, tBmp, tileset, attachMovie, getNextHighestDepth, createEmptyMovieClip, cBmp, canvas, bakeLevel, bakeBmp;
function Terrain () {
super();
}
function onLoad() {
}
function setMaster(d) {
master = d;
}
function makeMap() {
setup();
drawTheMap();
}
function setup() {
tBmp = new flash.display.BitmapData(K.TILESET_WIDTH_PX, K.TILESET_WIDTH_PX, false, 0);
tileset = attachMovie("mc_tileset", "tileset", getNextHighestDepth());
tileset._x = -tileset._width;
tileset._y = -tileset._height;
tBmp.draw(tileset);
tileset.removeMovieClip();
createEmptyMovieClip("canvas", getNextHighestDepth());
cBmp = new flash.display.BitmapData(getPxWidth(), getPxHeight(), false, 15658751);
canvas.attachBitmap(cBmp, 2, "auto", true);
}
function setBakeLevel(i) {
bakeLevel.gotoAndStop(i);
bakeBmp.draw(bakeLevel);
}
function getPxWidth() {
return(master.getLvlPxWidth());
}
function getPxHeight() {
return(master.getLvlPxHeight());
}
function drawTheMap() {
if (master.lData.bakedLevel == false) {
K.success(c, "drawTheMap", "drawing map!");
var _local3 = 0;
while (_local3 < getHeight()) {
var _local2 = 0;
while (_local2 < getWidth()) {
pasteTile(getTile(_local2, _local3), _local2, _local3);
_local2++;
}
_local3++;
}
master.onMapDrawn();
} else {
bakeLevel = attachMovie("mc_levelBaker", "bakeLevel", getNextHighestDepth());
drawBakeLevel();
K.success(c, "drawTheMap", "drawing map!");
master.onMapDrawn();
}
}
function getHeight() {
return(master.getLvlHeight());
}
function getWidth() {
return(master.getLvlWidth());
}
function getTile(xx, yy) {
return(master.getLvlTile(xx, yy));
}
function buildMode(str) {
}
function unBuildMode() {
}
function onPress() {
master.onPressTerrain();
}
function onRelease() {
master.onClickTerrain();
}
function onReleaseOutside() {
master.onClickTerrainOutside();
}
function pasteTile(i, xx, yy) {
var _local3 = Math.floor(i / K.TILESET_WIDTH) * K.TILE_SIZE;
var _local4 = (i % K.TILESET_WIDTH) * K.TILE_SIZE;
var _local2 = new flash.geom.Rectangle(_local4, _local3, K.TILE_SIZE, K.TILE_SIZE);
blitTile(_local2, xx, yy);
}
function drawBakeLevel() {
setBakeLevel(master.lData.myIndex);
cBmp.copyPixels(bakeBmp);
}
function blitTile(rect, xx, yy) {
cBmp.copyPixels(tBmp, rect, new flash.geom.Point(xx * K.TILE_SIZE, yy * K.TILE_SIZE));
}
var c = "Terrain";
}
Symbol 1708 MovieClip [__Packages.ArrowCursor] Frame 0
class ArrowCursor extends MovieClip
{
var wGutter, eGutter, nGutter, sGutter, sMap, wMap, eMap, nMap, master, gotoAndStop, _x, _y;
function ArrowCursor () {
super();
}
function onLoad() {
Mouse.hide();
wGutter = K.TILE_SIZE * 3;
eGutter = K.SCREEN_WIDTH_PX - (K.TILE_SIZE * 2);
nGutter = K.INT_OFF_Y_PX + (K.TILE_SIZE * 2);
sGutter = (K.INT_OFF_Y_PX + K.SCREEN_HEIGHT_PX) - (K.TILE_SIZE * 2);
sMap = sGutter - 100;
wMap = wGutter + 100;
eMap = K.SCREEN_WIDTH_PX;
nMap = K.INT_OFF_Y_PX;
}
function setMaster(d) {
master = d;
}
function showCursor(s) {
(gotoAndStop(s));// not popped
}
function hideCursor() {
}
function onMouseMove() {
_x = master._xmouse;
_y = master._ymouse;
}
}
Symbol 1709 MovieClip [__Packages.LevelData] Frame 0
#initclip
if (!_global.LevelData) {
var _local1 = function (i, d) {
super();
};
_global.LevelData = _local1;
//_global.LevelData extends Object
var _local2 = _local1.prototype;
_local2.setMaster = function (d) {
this.master = d;
};
_local2.initialize = function (i, d) {
this.setMaster(d);
this.setLevel(i);
};
_local2.setLevel = function (i) {
if ((i >= (-K.MAX_LEVEL)) && (i <= K.MAX_LEVEL)) {
this.myIndex = Math.abs(i);
switch (i) {
case 0 :
this.loadLevel("_level_test");
this.loadLevel("_level_test_p");
this.bakedLevel = false;
this.onWithTheShow();
break;
case -1 :
this.levelSand1();
this.onWithTheShow();
this.inSandbox = true;
break;
case -2 :
this.levelSand2();
this.onWithTheShow();
this.inSandbox = true;
break;
case -3 :
this.levelSand3();
this.onWithTheShow();
this.inSandbox = true;
break;
case -4 :
this.levelSand4();
this.onWithTheShow();
this.inSandbox = true;
break;
case -5 :
this.levelSand5();
this.onWithTheShow();
this.inSandbox = true;
break;
case -6 :
this.levelSand6();
this.onWithTheShow();
this.inSandbox = true;
break;
case -7 :
this.levelSand7();
this.onWithTheShow();
this.inSandbox = true;
break;
case -8 :
this.levelSand8();
this.onWithTheShow();
this.inSandbox = true;
break;
case -9 :
this.levelSand9();
this.onWithTheShow();
this.inSandbox = true;
break;
case -10 :
this.levelSand10();
this.onWithTheShow();
this.inSandbox = true;
break;
case 1 :
this.level1();
this.onWithTheShow();
break;
case 2 :
this.level2();
this.onWithTheShow();
break;
case 3 :
this.level3();
this.onWithTheShow();
break;
case 4 :
this.level4();
this.onWithTheShow();
break;
case 5 :
this.level5();
this.onWithTheShow();
break;
case 6 :
this.level6();
this.onWithTheShow();
break;
case 7 :
this.level7();
this.onWithTheShow();
break;
case 8 :
this.level8();
this.onWithTheShow();
break;
case 9 :
break;
case 10 :
break;
default :
this.loadLevel("_level_" + this.myIndex);
this.loadLevel(("_level_" + this.myIndex) + "_p");
}
} else {
K.error(this.c, "setLevel", ("index " + i) + " is out of bounds");
}
};
_local2.getBuildingArray = function () {
var _local6 = new Array();
var _local7 = this.pArray[0].length;
var _local3 = 0;
while (_local3 < this.pArray.length) {
var _local2 = 0;
while (_local2 < _local7) {
var _local4 = K.propertyToBuilding(this.pArray[_local3][_local2]);
if (_local4 != "") {
var _local5 = new Object();
_local5.xLoc = _local2;
_local5.yLoc = _local3;
_local5.p = _local4;
_local6.push(_local5);
this.pArray[_local3][_local2] = K.DIRT;
if (_local4 == K._SUPERFARM) {
this.pArray[_local3][_local2] = K.GRASS;
} else if (_local4 == K._OILGASWELL) {
this.pArray[_local3][_local2] = K.OIL;
} else if (_local4 == K._GEOPLANT) {
this.pArray[_local3][_local2] = K.GEO;
} else if (_local4 == K._SUPERGEOPLANT) {
this.pArray[_local3][_local2] = K.GEO_BIG;
}
}
_local2++;
}
_local3++;
}
return(_local6);
};
_local2.getStartLoc = function () {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < this.pArray.length) {
var _local2 = 0;
while (_local2 < this.pArray[_local3].length) {
if (this.pArray[_local3][_local2] == K.START) {
this.startX = _local2;
this.startY = _local3;
var _local4 = new Array(this.startX, this.startY);
_local5.push(_local4);
break;
}
_local2++;
}
_local3++;
}
return(_local5);
};
_local2.getTiles = function () {
return(this.tArray);
};
_local2.getProperties = function () {
return(this.pArray);
};
_local2.getTile = function (xx, yy) {
return(this.tArray[yy][xx] - 1);
};
_local2.getProp = function (xx, yy) {
return(this.pArray[yy][xx]);
};
_local2.setProp = function (xx, yy, i) {
this.pArray[yy][xx] = i;
};
_local2.getPWidth = function () {
return(this.pWidth);
};
_local2.getPHeight = function () {
return(this.pHeight);
};
_local2.getWidth = function () {
return(this.myWidth);
};
_local2.getHeight = function () {
return(this.myHeight);
};
_local2.getPxWidth = function () {
return(this.myWidth * K.TILE_SIZE);
};
_local2.getPxHeight = function () {
return(this.myHeight * K.TILE_SIZE);
};
_local2.loadLevel = function (fName) {
var _local2 = new XML();
_local2.ignoreWhite = true;
var _local3 = K.getLocalRawPath();
_local3 = _local3 + (fName + ".xml");
var back = this;
_local2.onLoad = function (didItWork) {
if (didItWork) {
K.success(back.c, "loadLevel", "XML loaded!");
back.onLoadLevel(this.firstChild);
} else {
K.error(back.c, "loadLevel", "XML failed to load!");
}
};
_local2.load(_local3);
};
_local2.onLoadLevel = function (theLevel) {
if (theLevel.nodeName.toUpperCase() == "ENERGYCRAFT") {
K.success(this.c, "loadLevel", "map is valid ENERGYCRAFT map...");
var _local2 = theLevel.firstChild;
if (_local2.nodeName.toUpperCase() == "TILES") {
K.success(this.c, "loadLevel", "type = TILES");
this.parseMap(_local2.firstChild, K.TILES);
} else if (_local2.nodeName.toUpperCase() == "PROPERTIES") {
K.success(this.c, "loadLevel", "type = PROPERTIES");
this.parseMap(_local2.firstChild, K.PROPERTIES);
} else {
K.error(this.c, "loadLevel", "type = UNKNOWN");
}
} else {
K.error(this.c, "loadLevel", "map is NOT valid ENERGYCRAFT map!");
}
};
_local2.parseMap = function (mapData, type) {
var _local4 = new Array();
var _local6 = mapData;
var _local2 = null;
var _local7 = 0;
var _local5 = 0;
var _local9 = 0;
var _local8 = 0;
while (_local6 != null) {
_local7 = 0;
_local2 = _local6.firstChild;
_local4[_local5] = new Array();
while (_local2 != null) {
_local4[_local5].push(Number(_local2.firstChild.nodeValue));
_local7++;
_local2 = _local2.nextSibling;
}
_local9 = _local7;
_local5++;
_local6 = _local6.nextSibling;
}
_local8 = _local5;
if (type == K.TILES) {
this.tArray = _local4;
this.myWidth = _local9;
this.myHeight = _local8;
} else if (type == K.PROPERTIES) {
this.pArray = _local4;
this.pWidth = _local9;
this.pHeight = _local8;
}
K.success(this.c, "parseMap", "Level finished loading! Notifying master...");
var _local3 = 0;
while (_local3 < _local8) {
_local3++;
}
this.master.levelDataLoaded(type);
};
_local2.onWithTheShow = function () {
this.master.levelDataLoaded(K.TILES);
this.master.levelDataLoaded(K.PROPERTIES);
};
_local2.getStartDayTime = function () {
return(this.missionTime[2]);
};
_local2.getDayHours = function () {
return(this.missionTime[0] * K.CYCLETIME);
};
_local2.getNightHours = function () {
return(this.missionTime[1] * K.CYCLETIME);
};
_local2.level20 = function () {
this.titleName = "Sandbox Mode";
this.missionTime = [8, 2, 1];
this.noMansLand = [true, false, true, false];
this.pArray = new Array(16);
this.pArray[0] = new Array(100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[1] = new Array(100, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[2] = new Array(100, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 100);
this.pArray[3] = new Array(100, 0, 2, 1, 2, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[4] = new Array(100, 2, 2, 2, 13, 14, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[5] = new Array(100, 2, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[6] = new Array(100, 0, 2, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[7] = new Array(100, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.pArray[8] = new Array(100, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 100);
this.pArray[9] = new Array(100, 2, 2, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 4, 100);
this.pArray[10] = new Array(100, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 100);
this.pArray[11] = new Array(100, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 100);
this.pArray[12] = new Array(100, 2, 2, 2, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 100);
this.pArray[13] = new Array(100, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 3, 100);
this.pArray[14] = new Array(100, 2, 2, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 100);
this.pArray[15] = new Array(100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100);
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.disables = new Array();
this.spawnRate = 3;
this.spawnTicks = 2;
this.increaseRate = 1;
this.increaseTicks = 2;
this.textPortraits = new Array();
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode is currently under construction. All features are unlocked here, eventually there will be more maps. There is no objective but to not die. Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Pardon our dust.";
this.titleName = "Sandbox.";
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 400, 200, 100, 100];
this.disables = [];
this.energyDefecits = false;
this.foodDefecits = false;
};
_local2.level1 = function () {
this.titleName = "Chapter 1:\nTaking Out the Trash";
this.myWidth = 42;
this.myHeight = 32;
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(this.pHeight);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 1, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.missionTime = [-1, 3, 0];
this.noMansLand = [true, true, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.textPortraits = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.tutorials = new Array();
this.spawnRate = 0;
this.spawnTicks = 1;
this.increaseRate = 0;
this.increaseTicks = 100;
this.textPortraits[0] = "wurstagen";
this.texts[0] = "HQ! HQ! We have multiple hostiles enroute! They're like nothing I've ever seen before!";
this.objectives[0] = "???";
this.objInfo[0] = "survive";
this.actions[0] = "spawn";
this.waves[0] = 10;
this.tutorials[0] = "nomansland";
this.textPortraits[1] = "wurstagen";
this.texts[1] = "There's another wave inbound! Hold on tight! We'll need to repair those turrets soon!";
this.objectives[1] = "Survive the zombie onslaught";
this.objInfo[1] = "survive";
this.actions[1] = "spawn";
this.waves[1] = 15;
this.tutorials[1] = "repair";
this.textPortraits[2] = "wurstagen";
this.texts[2] = "Those monsters...they're eating the dead bodies. They're growing stronger! Gross! We better clean up all the corpses before another wave gets here! We'll need a factory.";
this.objectives[2] = "Build a factory";
this.objInfo[2] = "b_factory_01";
this.actions[2] = "multi";
this.multiActions[2] = new Array("e_Factory", "e_Demolish");
this.tutorials[2] = "building";
this.textPortraits[3] = "wurstagen";
this.texts[3] = "I'm not touching that nasty stuff, we need some garbage trucks.";
this.objectives[3] = "Build a garbage truck";
this.objInfo[3] = "u_garbagetruck_01";
this.tutorials[3] = "units";
this.textPortraits[4] = "wurstagen";
this.texts[4] = "Guess we need to put that stuff somewhere, huh? Let's build a landfill.";
this.objectives[4] = "Build a landfill";
this.objInfo[4] = "b_landfill_01";
this.actions[4] = "e_LandFill";
this.tutorials[4] = "building_landfill";
this.textPortraits[5] = "wurstagen";
this.texts[5] = "Okay, let's get this mess cleared up. Feel free to build more trucks if we have to.";
this.objectives[5] = "Clean up the garbage";
this.objInfo[5] = "clean_garbage";
this.tutorials[5] = "garbage_eat";
this.textPortraits[6] = "wurstagen";
this.texts[6] = "Looks like there's another wave massing. They're waiting for cover of darkness - I think they're sensitive to daylight. This time we'll be ready. Time to build some defenses.";
this.objectives[6] = "Build 4 floodlights";
this.objInfo[6] = "b_FloodLights_04";
this.actions[6] = "e_Defenses";
this.waves[6] = 0;
this.tutorials[6] = "defenses";
this.textPortraits[7] = "wurstagen";
this.texts[7] = "Good job. Now we just wait for dark...";
this.objectives[7] = "Wait for dark.";
this.objInfo[7] = "wait_dark";
this.actions[7] = "time_001";
this.tutorials[7] = "time";
this.waves[7] = 0;
this.textPortraits[8] = "wurstagen";
this.texts[8] = "Here they come. Time to take out the trash.";
this.objInfo[8] = "survive";
this.objectives[8] = "Survive the zombie onslaught.";
this.tutorials[8] = "";
this.waves[8] = 30;
this.actions[8] = "spawn";
this.textPortraits[9] = "wurstagen";
this.texts[9] = "That's the last of them! I wonder if any other bases survived?";
this.objInfo[9] = "";
this.objectives[9] = "Congratulations! \n\nYou win!";
this.actions[9] = "victory";
this.visibleResources = [false, false, false, false, true, false, false];
this.rAmounts = [999999, 999999, 0, 0, 999, 99999, 99999];
this.disables = ["", "NatGas", "Electric", "Ethanol", "Lab", "Factory", "Defenses", "PowerPlant", "Farm", "Mine", "OilGasWell", "NuclearDump", "LandFill", "Engineer", "TeslaCoil", "FlameTurret", "Demolish"];
this.energyDefecits = false;
this.foodDefecits = false;
this.tutorialMode = true;
};
_local2.level2 = function () {
this.titleName = "CHAPTER 2:\nGet Juiced!";
this.energyDefecits = true;
this.foodDefecits = false;
this.tutorialMode = true;
this.myWidth = 42;
this.myHeight = 32;
this.pWidth = 21;
this.myHeight = 16;
this.pArray = new Array(16);
this.gArray = new Array();
this.gArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0);
this.gArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 0, 0, 0, 15, 0, 5, 0, 0, 0, 0);
this.gArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 15, 0, 0, 0, 0, 15, 0, 5, 0, 0, 0);
this.gArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0);
this.gArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[7] = new Array(0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[8] = new Array(0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[9] = new Array(0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[10] = new Array(0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0);
this.gArray[11] = new Array(0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0);
this.gArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0);
this.gArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[14] = new Array(0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[15] = new Array(0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 2, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1, 0, 2, 2, 2);
this.pArray[8] = new Array(0, 0, 0, 0, 2, 45, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 2, 2, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 2, 2, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0);
this.missionTime = [-1, 3, true];
this.noMansLand = [true, true, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.disables = new Array();
this.spawnRate = 0;
this.spawnTicks = 1;
this.increaseRate = 0;
this.increaseTicks = 100;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
this.visibleResources = [true, false, true, false, true, false, true];
this.rAmounts = [0, 9999, 0, 0, 500, 0, 500];
this.disables = ["", "NatGas", "Electric", "Ethanol", "Food", "Research", "Gas", "Lab", "Defenses", "PowerPlant", "GasPlant", "WindPlant", "SolarPlant", "GeoPlant", "NuclearPlant", "Farm", "Mine", "OilGasWell", "NuclearDump", "Engineer", "TeslaCoil", "FlameTurret"];
this.conditions[0] = "smog_300";
this.events[0] = "e_u_powerplant";
var _local2 = 0;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Can anyone hear me? This is the New Texas Gunslingers! We're here to help!";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Hello! We hear you! Welcome to New Houston! Or... what's left of it.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Name and rank, soldier..";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "I'm Ralph Remington, and I'm not a soldier, I'm a NUKEE - nuclear engineer. Or was. I suppose everyone's a soldier these days.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Howdy, Ralph. I'm Dr. Ananastasia Wurstwagen, with the New Texas Gunslingers. I'm an architect and systems engineer.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "You mean the Gunslingers are REAL? Boy are we glad to see ya'll! Surviving last night's zombie attack used up all our energy. We need to get the base up and running before they come back!";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstagen";
this.texts[_local2] = "Don't worry, we brought plenty of fuel with us. We'll get you back up to spec in no time.";
this.objectives[_local2] = "Produce 150 Energy.";
this.objInfo[_local2] = "r_energy_150";
this.actions[_local2] = "e_PowerPlant";
this.tutorials[_local2] = "powerplant";
_local2++;
this.textPortraits[_local2] = "wurstagen";
this.texts[_local2] = "It's hard to work when everything's full of trash and zombie guts, better build a factory and some garbage trucks to clean it up.";
this.objectives[_local2] = "Build 2 Garbage Trucks.";
this.objInfo[_local2] = "u_garbagetruck_02";
this.tutorials[_local2] = "warn_garbage";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Looks like we're making quite a bit of smog from our power plant and vehicles. We better upgrade them. Time to build a lab.";
this.objectives[_local2] = "Build a lab.";
this.objInfo[_local2] = "b_lab_01";
this.actions[_local2] = "e_Lab";
this.tutorials[_local2] = "";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Alright, now I have some facilities. I'll start looking into ways to clean up the air. This will take time...";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
this.tutorials[_local2] = "lab";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Aww... can't we just hang up some air fresheners or something?";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.tutorials[_local2] = "warn_smog";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Get to work you lazy bum! Go fetch my instruments!";
this.objInfo[_local2] = "r_research_100";
this.objectives[_local2] = "Generate 100 Research Points.";
this.actions[_local2] = "e_Research";
this.tutorials[_local2] = "multilab";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Good news, with a little work we can upgrade our power plants to make them more efficient. This will increase energy output and lower emissions.";
this.objInfo[_local2] = "up_ffplant";
this.objectives[_local2] = "Upgrade your power plants.";
this.tutorials[_local2] = "upgrade_plants";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Ah, smell those new, improved, low-fat fossil fuels!";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "It's just a start... this is some pretty crappy gasoline we're using here. We can research and upgrade to other fuel types, too, like Natural Gas, Ethanol and Electric. But just do gasoline now.";
this.objectives[_local2] = "Upgrade your GASOLINE fuel.";
this.objInfo[_local2] = "up_f_gasoline";
this.tutorials[_local2] = "fuel";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Okay, we'll still need to generate some more energy in case the zombies come back. Let's crank out some more.";
this.objInfo[_local2] = "r_energy_300";
this.objectives[_local2] = "Produce 300 Energy.";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Allright! Now I can charge my gameboy!";
this.objInfo[_local2] = "talk";
this.objectives[_local2] = "";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Let's move out, the countryside is teeming with zombies. We'll be safer in Carthage";
this.objInfo[_local2] = "talk";
this.objectives[_local2] = "";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Hang on! I've almost - awww. My princess is in another castle...";
this.objInfo[_local2] = "victory";
this.objectives[_local2] = "Congrats! You win!";
this.actions[_local2] = "victory";
};
_local2.level3 = function () {
this.titleName = "CHAPTER 3:\nEat Drink, and Blow Stuff Up.";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
var _local2 = new Object();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 4, 4, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 2, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 45, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 2, 2, 2, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 4, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0);
this.pArray[13] = new Array(0, 0, 4, 4, 2, 2, 2, 2, 2, 2, 0, 0, 42, 0, 0, 0, 0, 0, 0, 4, 0);
this.pArray[14] = new Array(0, 45, 0, 4, 4, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 0;
this.spawnTicks = 1;
this.increaseRate = 0;
this.increaseTicks = 100;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
this.visibleResources = [true, true, true, true, true, false, true];
this.rAmounts = [500, 1, 0, 0, 0, 0, 300];
this.disables = ["", "Gas", "Defenses", "GasPlant", "WindPlant", "SolarPlant", "GeoPlant", "NuclearPlant", "OilGasWell", "NuclearDump", "Engineer", "TeslaCoil", "FlameTurret"];
this.missionTime = [-1, 3, true];
this.noMansLand = [true, true, true, false];
this.textPortraits[0] = "wurstwagen";
this.texts[0] = "We used up most of our supplies getting here to Carthage and the men are practically starving. Looks like we're going to have to grow our own food from now on. We need to build some farms.";
this.actions[0] = "e_farm";
this.objectives[0] = "Build 2 farms";
this.objInfo[0] = "b_farm_02";
this.tutorials[0] = "food";
this.textPortraits[1] = "ralph";
this.texts[1] = "Wow, this tastes way better than fried zombie guts! Our buildings should work better now that they're well fed. Just be sure we always have enough food for all our buildings. I never want to eat zombie again.";
this.actions[1] = "talk";
this.objectives[1] = "";
this.objInfo[1] = "talk";
this.textPortraits[2] = "wurstwagen";
this.texts[2] = "Well, now that we've eaten, we'd better get to refilling our stockpiles. We need metal for our bullets. Better mine the metal ore from the rocks.";
this.actions[2] = "e_mine";
this.objectives[2] = "Mine 300 metal";
this.objInfo[2] = "r_metal_300";
this.tutorials[2] = "bullets";
this.textPortraits[3] = "ralph";
this.texts[3] = "Dr. Wurstwagen! We've got the metal stockpiled!";
this.actions[3] = "talk";
this.objectives[3] = "";
this.objInfo[3] = "talk";
this.textPortraits[4] = "wurstwagen";
this.texts[4] = "And not a moment too soon - Radar says we've got hostiles just a few miles out! Quick, get some turrets in place!";
this.actions[4] = "multi";
this.multiActions[4] = new Array("time_0010", "e_Defenses");
this.objectives[4] = "Prepare your defenses before the zombies arrive";
this.waves[4] = 10;
this.objInfo[4] = "wait_dark";
this.tutorials[4] = "nomansland";
this.textPortraits[5] = "wurstwagen";
this.texts[5] = "Lock and load, boys.";
this.actions[5] = "spawn";
this.objectives[5] = "Survive the zombie onslaught";
this.waves[5] = 20;
this.objInfo[5] = "survive";
this.textPortraits[6] = "ralph";
this.texts[6] = "All hostiles have been neutralized, ma'am.";
this.actions[6] = "talk";
this.objectives[6] = "";
this.objInfo[6] = "talk";
this.textPortraits[7] = "wurstwagen";
this.texts[7] = "Good work, boys. Let's move out and keep loooking for survivors.";
this.actions[7] = "victory";
this.objectives[7] = "Congrats! You Win!";
this.objInfo[7] = "victory";
};
_local2.level4 = function () {
this.titleName = "CHAPTER 4:\nTexas Tea";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
var _local2 = new Object();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 21, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0);
this.pArray[14] = new Array(0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 10;
this.spawnTicks = 1;
this.increaseRate = 5;
this.increaseTicks = 100;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [200, 100, 0, 50, 100, 0, 30];
this.disables = ["", "GasPlant", "WindPlant", "SolarPlant", "GeoPlant", "NuclearPlant", "NuclearDump", "Engineer", "TeslaCoil", "FlameTurret"];
this.missionTime = [-1, 3, true];
this.noMansLand = [true, true, false, false];
this.textPortraits[0] = "wurstwagen";
this.texts[0] = "We're running low on fuel, and I don't see any self serve post-apocalyptic gas stations anywhere, so it looks like were going to have to get it ourselves. Time to start drilling.";
this.actions[0] = "e_OilGasWell";
this.objectives[0] = "Build an oil well";
this.objInfo[0] = "b_oilgaswell_01";
this.tutorials[0] = "oilgaswell";
this.textPortraits[1] = "wurstwagen";
this.texts[1] = "Alright, now we just need to stockpile some of this...";
this.objectives[1] = "";
this.objInfo[1] = "talk";
this.actions[1] = "talk";
this.tutorials[1] = "";
this.textPortraits[2] = "ralph";
this.texts[2] = "Hey, boss! There's something else here too! We're getting gas!";
this.objectives[2] = "";
this.objInfo[2] = "talk";
this.actions[2] = "talk";
this.tutorials[2] = "";
this.textPortraits[3] = "wurstwagen";
this.texts[3] = "Thanks for sharing...";
this.objectives[3] = "";
this.objInfo[3] = "talk";
this.actions[3] = "talk";
this.tutorials[3] = "";
this.textPortraits[4] = "ralph";
this.texts[4] = "No, like - the natural kind. Well - er - the OTHER natural kind. Natural gas!";
this.objectives[4] = "";
this.objInfo[4] = "talk";
this.actions[4] = "talk";
this.tutorials[4] = "";
this.textPortraits[5] = "wurstwagen";
this.texts[5] = "That's great! Maybe we can use it for energy...It should burn cleaner than fossil fuels. Let's build a natural gas plant!";
this.objectives[5] = "Build a natural gas plant.";
this.objInfo[5] = "b_gasPlant_01";
this.actions[5] = "multi";
this.multiActions[5] = new Array("e_GasPlant", "e_PowerPlant");
this.tutorials[5] = "";
this.textPortraits[6] = "wurstwagen";
this.texts[6] = "Alright, we're getting things running and we've got fuel coming in. Better make it last ... we can't count on finding oil reserves everywhere.";
this.objectives[6] = "";
this.objInfo[6] = "talk";
this.actions[6] = "talk";
this.tutorials[6] = "";
this.textPortraits[7] = "ralph";
this.texts[7] = "...Boss? We're getting something on radar, and it doesn't look friendly...";
this.objectives[7] = "";
this.objInfo[7] = "talk";
this.actions[7] = "talk";
this.tutorials[7] = "";
this.textPortraits[8] = "wurstwagen";
this.texts[8] = "It's them! The zombies have followed us! Put some turrets up and dig in! There's gonna be a fight tonight!";
this.objectives[8] = "Live to see tomorrow!";
this.objInfo[8] = "morning_survive";
this.actions[8] = "time_0025";
this.tutorials[8] = "";
this.textPortraits[9] = "wurstwagen";
this.texts[9] = "Good job, boys. Man - I wonder where these things came from?";
this.objectives[9] = "Congrats! You win!";
this.objInfo[9] = "victory";
this.actions[9] = "victory";
this.tutorials[9] = "";
};
} else {
// unexpected jump
}
_local2.level5 = function () {
this.titleName = "CHAPTER 5:\n It's pronounced \"NUKE-ular\".";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = false;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 44, 0, 15, 15, 0, 0, 1, 0, 0, 40, 0, 4, 4, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray = new Array();
this.gArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[1] = new Array(0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[2] = new Array(0, 0, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[3] = new Array(0, 0, 0, -3, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[4] = new Array(0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[5] = new Array(0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [900, 100, 0, 50, 100, 100, 100];
this.disables = ["", "WindPlant", "SolarPlant", "GeoPlant", "NuclearPlant", "NuclearDump", "Engineer", "TeslaCoil", "FlameTurret"];
this.missionTime = [-1, 3, true];
this.noMansLand = [true, false, false, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 10;
this.spawnTicks = 3;
this.increaseRate = 1;
this.increaseTicks = 50;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
var _local2 = 0;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Wow! How on earth did you get this much energy?";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Oh, just a little something we like to call, \"Nuclear Power\"";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "What about the spent fuel rods? I don't see any nuclear waste dumps...";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Um... are we supposed to do be doing something about those? They are starting to pile up...";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Are you crazy?! Why don't you just put a big sign over your base that says \"Hey creepy spider dudes! Delicious zombie steriods right here! Tasty, tasty!\"";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Wait - you mean the stories are TRUE?";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "You bet they are - zombies are swarming all over New Texas, and they'll be here any day now.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Um... I'm going to go hide in the basement if you don't mind.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Well, now that Homer Simpson here is out of the way, let's make way for a REAL nuclear engineer. We need to disable those Nuclear Power Plants immediately. We can't risk making any more waste until we've got a safe place to store it.";
this.actions[_local2] = "";
this.objectives[_local2] = "Disable the nuclear power plants.";
this.objInfo[_local2] = "d_nuclearplant";
this.tutorials[_local2] = "disable";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Alright, night's coming fast and we still have delicious nuclear zombie treats lying all over the base. We need a place to store it now.";
this.actions[_local2] = "multi";
this.objectives[_local2] = "Build a nuclear waste dump.";
this.objInfo[_local2] = "b_nucleardump_01";
this.multiActions[_local2] = new Array("e_NuclearPlant", "e_NuclearDump");
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Regular Garbage Trucks can't handle this stuff. Time to call in the pros. We need to manufacture some specialized vehicles for my fellow NUKEE's. Get to the factory.";
this.actions[_local2] = "e_Engineer";
this.objectives[_local2] = "Build 3 engineers.";
this.objInfo[_local2] = "u_engineer_03";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Okay, cleanup crew is on its way. Now that we've got safe waste facilities, we can re-enable these plants.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "We'd better get to work! Radar says we've got company on the way a few miles out. They're big, mean and in the mood for Nuclear Waste burgers. I've come up with a new defense structure - the TESLACOIL!";
this.actions[_local2] = "multi";
this.multiActions[_local2] = new Array("time_014", "e_TeslaCoil");
this.objectives[_local2] = "Live to see tomorrow.";
this.objInfo[_local2] = "morning_survive";
this.tutorials[_local2] = "teslacoil";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "That's right, you better run!";
this.actions[_local2] = "victory";
this.objectives[_local2] = "Congrats! You win!";
this.objInfo[_local2] = "victory";
};
_local2.level6 = function () {
this.titleName = "CHAPTER 6:\n It's getting hot in here....";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 4, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 4, 4, 9, 10, 9, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 4, 0, 9, 9, 9, 0, 40, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 4, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 100, 0, 50, 100, 25, 25];
this.disables = ["WindPlant", "SolarPlant", "GeoPlant"];
this.missionTime = [5, 2, true];
this.noMansLand = [true, false, false, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 5;
this.spawnTicks = 1;
this.increaseRate = 1;
this.increaseTicks = 100;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
var _local2 = 0;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Hey, what are those cracks in the ground?";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Those are areas of geothermal activity. We can build geothermal power plants there! Let's build some";
this.actions[_local2] = "e_GeoPlant";
this.objectives[_local2] = "Build a Geothermal power plant.";
this.objInfo[_local2] = "b_GeoPlant_01";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "We can build these anywhere that there's craters, but they'll be best if we build them directly on the main lava pit. Cap each one of the main pits with a Geothermal Power Plant.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Let's get this base up and running. The zombies have our scent, and they won't let us go without a fight.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "Produce 400 energy";
this.objInfo[_local2] = "r_energy_400";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "That should do it. Let's get out of here.";
this.actions[_local2] = "victory";
this.objectives[_local2] = "Congrats! You win.";
this.objInfo[_local2] = "victory";
};
_local2.level7 = function () {
this.titleName = "CHAPTER 7:\n It's a bad neighborhood.";
this.myWidth = 42;
this.myHeight = 32;
this.myIndex = 8;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0);
this.pArray[3] = new Array(0, 0, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 2, 2, 2, 13, 14, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 2, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 2, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0);
this.pArray[9] = new Array(0, 2, 2, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 4, 0);
this.pArray[10] = new Array(0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 2, 2, 2, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0);
this.pArray[13] = new Array(0, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 3, 0);
this.pArray[14] = new Array(0, 2, 2, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 50, 50, 35, 10];
this.disables = [];
this.missionTime = [15, 3, true];
this.noMansLand = [false, true, false, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 10;
this.spawnTicks = 2;
this.increaseRate = 1;
this.increaseTicks = 1;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
var _local2 = 0;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Hey! I think I see some more survivors over the next ridge! Lucky we set up shop here.";
this.actions[_local2] = "talk";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Help! We're completely surrounded! Our supplies are almost gone! The zombies will tear us to shreds!";
this.objectives[_local2] = "Don't let the other base die!";
this.objInfo[_local2] = "morning_survive";
this.actions[_local2] = "time_001";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Don't worry, the calvary's here. Let's build some defensive structures and ride out the next wave.";
this.objectives[_local2] = "Live to see tomorrow!";
this.objInfo[_local2] = "morning_survive";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "This place gives me the creeps. Let's get the survivors out of here until we can find a safe place to hold out.";
this.objectives[_local2] = "Congrats! You win!";
this.objInfo[_local2] = "victory";
this.actions[_local2] = "victory";
_local2++;
};
_local2.level8 = function () {
this.titleName = "CHAPTER 8:\n The Last Stand .";
this.myIndex = 10;
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0);
this.pArray[3] = new Array(0, 9, 9, 9, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0);
this.pArray[4] = new Array(0, 9, 10, 9, 0, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 3);
this.pArray[5] = new Array(0, 9, 9, 9, 0, 3, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 9, 9, 9, 0, 0, 3, 3);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 9, 10, 9, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 9, 9, 9, 0, 0, 3, 3, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 9, 10, 9, 0, 3, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 9, 9, 9, 3, 3, 0, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 3, 3, 0, 0, 0);
this.pArray[13] = new Array(0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0);
this.pArray[14] = new Array(3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [300, 100, 0, 50, 100, 25, 5];
this.disables = [];
this.missionTime = [10, 4, true];
this.noMansLand = [false, false, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = 7;
this.spawnTicks = 1;
this.increaseRate = 1;
this.increaseTicks = 1;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.tutorials = new Array();
var _local2 = 0;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "BAAAAAAD news, Doctor! We've been sabotaged! I caught the culprit red-handed - he trashed our research data, then he killed himself! I think the zombies drove him mad!";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "multi";
this.multiActions[_local2] = new Array("killresearch", "talk");
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Well, this might be the end. Trapped between two zombie zones...low on supplies. Time to make a desperate last stand.";
this.objectives[_local2] = "Survive 5 nights";
this.objInfo[_local2] = "morning_survive";
this.actions[_local2] = "";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Boss! Radio incoming! Someone called \"Colonel Thorvald Roosevelt\". He says he's found us and is coming with reinforcements!";
this.objectives[_local2] = "Survive 4 nights";
this.objInfo[_local2] = "morning_survive";
this.actions[_local2] = "";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "Another Radio transmisison! Colonel Roosevelt says he's sending a cargo plane ahead with supplies! It'll be here tomorrow!";
this.objectives[_local2] = "Survive 2 nights";
this.objInfo[_local2] = "morning_survive";
this.actions[_local2] = "";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "The Supplies! They're here! Let's make it last!";
this.objectives[_local2] = "Survive 1 night";
this.objInfo[_local2] = "morning_survive";
this.actions[_local2] = "resupply";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "We made it! I don't believe it!";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "fortress";
this.texts[_local2] = "Yeah, take THAT, zombie scum! Eat Texas! I mean, figuratively of course.";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "ralph";
this.texts[_local2] = "It's been a pleasure, Doctor. Now if you don't mind, I'm going to go take a shower.";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Pleasure's all mine, Ralph... we've saved New Texas!";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "...? What's this? ...a hatchling, among the rubble?";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "eddie";
this.texts[_local2] = "... Mamma? ";
this.objectives[_local2] = "";
this.objInfo[_local2] = "talk";
this.actions[_local2] = "talk";
_local2++;
this.textPortraits[_local2] = "wurstwagen";
this.texts[_local2] = "Heh. You'll just be my little secret, little one...";
this.objectives[_local2] = "Game Over! You win!";
this.objInfo[_local2] = "ultimatevictory";
this.actions[_local2] = "ultimatevictory";
_local2++;
};
_local2.levelSand1 = function () {
this.titleName = "Sandbox";
this.myWidth = 42;
this.myHeight = 32;
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(this.pHeight);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 1, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 45, 2, 2, 2, 2, 2, 45, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, false, true, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
// unexpected jump
// unexpected jump
_local2.levelSand2 = function () {
this.titleName = "Sandbox";
this.energyDefecits = true;
this.foodDefecits = false;
this.tutorialMode = true;
this.myWidth = 42;
this.myHeight = 32;
this.pWidth = 21;
this.myHeight = 16;
this.pArray = new Array(16);
this.gArray = new Array();
this.gArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0);
this.gArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 0, 0, 0, 15, 0, 5, 0, 0, 0, 0);
this.gArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 15, 0, 0, 0, 0, 15, 0, 5, 0, 0, 0);
this.gArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0);
this.gArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[7] = new Array(0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[8] = new Array(0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[9] = new Array(0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[10] = new Array(0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0);
this.gArray[11] = new Array(0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0);
this.gArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0);
this.gArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[14] = new Array(0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.gArray[15] = new Array(0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 2, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1, 0, 2, 2, 2);
this.pArray[8] = new Array(0, 0, 0, 0, 2, 45, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 2, 2, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 2, 2, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, false, true, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand3 = function () {
this.titleName = "Sandbox";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
var _local2 = new Object();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 4, 4, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 2, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 45, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 2, 2, 2, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 4, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0);
this.pArray[13] = new Array(0, 0, 4, 4, 2, 2, 2, 2, 2, 2, 0, 0, 42, 0, 0, 0, 0, 0, 0, 4, 0);
this.pArray[14] = new Array(0, 45, 0, 4, 4, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, false, true, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand4 = function () {
this.titleName = "Sandbox";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
var _local2 = new Object();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 21, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0);
this.pArray[14] = new Array(0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, true, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand5 = function () {
this.titleName = "Sandbox.";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 44, 0, 15, 15, 0, 0, 1, 0, 0, 40, 0, 4, 4, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, true, false, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand6 = function () {
this.titleName = "Sandbox";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 4, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 4, 4, 9, 10, 9, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 4, 0, 9, 9, 9, 0, 40, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 4, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, true, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand7 = function () {
this.titleName = "CHAPTER 7:\n .";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 9, 9, 9);
this.pArray[7] = new Array(0, 0, 0, 0, 3, 3, 3, 40, 3, 3, 1, 3, 3, 13, 3, 3, 3, 0, 9, 10, 9);
this.pArray[8] = new Array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 9, 9, 9);
this.pArray[9] = new Array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 42, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 4, 0, 0);
this.pArray[15] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 2);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [false, true, false, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand8 = function () {
this.titleName = "CHAPTER 8:\n .";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0);
this.pArray[3] = new Array(0, 0, 2, 1, 2, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[4] = new Array(0, 2, 2, 2, 13, 14, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 2, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 2, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[8] = new Array(0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0);
this.pArray[9] = new Array(0, 2, 2, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 4, 0);
this.pArray[10] = new Array(0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(0, 2, 2, 2, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0);
this.pArray[13] = new Array(0, 2, 2, 2, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 3, 0);
this.pArray[14] = new Array(0, 2, 2, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, true, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
// unexpected jump
// unexpected jump
_local2.levelSand9 = function () {
this.titleName = "CHAPTER 9:\n .";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
this.pArray[1] = new Array(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[3] = new Array(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4);
this.pArray[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 44, 45, 0, 45, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 40, 1, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2);
this.pArray[8] = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 41, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2);
this.pArray[9] = new Array(0, 0, 0, 0, 0, 9, 9, 9, 44, 45, 42, 45, 44, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 0, 9, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[12] = new Array(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[14] = new Array(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
this.pArray[15] = new Array(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [false, false, true, true];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.levelSand10 = function () {
this.titleName = "CHAPTER 10:\n .";
this.myWidth = 42;
this.myHeight = 32;
this.energyDefecits = true;
this.foodDefecits = true;
this.tutorialMode = true;
this.gArray = new Array();
this.pWidth = 21;
this.pHeight = 16;
this.pArray = new Array(16);
this.pArray[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[1] = new Array(0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0);
this.pArray[3] = new Array(0, 9, 9, 9, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 0);
this.pArray[4] = new Array(0, 9, 10, 9, 0, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 3);
this.pArray[5] = new Array(0, 9, 9, 9, 0, 3, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3);
this.pArray[6] = new Array(0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3);
this.pArray[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 9, 9, 0, 0, 3, 3);
this.pArray[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 9, 10, 9, 0, 0, 0, 0);
this.pArray[9] = new Array(0, 0, 0, 0, 9, 9, 9, 0, 0, 3, 3, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0);
this.pArray[10] = new Array(0, 0, 0, 0, 9, 10, 9, 0, 3, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0);
this.pArray[11] = new Array(0, 0, 0, 0, 9, 9, 9, 3, 3, 0, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0);
this.pArray[12] = new Array(0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 3, 3, 0, 0, 0);
this.pArray[13] = new Array(0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0);
this.pArray[14] = new Array(3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0);
this.pArray[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.visibleResources = [true, true, true, true, true, true, true];
this.rAmounts = [400, 50, 0, 0, 200, 50, 25];
this.disables = [];
this.missionTime = [5, 5, true];
this.noMansLand = [true, false, true, false];
this.texts = new Array();
this.objectives = new Array();
this.objInfo = new Array();
this.waves = new Array();
this.actions = new Array();
this.multiActions = new Array();
this.disables = new Array();
this.spawnRate = this.sandSpawnRate;
this.spawnTicks = this.sandSpawnTicks;
this.increaseRate = this.sandIncreaseRate;
this.increaseTicks = this.sandIncreaseTicks;
this.conditions = new Array();
this.events = new Array();
this.eventText = new Array();
this.textPortraits = new Array();
this.eventPortraits = new Array();
this.energyDefecits = true;
this.foodDefecits = true;
this.textPortraits[0] = "lars";
this.texts[0] = "Sandbox mode: All features are unlocked here. There is no objective but to not die. If you run out of fossil fuels or natural gas on some maps, you're SUPPOSED TO. Try out an alternative power source! Good luck!";
this.objInfo[0] = "";
this.objectives[0] = "Enjoy!";
this.titleName = "Sandbox.";
};
_local2.setVisibleResources = function (e, f, s, m, g, ff) {
this.visibleResources = new Array(e, f, s, m, g, ff);
};
_local2.setVisibleResource = function (i, a) {
this.visibleResources[i] = a;
};
_local2.getLevelEnemies = function () {
var _local2 = this.spawnRate;
if ((this.incTicks++) >= this.increaseTicks) {
this.incTicks = 0;
this.spawnRate = this.spawnRate + this.increaseRate;
}
return(_local2);
};
_local2.getNextObjective = function () {
this.currObjective++;
return(this.objectives[this.currObjective]);
};
_local2.defeat = function () {
this.actions[this.currObjective] = "defeat";
};
_local2.getCurrLevelIndex = function () {
if (!this.inSandbox) {
return(this.myIndex);
}
return(1);
};
_local2.getCurrText = function () {
return(this.texts[this.currObjective]);
};
_local2.getCurrObjective = function () {
if (this.objectives[this.currObjective] == undefined) {
return("");
}
return(this.objectives[this.currObjective]);
};
_local2.setCurrObjInfo = function (str) {
this.objInfo[this.currObjective] = str;
};
_local2.getCurrObjInfo = function () {
return(this.objInfo[this.currObjective]);
};
_local2.getCurrWave = function () {
return(this.waves[this.currObjective]);
};
_local2.getCurrAction = function () {
return(this.actions[this.currObjective]);
};
_local2.getCurrMultiActions = function () {
return(this.multiActions[this.currObjective]);
};
_local2.getCurrTutorial = function () {
return(this.tutorials[this.currObjective]);
};
_local2.getCurrPortrait = function () {
return(this.textPortraits[this.currObjective]);
};
_local2.getTitle = function () {
return(this.titleName);
};
_local2.c = "LevelData";
_local2.bakedLevel = true;
_local2.myIndex = 0;
_local2.myWidth = 0;
_local2.myHeight = 0;
_local2.pWidth = 0;
_local2.pHeight = 0;
_local2.readyToLoad = true;
_local2.tutorialMode = false;
_local2.currObjective = -1;
_local2.spawnRate = 0;
_local2.spawnTicks = 0;
_local2.incTicks = 0;
_local2.increaseTicks = 0;
_local2.sandSpawnRate = 3;
_local2.sandSpawnTicks = 2;
_local2.sandIncreaseRate = 1;
_local2.sandIncreaseTicks = 2;
_local2.inSandbox = false;
ASSetPropFlags(_global.LevelData.prototype, null, 1);
#endinitclip
Symbol 1710 MovieClip [__Packages.GameListener] Frame 0
class GameListener
{
var kListener, mListener, myMaster, lastMouse, lastKey;
function GameListener () {
var classObj = this;
kListener = new Object();
mListener = new Object();
kListener.onKeyDown = function () {
classObj.readKey(Key.getCode(), true);
};
kListener.onKeyUp = function () {
classObj.readKey(Key.getCode(), false);
};
mListener.onMouseDown = function () {
classObj.readMouse(K.MOUSEBUTT_CODE, true);
};
mListener.onMouseUp = function () {
classObj.readMouse(K.MOUSEBUTT_CODE, false);
};
mListener.onMouseMove = function () {
classObj.readMouse(K.MOUSEMOVE_CODE, true);
};
Key.addListener(kListener);
Mouse.addListener(mListener);
}
function setMaster(someObj) {
myMaster = someObj;
}
function readMouse(theMouse, isDown) {
lastMouse = theMouse;
if (isDown) {
if ((lastMouse == K.PAUSE_CODE) || (lastMouse == K.MENU_CODE)) {
var _local2 = K.codeToState(lastMouse);
myMaster.switchState(_local2);
} else {
myMaster.reactMouse(lastMouse, true);
}
} else if (!isDown) {
myMaster.reactMouse(lastMouse, false);
}
}
function readKey(theKey, keyIsDown) {
lastKey = theKey;
if (keyIsDown) {
if ((lastKey == K.PAUSE_CODE) || (lastKey == K.MENU_CODE)) {
var _local2 = K.codeToState(lastKey);
myMaster.switchState(_local2);
} else {
myMaster.react(lastKey, true);
}
} else if (!keyIsDown) {
myMaster.react(lastKey, false);
}
}
}
Symbol 1711 MovieClip [__Packages.StateStack] Frame 0
class StateStack
{
var STACK_MAX, stack, stackptr;
function StateStack () {
STACK_MAX = 10;
stack = new Array(STACK_MAX);
stackptr = -1;
}
function peek() {
if (stackptr >= 0) {
return(stack[stackptr]);
}
return(undefined);
}
function push(toPush) {
stackptr++;
stack[stackptr] = toPush;
}
function pop() {
if (stackptr < 0) {
return(undefined);
}
stackptr--;
return(stack[stackptr + 1]);
}
function checkfor(goal) {
var _local2 = 0;
while (_local2 <= stackptr) {
if (stack[_local2] == goal) {
return(true);
}
_local2++;
}
return(false);
}
function toString() {
var _local3 = "";
var _local2 = 0;
while (_local2 <= stackptr) {
_local3 = _local3 + (stack[_local2] + ",");
_local2++;
}
return(_local3);
}
function toNum() {
var _local2;
_local2 = stack[stackptr];
return(_local2);
}
function toNames() {
var _local3 = "";
var _local2 = 0;
while (_local2 <= stackptr) {
_local3 = _local3 + K.getStateName(stack[_local2]);
_local3 = _local3 + ",";
_local2++;
}
return(_local3);
}
}
Symbol 1712 MovieClip [__Packages.BuildIcon] Frame 0
class BuildIcon extends MovieClip
{
var master, _visible, gotoAndStop, _x, _y;
function BuildIcon () {
super();
}
function onLoad() {
deactivate();
}
function setMaster(whom) {
master = whom;
}
function enterFrameFunction() {
}
function activate(str) {
active = true;
enterFrameFunction = followCursor;
_visible = true;
if (str != undefined) {
myString = str;
}
(gotoAndStop("default"));// not popped
(gotoAndStop(myString));// not popped
}
function deactivate() {
active = false;
enterFrameFunction = undefined;
_visible = false;
}
function followCursor() {
tileX = master.getBuildingLocX(master.cursor._x);
tileY = master.getBuildingLocY(master.cursor._y);
_x = master.getBuildingX(tileX) + K.TILE_SIZE;
_y = master.getBuildingY(tileY);
if (master.checkTerrain(tileX, tileY, myString)) {
(gotoAndStop(myString));// not popped
} else {
(gotoAndStop(myString + "_NO"));// not popped
}
}
function onEnterFrame() {
enterFrameFunction();
}
var active = false;
var myString = "default";
var tileX = 0;
var tileY = 0;
}
Symbol 1713 MovieClip [__Packages.TerrainSquare] Frame 0
class TerrainSquare extends MovieClip
{
var master, myIndex, hp, _alpha, xLoc, yLoc, xUnitLoc, yUnitLoc;
function TerrainSquare () {
super();
}
function onLoad() {
amTargetted = false;
}
function setMaster(d) {
master = d;
}
function setIndex(i) {
myIndex = i;
}
function setHp(h) {
hp = h;
_alpha = hp;
}
function cleanUp(amt) {
hp = hp - amt;
_alpha = hp;
if (hp <= 0) {
master.deleteTerrainTile(this);
return(0);
}
return(hp);
}
function setLoc(xx, yy) {
xLoc = xx;
yLoc = yy;
xUnitLoc = xLoc * 2;
yUnitLoc = yLoc * 2;
}
function targetForPickup() {
amTargetted = true;
}
function untarget() {
amTargetted = false;
}
var amSpill = false;
var amTargetted = false;
}
Symbol 1714 MovieClip [__Packages.Building] Frame 0
class Building extends ClickableThing
{
var myType, outline, hideRepairBeacon, rinx, resourceIn, riny, routx, resourceOut, routy, blockedAttackLocs, master, xTile, yTile, xTileUnit, yTileUnit, attackLocs, attackers, upgrade, smogAmount, resource1, alert, damageClip, destroyMe, hpBar, clickHere, repairing;
function Building () {
super();
}
function onLoad() {
myType = K.BUILDING;
outline._visible = false;
hideResourceIn();
hideResourceOut();
hideRepairBeacon();
rinx = resourceIn._x;
riny = resourceIn._y;
routx = resourceOut._x;
routy = resourceOut._y;
setMeUp();
externalSetMeUp();
amSelected = false;
hideHpBar();
hideClickHere();
}
function calculateAttackVacancy() {
blockedAttackLocs[0] = false;
blockedAttackLocs[1] = false;
blockedAttackLocs[2] = false;
blockedAttackLocs[3] = false;
blockedAttackLocs[4] = false;
blockedAttackLocs[5] = false;
blockedAttackLocs[6] = false;
blockedAttackLocs[7] = false;
var _local4 = master.bldgArray;
var _local2 = false;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].xTile == xTile) {
} else if (_local4[_local3].yTile == yTile) {
if (_local4[_local3].xTile == (xTile - 1)) {
blockAttackLocs(true, true, _local2, _local2, _local2, _local2, _local2, _local2);
} else if (_local4[_local3].xTile == (xTile + 1)) {
blockAttackLocs(_local2, _local2, true, true, _local2, _local2, _local2, _local2);
}
}
_local3++;
}
}
function blockAttackLocs(l1, l2, l3, l4, l5, l6, l7, l8) {
if (l1 == true) {
blockedAttackLocs[0] = true;
}
if (l2 == true) {
blockedAttackLocs[1] = true;
}
if (l3 == true) {
blockedAttackLocs[2] = true;
}
if (l4 == true) {
blockedAttackLocs[3] = true;
}
if (l5 == true) {
blockedAttackLocs[4] = true;
}
if (l6 == true) {
blockedAttackLocs[5] = true;
}
if (l7 == true) {
blockedAttackLocs[6] = true;
}
if (l8 == true) {
blockedAttackLocs[7] = true;
}
}
function setMeUp() {
}
function externalSetMeUp() {
}
function deployTheFlag() {
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
xTileUnit = xTile * 2;
yTileUnit = yTile * 2;
var _local9 = new Object();
var _local8 = new Object();
var _local7 = new Object();
var _local6 = new Object();
var _local5 = new Object();
var _local4 = new Object();
var _local3 = new Object();
var _local2 = new Object();
_local9.xTile = xTileUnit - 1;
_local9.yTile = yTileUnit;
_local8.xTile = xTileUnit - 1;
_local8.yTile = yTileUnit - 1;
_local9.facing = "right";
_local8.facing = "right";
_local7.xTile = xTileUnit + 2;
_local7.yTile = yTileUnit;
_local6.xTile = xTileUnit + 2;
_local6.yTile = yTileUnit - 1;
_local7.facing = "left";
_local6.facing = "left";
_local5.xTile = xTileUnit;
_local5.yTile = yTileUnit - 2;
_local4.xTile = xTileUnit + 1;
_local4.yTile = yTileUnit - 2;
_local5.facing = "down";
_local4.facing = "down";
_local3.xTile = xTileUnit;
_local3.yTile = yTileUnit + 1;
_local2.xTile = xTileUnit + 1;
_local2.yTile = yTileUnit + 1;
_local3.facing = "up";
_local2.facing = "up";
blockedAttackLocs = new Array(8);
blockedAttackLocs[0] = false;
blockedAttackLocs[1] = false;
blockedAttackLocs[2] = false;
blockedAttackLocs[3] = false;
blockedAttackLocs[4] = false;
blockedAttackLocs[5] = false;
blockedAttackLocs[6] = false;
blockedAttackLocs[7] = false;
attackLocs = new Array(8);
attackLocs[0] = _local9;
attackLocs[1] = _local8;
attackLocs[2] = _local7;
attackLocs[3] = _local6;
attackLocs[4] = _local5;
attackLocs[5] = _local4;
attackLocs[6] = _local3;
attackLocs[7] = _local2;
attackers = new Array(8);
}
function getGarbagePercent() {
return(Math.round((100 * garbageAmt) / maxGarbage));
}
function setUpgradeLevel(upgrade, level) {
this.upgrade.gotoAndPlay("upgrade");
var _local2 = myMenu;
var _local4 = 1;
if (upgrade.toLowerCase() == "both") {
if (amSuper) {
_local2 = myMenu.substr(5, myMenu.length);
}
energyOut = K.getEfficiency(_local2, level);
smogAmount = K.getEmissions(_local2, level);
}
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, 0, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onSelected() {
}
function useResource(str) {
showResourceIn(str);
resourceIn._icon.gotoAndStop("bounce");
resourceIn._x = rinx;
resourceIn._y = riny;
var back = this;
var i = setInterval(function () {
back.resourceIn._y = back.resourceIn._y + 2;
if (back.resourceIn._y >= (back.riny + 20)) {
back.hideResourceIn();
clearInterval(i);
}
}, 50);
}
function makeResource(str, isSuper) {
showResourceOut(str);
if (isSuper == true) {
resourceOut._icon.gotoAndStop("super");
} else {
resourceOut._icon.gotoAndStop("plus");
}
resourceOut._x = routx;
resourceOut._y = routy;
var back = this;
var j = setInterval(function () {
back.resourceOut._y = back.resourceOut._y - 2;
if (back.resourceOut._y <= (back.routy - 20)) {
back.hideResourceOut();
clearInterval(j);
}
}, 50);
}
function tickGarbage() {
if (garbageRate > 0) {
garbageAmt = garbageAmt + garbageRate;
updateGarbage();
}
}
function setResource(amount, index) {
resourceAmt = amount;
}
function removeResource(amount, index) {
resourceAmt = resourceAmt - amount;
if (resourceAmt < 0) {
resourceAmt = 0;
}
}
function removeGarbage(amount, index) {
garbageAmt = garbageAmt - amount;
if (garbageAmt < 0) {
garbageAmt = 0;
}
if (garbageAmt < 50) {
tooMuchGarbage = false;
}
updateInterface(garbageAmt);
}
function updateGarbage() {
if (garbageAmt <= 50) {
setExternalGarbage(1, garbageAmt);
} else {
garbageAmt = 50;
setExternalGarbage(1, 50);
tooMuchGarbage = true;
}
updateInterface(garbageAmt);
}
function updateResource(what) {
setExternalResource(resourceAmt, what);
}
function setExternalResource(amount, type) {
if (resource1.myMenu.toLowerCase() == type.toLowerCase()) {
resource1.setAmount(amount);
} else if (resource1.myIndex == undefined) {
var _local2 = master.makeResourceUnit(xTileUnit + 1, yTileUnit + 1, amount, type);
resource1 = _local2;
}
resource1.setBuilding(this);
}
function setExternalGarbage(which, amount) {
var _local2 = this["garbage" + which];
var _local4 = which - 1;
if (_local2.myIndex == K.WASTE) {
_local2.setAmount(amount);
} else if (_local2.myIndex == undefined) {
_local2 = master.makeGarbageUnit(xTileUnit + _local4, yTileUnit + 1, amount, false);
}
this["garbage" + which] = _local2;
this["garbage" + which].setBuilding(this, which);
}
function showResourceIn(str) {
resourceIn.gotoAndStop(str);
}
function showResourceOut(str) {
resourceOut.gotoAndStop(str);
}
function hideResourceIn() {
resourceIn.gotoAndStop("nothing");
}
function hideResourceOut() {
resourceOut.gotoAndStop("nothing");
}
function enoughFood() {
starvation = 0;
notEnoughFood = false;
}
function foodTick() {
var _local2 = master.dayTime;
if ((_local2 == K.DAY) && (disabled == false)) {
if (master.hasFood(foodIn)) {
enoughFood();
useResource("food");
master.foodDrain(foodIn);
} else {
showFoodAlert(true);
}
}
if (!master.inAMenu) {
updateInterface();
}
}
function tick() {
isAlert = true;
if ((asleep == false) && (disabled == false)) {
if (!notEnoughFood) {
if (!tooMuchGarbage) {
if (needsRepair == false) {
if (!notEnoughResource) {
doTick();
isAlert = false;
}
} else {
if (!notEnoughResource) {
doTick();
isAlert = false;
}
showRepairAlert();
}
} else {
showGarbageAlert();
}
} else {
showFoodAlert();
if (!tooMuchGarbage) {
if (needsRepair == false) {
if (!notEnoughResource) {
doTick();
isAlert = false;
}
} else {
if (!notEnoughResource) {
doTick();
isAlert = false;
}
showRepairAlert();
}
} else {
showGarbageAlert();
}
}
}
}
function updateInterface(n) {
if (n == undefined) {
n = 0;
}
if (amSelected) {
if (!master.inAMenu) {
master.selectBuilding(myMenu, n, this);
}
}
}
function showGarbageAlert() {
alert.gotoAndPlay("garbage");
}
function showMetalAlert() {
notEnoughMetal = true;
alert.gotoAndPlay("metal");
}
function showEnergyAlert() {
notEnoughEnergy = true;
alert.gotoAndPlay("energy");
}
function showGasAlert() {
notEnoughResource = true;
alert.gotoAndPlay("gas");
}
function showFFAlert() {
notEnoughResource = true;
alert.gotoAndPlay("ff");
}
function showFoodAlert(starve) {
notEnoughFood = true;
alert.gotoAndPlay("food");
if (starve == true) {
starvation = starvation + 5;
takeDamage(starvation);
master.doMessageAlert("starvation", this);
}
}
function checkAsleep() {
if (master.dayTime == K.NIGHT) {
if ((!disabled) && (doesSleep == true)) {
showSleepAlert();
return(true);
}
return(false);
}
return(false);
}
function showSleepAlert() {
asleep = true;
if (!disabled) {
alert.gotoAndPlay("asleep");
master.syncSleepAlerts();
}
updateInterface();
}
function wakeUp() {
asleep = false;
if (!disabled) {
alert.gotoAndPlay("default");
} else {
disableMe();
}
updateInterface();
}
function disableToggle() {
if (disabled == true) {
disabled = false;
enableMe();
} else if (disabled == false) {
disabled = true;
disableMe();
}
}
function disableMe() {
alert.gotoAndPlay("disabled");
updateInterface();
master.syncDisableAlerts();
}
function syncDisableAlert() {
alert.gotoAndPlay("disabled");
}
function syncSleepAlert() {
alert.gotoAndPlay("asleep");
}
function enableMe() {
if (!checkAsleep()) {
alert.gotoAndPlay("default");
}
updateInterface();
}
function showRepairAlert() {
needsRepair = true;
alert.gotoAndPlay("repair");
}
function requestAttack(e) {
var _local2 = 0;
while (_local2 < attackers.length) {
if (addAttacker(e, _local2) == true) {
return(true);
}
_local2++;
}
return(false);
}
function fixAttackerDepths() {
if (attackers[1].getDepth() > attackers[0].getDepth()) {
attackers[1].swapDepths(attackers[0]);
}
if (attackers[3].getDepth() > attackers[2].getDepth()) {
attackers[3].swapDepths(attackers[2]);
}
}
function addAttacker(e, whichLoc) {
if (blockedAttackLocs[whichLoc] == false) {
if (attackers[whichLoc] == undefined) {
attackers[whichLoc] = e;
attackers[whichLoc].setAttackLoc(attackLocs[whichLoc]);
fixAttackerDepths();
return(true);
}
}
return(false);
}
function removeAttacker(whichLoc) {
if (attackers[whichLoc] != undefined) {
attackers[whichLoc].goAway();
attackers[whichLoc] = undefined;
}
}
function updateHpBar() {
if (hp < 100) {
showHpBar();
} else {
hideHpBar();
}
}
function takeDamage(amt) {
hp = hp - amt;
damageClip.play();
updateHpBar();
if (hp <= 75) {
needsRepair = true;
}
if (hp <= 0) {
hp = 0;
master.unClickEverything();
destroyMe();
}
updateInterface();
}
function showHpBar() {
hpBar.setAmount(hp);
hpBar._visible = true;
}
function hideHpBar() {
hpBar._visible = false;
}
function hideClickHere() {
clickHere._visible = false;
}
function showClickHere() {
clickHere._visible = true;
}
function doRepairs() {
if (master.hasEnergy(1)) {
hp = hp + 5;
useResource("energy");
makeResource("wrench");
master.energyDrain(1);
if (hp >= 75) {
needsRepair = false;
}
if (hp >= maxhp) {
hp = maxhp;
repairing = false;
hideRepairBeacon();
}
updateInterface();
} else {
repairing = false;
hideRepairBeacon();
}
updateHpBar();
}
function doTick() {
}
function onRemove() {
master.deleteBuilding(this);
}
var typeOfThing = K.BUILDING;
var amSelected = false;
var myMenu = "";
var hp = 100;
var maxhp = Building.prototype.hp;
var amSuper = false;
var doesSleep = true;
var eatsFood = true;
var starvation = 0;
var garbageRate = 0;
var garbageAmt = 0;
var resourceAmt = 0;
var maxGarbage = 50;
var tooMuchGarbage = false;
var notEnoughEnergy = false;
var notEnoughMetal = false;
var notEnoughFood = false;
var notEnoughResource = false;
var needsRepair = false;
var isAlert = false;
var isWeapon = false;
var asleep = false;
var disabled = false;
var energyOut = 0;
var energyIn = 0;
var foodOut = 0;
var foodIn = 6;
var metalIn = 0;
var metalOut = 0;
var FFIn = 0;
var FFOut = 0;
var gasIn = 0;
var gasOut = 0;
var nWasteOut = 0;
var cacheAsBitmap = true;
}
Symbol 1715 MovieClip [__Packages.Garbage] Frame 0
class Garbage extends MovieClip
{
var outline, master, gotoAndStop, countDownID, xTile, yTile, myBuilding, myBuildingIndex, removeMovieClip;
function Garbage () {
super();
}
function onLoad() {
outline._visible = false;
}
function setMaster(d) {
master = d;
}
function addGarbage(amt) {
if ((amount + amt) > 50) {
makePollution();
amt = 0;
setAmount(50);
} else {
setAmount(amount + amt);
}
}
function setAmount(amt) {
var _local3;
if ((amt > 0) && (amt < 15)) {
myMenu = "GarbageLittle";
_local3 = "little";
atMax = false;
} else if ((amt >= 15) && (amt < 35)) {
myMenu = "GarbageSome";
_local3 = "some";
atMax = false;
} else if ((amt >= 35) && (amt < 50)) {
myMenu = "GarbageLots";
_local3 = "lots";
atMax = false;
} else if (amt >= 50) {
myMenu = "GarbageMax";
_local3 = "max";
atMax = true;
} else if (amt <= 0) {
master.deleteGarbage(this);
atMax = false;
}
if (isRubble) {
(gotoAndStop("rubble_" + _local3));// not popped
myMenu = "Rubble";
} else {
(gotoAndStop(_local3));// not popped
}
amount = amt;
if (amSelected) {
master.selectBuilding(myMenu, amount, this);
}
if (atMax && (isRubble == false)) {
if (countDown == 0) {
startCountDown();
}
} else {
stopCountDown();
}
}
function startCountDown() {
master.doMessageAlert("gWarning", this);
countDownID = setInterval(this, "tickDown", K.TICK_COUNT * K.FRAME_RATE);
}
function stopCountDown() {
countDown = 0;
clearInterval(countDownID);
}
function tickDown() {
countDown++;
if (countDown >= polluteTime) {
stopCountDown();
makePollution();
}
}
function makePollution() {
var _local3 = Math.floor(xTile / 2);
var _local2 = Math.floor(yTile / 2);
master.polluteTile(_local3, _local2);
master.doMessageAlert("gPollute", this);
}
function removeAmount(minus) {
var _local2 = 0;
if (amount > minus) {
setAmount(amount - minus);
_local2 = minus;
} else {
_local2 = amount;
setAmount(0);
}
if (amSelected) {
master.selectBuilding(myMenu, amount);
}
myBuilding.removeGarbage(_local2, myBuildingIndex);
return(_local2);
}
function setBuilding(bldg, i) {
myBuilding = bldg;
myBuildingIndex = i;
}
function setRubble() {
isRubble = true;
myMenu = "Rubble";
if ((amount != undefined) && (amount != 0)) {
setAmount(amount);
} else {
(gotoAndStop("rubble_some"));// not popped
}
}
function deactivateMe(str) {
outline._visible = false;
onRelease = undefined;
gotoAndStop(str);
}
function targetForEating() {
amEatTargetted = true;
}
function targetForPickup() {
amTargetted = true;
}
function unEatTarget() {
amEatTargetted = false;
}
function unTarget() {
amTargetted = false;
}
function deleteMe() {
if (amSelected) {
master.unClickEverything();
}
clearInterval(countDownID);
removeMovieClip();
}
function onRelease() {
switch (master.actionMode) {
case K.CLICK :
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, amount);
amSelected = true;
break;
case K.DEMOLISH :
master.showError("You can't demolish garbage! Take it to a waste facility!");
break;
default :
master.onClickTerrain();
}
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
}
function unClick() {
outline._visible = false;
amSelected = false;
}
var amSelected = false;
var myMenu = "garbage";
var myIndex = K.WASTE;
var amount = 0;
var isRubble = false;
var amTargetted = false;
var amEatTargetted = false;
var countDown = 0;
var polluteTime = 20;
var atMax = false;
}
Symbol 1716 MovieClip [__Packages.ResourceToken] Frame 0
class ResourceToken extends MovieClip
{
var outline, master, myMenu, myBuilding, myBuildingIndex, gotoAndStop, removeMovieClip, xTile, yTile;
function ResourceToken () {
super();
}
function onLoad() {
outline._visible = false;
}
function targetForEating() {
amEatTargetted = true;
}
function setMaster(d) {
master = d;
}
function addAmount(amt) {
setAmount(amount + amt);
}
function setAmount(amt) {
}
function removeAmount(minus) {
var _local2 = 0;
if (amount > minus) {
setAmount(amount - minus);
_local2 = minus;
} else {
_local2 = amount;
setAmount(0);
}
if (amSelected) {
master.selectBuilding(myMenu, amount);
}
return(_local2);
}
function setBuilding(bldg) {
myBuilding = bldg;
myBuildingIndex = 2;
}
function deactivateMe(str) {
outline._visible = false;
onRelease = undefined;
gotoAndStop(str);
}
function targetForPickup() {
amTargetted = true;
}
function unTarget() {
amTargetted = false;
}
function deleteMe() {
if (amSelected) {
master.unClickEverything();
}
removeMovieClip();
}
function onRelease() {
switch (master.actionMode) {
case K.CLICK :
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, amount);
amSelected = true;
break;
case K.DEMOLISH :
master.showError("You can't demolish resources! Take it to a factory or fortress!");
break;
default :
master.onClickTerrain();
}
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
}
function setType() {
}
function unClick() {
outline._visible = false;
amSelected = false;
}
var isResource = true;
var amSelected = false;
var amount = 0;
var amTargetted = false;
var amEatTargetted = false;
}
Symbol 1717 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends ClickableThing
{
var myType, outline, vect, speedX, speedY, oldTargets, xTile, yTile, master, amSelected, myMenu, _icon, onTask, myTask, myTarget, myTargetBldg, gotoAndStop, _x, destX, _y, destY, fearsDay, hp, maxHp, hpBar, upgrade, _width, _height, myDamage, o_destX, o_destY, damage, removeMovieClip, destroying, onRemove, attachMovie, getNextHighestDepth;
function Enemy () {
super();
}
function onLoad() {
myType = K.ENEMY;
outline._visible = false;
setMeUp();
externalSetMeUp();
vect = new Array(2);
speedX = (speedY = 0);
oldTargets = new Array();
hideHpBar();
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
}
function setMeUp() {
}
function externalSetMeUp() {
}
function onRelease() {
switch (master.actionMode) {
case K.CLICK :
if (!amSelected) {
selectMe();
}
break;
case K.DEMOLISH :
break;
case K.REPAIR :
}
}
function selectMe() {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectEnemy(myMenu, 0, this);
amSelected = true;
onSelected();
}
function unselectMe() {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
function unPauseMe() {
_icon.startPlay();
_icon.onLoad = function () {
this.startPlay();
};
}
function pauseMe() {
_icon.stopPlay();
_icon.onLoad = function () {
this.stopPlay();
};
}
function multiSelectMe() {
if (!amSelected) {
outline._visible = true;
onSelected();
amSelected = true;
master.multiSelectUnit(myMenu, 0, this);
}
}
function startMoving() {
movingX = true;
movingY = true;
}
function onMoveFinish() {
}
function setToIdle() {
onTask = false;
myTask = K.IDLE;
myTarget = undefined;
myTargetBldg = undefined;
(gotoAndStop("default"));// not popped
tick();
}
function tick() {
}
function enterFrameFunction() {
updateLoc();
if (movingX) {
_x = _x + speedX;
var _local3 = Math.abs(destX - _x);
if (_local3 <= (speed * 4)) {
speedX = (speed * 0.9) * vect[0];
}
if ((_local3 <= 2) || (_local3 <= (speedX * 1.5))) {
_x = destX;
movingX = false;
if (movingY == false) {
onMoveFinish();
}
}
if ((myTask == K.ATTACKPOSITION) || (myTask == K.GOTOBUILDING)) {
if (speedX >= speedY) {
if (speedX > 0) {
(gotoAndStop("right"));// not popped
} else {
(gotoAndStop("left"));// not popped
}
_icon.gotoAndStop("walk");
} else {
if (speedY > 0) {
(gotoAndStop("down"));// not popped
} else {
(gotoAndStop("up"));// not popped
}
_icon.gotoAndStop("walk");
}
}
}
if (movingY == true) {
_y = _y + speedY;
var _local2 = Math.abs(destY - _y);
if (_local2 <= (speed * 4)) {
speedY = (speed * 0.9) * vect[1];
}
if ((_local2 <= 2) || (_local2 <= (speedY * 1.5))) {
_y = destY;
movingY = false;
if (movingX == false) {
onMoveFinish();
}
}
if (speedY > 0) {
}
}
if (singeTime >= 5) {
if ((master.dayTime == K.DAY) && (fearsDay == true)) {
singeMe();
}
singeTime = 0;
}
singeTime++;
updateHp();
}
function singeMe() {
}
function updateHp() {
if (getHpPercent() < 90) {
showHpBar();
} else {
hideHpBar();
}
}
function giveHp(amt) {
hp = hp + amt;
if (hp > maxHp) {
hp = maxHp;
}
updateHp();
}
function showHpBar() {
hpBar._visible = true;
hpBar.setAmount(getHpPercent());
}
function hideHpBar() {
hpBar._visible = false;
}
function getHpPercent() {
return(Math.round(100 * (hp / maxHp)));
}
function updateLoc() {
xTile = Math.floor(_x / K.TILE_SIZE);
yTile = Math.floor((_y - K.INT_OFF_Y_PX) / K.TILE_SIZE);
}
function eatWaste(w) {
var _local2 = 0;
while (_local2 < w.amount) {
doNextLevel();
_local2++;
}
w.removeAmount(w.amount);
setToIdle();
}
function eatGarbage(g) {
if (!g.isRubble) {
levelUp(g.amount);
}
g.removeAmount(g.amount);
setToIdle();
}
function doNextLevel() {
levelUp(nextLevel);
}
function levelUp(amt) {
myXP = myXP + amt;
if ((myXP >= nextLevel) && (myLevel < 4)) {
upgrade.play();
maxHp = maxHp * 3;
myXP = 0;
hp = maxHp;
_width = _width * 1.2;
_height = _height * 1.2;
myDamage = myDamage * 3;
nextLevel = nextLevel * 2;
myLevel++;
}
}
function moveToLoc(xT, yT) {
destX = master.getUnitX(xT);
destY = master.getUnitY(yT);
if (destY < K.INT_OFF_Y_PX) {
destY = K.INT_OFF_Y_PX;
} else if (destY > (Stage.height - (K.TILE_SIZE * 2))) {
destY = Stage.height - (K.TILE_SIZE * 2);
}
if (destX < K.TILE_SIZE) {
destX = K.TILE_SIZE;
} else if (destX > (Stage.width - K.INT_OFF_X_PX)) {
destX > (Stage.width - K.INT_OFF_X_PX);
}
o_destX = destX;
o_destY = destY;
vect[0] = destX - _x;
vect[1] = destY - _y;
var _local2 = Math.sqrt((vect[0] * vect[0]) + (vect[1] * vect[1]));
vect[0] = vect[0] / _local2;
vect[1] = vect[1] / _local2;
speedX = vect[0] * speed;
speedY = vect[1] * speed;
startMoving();
}
function onSelected() {
}
function toggleMe() {
if (!amSelected) {
selectMe();
} else {
unselectMe();
}
}
function takeDamage(d, type) {
damage.play();
if (type == K.TESLACOIL) {
if (myLevel > 0) {
d = d - (myLevel * 3);
}
}
hp = hp - d;
if (hp <= 0) {
killMe();
}
}
function destroyMe() {
var _local2 = 0;
while (_local2 < master.eArray.length) {
if (master.eArray[_local2] == this) {
master.eArray[_local2].splice(_local2, 1);
}
_local2++;
}
master.onEnemyDie();
removeMovieClip();
}
function killMe() {
if (!destroying) {
movingX = false;
movingY = false;
speedX = 0;
speedY = 0;
myTask == K.DYING;
onRemove();
(gotoAndStop("dead"));// not popped
master.makeGarbageUnit(Math.floor(xTile / 2) * 2, (Math.floor(yTile / 2) * 2) + 1, 3, false);
attachMovie("mc_goop", "theGoop", getNextHighestDepth());
destroying = true;
}
}
function onDestroyAnim() {
destroyMe();
}
var typeOfThing = K.ENEMY;
var speed = 1;
var movingX = false;
var movingY = false;
var nextLevel = 15;
var myLevel = 0;
var wasHereFirst = false;
var singeTime = 0;
var myXP = 0;
}
Symbol 1718 MovieClip [__Packages.EnemyIcon] Frame 0
class EnemyIcon extends MovieClip
{
var anim, onLoad;
function EnemyIcon () {
super();
}
function stopPlay() {
anim.stop();
onLoad = function () {
this.anim.stop();
};
}
function startPlay() {
anim.play();
onLoad = function () {
this.anim.play();
};
}
}
Symbol 1719 MovieClip [__Packages.NuclearWaste] Frame 0
class NuclearWaste extends ResourceToken
{
var atMax, myBuilding, master, gotoAndStop;
function NuclearWaste () {
super();
}
function setAmount(amt) {
var _local3;
var _local4 = false;
var _local5 = "nWaste";
if (amt == 1) {
_local3 = "little";
atMax = false;
} else if (amt == 2) {
_local3 = "some";
atMax = false;
} else if (amt == 3) {
_local3 = "lots";
atMax = false;
} else if (amt > 3) {
_local3 = "max";
atMax = true;
} else if (amt <= 0) {
_local4 = true;
atMax = false;
}
amount = amt;
if (myBuilding != undefined) {
myBuilding.setResource(amt, myIndex);
}
if (_local4) {
master.deleteResourceToken(this);
}
(gotoAndStop(_local3));// not popped
if (amSelected) {
master.selectBuilding(_local5, amount, this);
}
if (atMax) {
master.doMessageAlert("nWastePickupAlert", this);
}
}
var amSelected = false;
var myMenu = "nWaste";
var myType = "nWaste";
var myIndex = K.NWASTE;
var amount = 0;
var amTargetted = false;
}
Symbol 1720 MovieClip [__Packages.Depot] Frame 0
class Depot extends Building
{
var outline, hideResourceIn, hideResourceOut, hideRepairBeacon, rinx, resourceIn, riny, routx, resourceOut, routy, rin2x, resourceIn2, rin2y, rout2x, resourceOut2, rout2y, setMeUp, externalSetMeUp, hideHpBar, master;
function Depot () {
super();
}
function onLoad() {
outline._visible = false;
hideResourceIn();
hideResourceOut();
hideResourceIn2();
hideResourceOut2();
hideRepairBeacon();
rinx = resourceIn._x;
riny = resourceIn._y;
routx = resourceOut._x;
routy = resourceOut._y;
rin2x = resourceIn2._x;
rin2y = resourceIn2._y;
rout2x = resourceOut2._x;
rout2y = resourceOut2._y;
setMeUp();
externalSetMeUp();
hideHpBar();
}
function useResource2(str) {
showResourceIn2(str);
resourceIn2._icon.gotoAndStop("bounce");
resourceIn2._x = rin2x;
resourceIn2._y = rin2y;
var back = this;
var i = setInterval(function () {
back.resourceIn2._y = back.resourceIn2._y + 2;
if (back.resourceIn2._y >= (back.rin2y + 20)) {
back.hideResourceIn2();
clearInterval(i);
}
}, 50);
}
function makeResource2(str, isSuper) {
showResourceOut2(str);
if (isSuper == true) {
resourceOut2._icon.gotoAndStop("super");
} else {
resourceOut2._icon.gotoAndStop("plus");
}
resourceOut2._y = routy;
var back = this;
var j = setInterval(function () {
back.resourceOut2._y = back.resourceOut2._y - 2;
if (back.resourceOut2._y <= (back.routy - 20)) {
back.hideResourceOut2();
clearInterval(j);
}
}, 50);
}
function addResource(amt, type) {
switch (type) {
case K.METAL :
makeResource2("metal", false);
master.makeMetal(amt);
return(true);
case K.FF :
makeResource2("ff", false);
master.makeFF(amt);
return(true);
case K.GAS :
makeResource2("gas", false);
master.makeGas(amt);
return(true);
case K.NWASTE :
makeResource2("nwaste", false);
return(true);
}
return(false);
}
function hideResourceIn2() {
resourceIn2.gotoAndStop("nothing");
}
function showResourceIn2(str) {
resourceIn2.gotoAndStop(str);
}
function hideResourceOut2() {
resourceOut2.gotoAndStop("nothing");
}
function showResourceOut2(str) {
resourceOut2.gotoAndStop(str);
}
var isDepot = true;
}
Symbol 1721 MovieClip [__Packages.Factory] Frame 0
class Factory extends Depot
{
var unitEnergy, unitMetal, unitEnergyT, unitMetalT, percent, energyIn, metalIn, updateInterface, master, makeResource, notEnoughEnergy, gotoAndPlay, useResource, useResource2, tickGarbage, notEnoughFood, showFoodAlert, smogPoint, _x, _y, amSelected, xTile, yTile, deployFlag, deployHere;
function Factory () {
super();
}
function clearFactory() {
producing = false;
currUnit = "";
unitEnergy = 0;
unitMetal = 0;
unitEnergyT = 1000;
unitMetalT = 1000;
percent = 0;
finished = false;
energyIn = 0;
metalIn = 0;
updateInterface();
}
function cancelUnit() {
var _local3 = unitEnergyT - unitEnergy;
var _local4 = unitMetalT - unitMetal;
var _local2 = Math.round(_local4 * 0.66);
master.giveMetal(_local2);
if (_local2 > 0) {
makeResource("metal");
}
energyDiscount = Math.round(_local3 * 0.5);
clearFactory();
}
function buildUnit(str) {
unitEnergy = K.getCost(str)[0];
unitMetal = K.getCost(str)[1];
unitEnergyT = unitEnergy;
unitMetalT = unitMetal;
unitEnergy = unitEnergy - energyDiscount;
energyDiscount = 0;
var _local2 = master.hasEnergy(unitEnergy);
var _local3 = master.hasMetal(unitMetal);
if (_local2 && (_local3)) {
producing = true;
currUnit = str;
notEnoughEnergy = false;
(gotoAndPlay("bounce"));// not popped
if (unitEnergy > 0) {
useResource("energy");
}
if (unitMetal > 0) {
useResource2("metal");
}
master.factoryDrain(unitEnergy, unitMetal);
finished = true;
tickGarbage();
master.theInterface.showUnitProduction(this);
} else if ((!_local2) && (!_local3)) {
master.errorBuilding(0, 1, 1);
} else if (!_local2) {
master.errorBuilding(0, 1, 0);
} else if (!_local3) {
master.errorBuilding(0, 0, 1);
}
}
function onSelected() {
if (producing == true) {
} else {
master.theInterface.hideUnitProduction();
}
}
function foodTick() {
if (master.hasFood(1)) {
notEnoughFood = false;
useResource("food");
master.drainFood(1);
} else {
showFoodAlert(true);
}
if (!master.inAMenu) {
updateInterface();
}
}
function playHammerSound() {
master.playSound(0, "hammer.wav", 1);
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(_local3, _local2, smogAmount);
makeResource("hammer");
if (amSelected) {
if (producing) {
master.theInterface.showUnitProduction(this);
}
}
if (finished) {
producing = false;
master.makeUnit(_x, _y, xTile, yTile, currUnit, true);
clearFactory();
currUnit = "";
}
}
function deployTheFlag() {
master.undeployFactoryFlags();
deployFlag._visible = true;
deployHere = true;
}
function undeployTheFlag() {
deployFlag._visible = false;
deployHere = false;
}
var myIndex = K.FACTORY;
var myMenu = "Factory";
var producing = false;
var finished = false;
var currUnit = "";
var asleep = false;
var garbageRate = K.G_OUT_FACTORY;
var smogAmount = K.S_OUT_FACTORY;
var doesSleep = false;
var isPaused = false;
var energyDiscount = 0;
}
Symbol 1722 MovieClip [__Packages.Smog] Frame 0
class Smog extends MovieClip
{
var speedY, speedX, master, arrayIndex, amount, gotoAndPlay;
function Smog () {
super();
}
function onLoad() {
speedY = -1;
speedX = -0.2;
}
function setMaster(d, i) {
master = d;
arrayIndex = i;
}
function enterFrameFunction() {
}
function setAmount(amt) {
amount = amt;
if (amount < 5) {
(gotoAndPlay("smallGrow"));// not popped
} else if (amount < 10) {
(gotoAndPlay("mediumGrow"));// not popped
} else {
(gotoAndPlay("bigGrow"));// not popped
}
}
function timeToDie() {
master.onSmogLeave(this);
}
var size = 0.1;
}
Symbol 1723 MovieClip [__Packages.Unit] Frame 0
class Unit extends ClickableThing
{
var myType, outline, vect, speedX, speedY, riny, resourceIn, vehicleRatio, xTile, yTile, fuelString, upgrade, myFuel, fuelLevel, mpg, fuelEfficiency, fuelConsumption, fillUpDistance, smogDistance, mySmog, onTask, myTask, myTarget, myTargetBldg, master, amSelected, myMenu, crowder, _x, destX, speed, gotoAndStop, _y, destY, smogPoint, _icon, o_destX, o_destY, fuelLight;
function Unit () {
super();
}
function onLoad() {
myType = K.UNIT;
outline._visible = false;
setMeUp();
externalSetMeUp();
vect = new Array(2);
speedX = (speedY = 0);
hideResourceIn();
hideFuelLight();
riny = resourceIn._y;
vehicleRatio = vInFFPlant / vInUnit;
}
function setLoc(xx, yy) {
xTile = xx;
yTile = yy;
}
function setMeUp() {
}
function externalSetMeUp() {
}
function gotoSleep() {
if (doesSleep == true) {
asleep = true;
}
}
function wakeUp() {
asleep = false;
}
function setUpgradeLevel(up, level) {
if (up.toLowerCase() == fuelString.toLowerCase()) {
upgrade.gotoAndPlay("upgrade");
setFuelEconomy(getFuelNumber(up), level);
}
}
function getFuelNumber(fuel) {
return(K[fuel.toUpperCase()]);
}
function setFuelEconomy(whichFuel, whichLevel) {
myFuel = whichFuel;
fuelLevel = whichLevel;
switch (whichFuel) {
case K.GASOLINE :
fuelString = "gasoline";
mpg = 14 * fuelEfficiency;
fuelConsumption = (K.FF_IN_FFPLANT / vInFFPlant) * vInUnit;
fillUpDistance = ((K.BARREL_GASOLINE * mpg) / K.TILE_MILES) * K.TILE_SIZE;
smogDistance = fillUpDistance / 2;
mySmog = K.S_OUT_CAR / fuelEfficiency;
break;
case K.DIESEL :
fuelString = "diesel";
mpg = 21 * fuelEfficiency;
fuelConsumption = (K.FF_IN_FFPLANT / vInFFPlant) * vInUnit;
fillUpDistance = ((K.BARREL_GASOLINE * mpg) / K.TILE_MILES) * K.TILE_SIZE;
smogDistance = fillUpDistance / 2;
mySmog = K.S_OUT_CAR / fuelEfficiency;
break;
case K.ETHANOL :
fuelString = "ethanol";
var _local2 = 0.694;
mpg = (14 * fuelEfficiency) * _local2;
fuelConsumption = 1 / ((77261 / vInUnit) / tankSize);
fillUpDistance = ((K.BARREL_GASOLINE * mpg) / K.TILE_MILES) * K.TILE_SIZE;
smogDistance = fillUpDistance / 2;
mySmog = ((K.S_OUT_CAR * 1) / 5) / fuelEfficiency;
break;
case K.ELECTRIC :
fuelString = "electric";
_local2 = 0.5;
mpg = (14 * fuelEfficiency) * _local2;
var _local3 = (K.FF_IN_FFPLANT / vInFFPlant) * vInUnit;
fuelConsumption = (_local3 * K.E_OUT_FFPLANT) / _local2;
fillUpDistance = ((K.BARREL_GASOLINE * mpg) / K.TILE_MILES) * K.TILE_SIZE;
smogDistance = fillUpDistance / 2;
mySmog = 0;
break;
case K.NATGAS :
fuelString = "natgas";
_local2 = 1.14;
mpg = (14 * fuelEfficiency) * _local2;
fuelConsumption = (K.GAS_IN_GASPLANT / vInFFPlant) * vInUnit;
fillUpDistance = ((K.BARREL_GASOLINE * mpg) / K.TILE_MILES) * K.TILE_SIZE;
smogDistance = fillUpDistance / 2;
mySmog = ((K.S_OUT_GASPLANT / vInFFPlant) * vInUnit) / fuelEfficiency;
break;
}
}
function useResource(str) {
showResourceIn(str);
resourceIn._icon.gotoAndStop("bounce");
resourceIn._y = riny;
var back = this;
var i = setInterval(function () {
back.resourceIn._y = back.resourceIn._y + 2;
if (back.resourceIn._y >= (back.riny + 20)) {
back.hideResourceIn();
clearInterval(i);
}
}, 50);
}
function showResourceIn(str) {
resourceIn.gotoAndStop(str);
}
function hideResourceIn() {
resourceIn.gotoAndStop("nothing");
}
function stopForFuel() {
refueling = 1;
showFuelLight();
}
function setToIdle() {
onTask = false;
myTask = K.IDLE;
myTarget = undefined;
myTargetBldg = undefined;
}
function refuel() {
switch (myFuel) {
case K.GASOLINE :
if (master.hasFF(1)) {
master.drainFF(fuelConsumption);
useResource("FF");
refueling = 2;
}
break;
case K.DIESEL :
if (master.hasFF(1)) {
master.drainFF(fuelConsumption);
useResource("FF");
refueling = 2;
}
break;
case K.ELECTRIC :
if (master.hasEnergy(1)) {
master.drainEnergy(fuelConsumption);
useResource("energy");
refueling = 2;
}
break;
case K.ETHANOL :
if (master.hasFood(1)) {
master.drainFood(fuelConsumption);
useResource("food");
refueling = 2;
}
break;
case K.NATGAS :
if (master.hasGas(1)) {
master.drainGas(fuelConsumption);
useResource("gas");
refueling = 2;
}
break;
default :
refueling = 2;
}
}
function onRelease() {
switch (master.actionMode) {
case K.CLICK :
if (!amSelected) {
selectMe();
} else if (master.multiSelect) {
selectMe();
} else {
unselectMe();
}
break;
case K.DEMOLISH :
demolishMe();
break;
case K.REPAIR :
repairMe();
break;
case K.MOVE :
if (!amSelected) {
selectMe();
} else if (master.multiSelect) {
selectMe();
} else {
unselectMe();
}
}
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectUnit(myMenu, 0, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function unselectMe() {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
function toggleMe() {
if (!amSelected) {
selectMe();
} else {
unselectMe();
}
}
function multiSelectMe() {
if (!amSelected) {
outline._visible = true;
onSelected();
amSelected = true;
master.multiSelectUnit(myMenu, 0, this);
}
}
function startMoving() {
movingX = true;
movingY = true;
}
function stopMoving() {
movingX = false;
movingY = false;
if (checkCrowded()) {
var _local2 = 0;
if (K.randRange(0, 1) == 0) {
unCrowd(-1);
crowder.unCrowd(1);
}
}
}
function onMoveFinish() {
}
function unCrowd(xx) {
moveToLoc(xTile + xx, yTile);
}
function tick() {
}
function enterFrameFunction() {
updateLoc();
if (refueling == 0) {
if (movingX) {
_x = _x + speedX;
var _local3 = Math.abs(destX - _x);
if (_local3 <= (speed * 4)) {
speedX = (speed * 0.9) * vect[0];
}
if ((_local3 <= 2) || (_local3 <= (speedX * 1.5))) {
_x = destX;
movingX = false;
if (movingY == false) {
onMoveFinish();
}
}
if (speedX > 0) {
(gotoAndStop("right"));// not popped
} else {
(gotoAndStop("left"));// not popped
}
}
if (movingY == true) {
_y = _y + speedY;
var _local2 = Math.abs(destY - _y);
if (_local2 <= (speed * 4)) {
speedY = (speed * 0.9) * vect[1];
}
if ((_local2 <= 2) || (_local2 <= (speedY * 1.5))) {
_y = destY;
movingY = false;
if (movingX == false) {
onMoveFinish();
}
}
if (speedY > 0) {
}
}
if (movingX || (movingY)) {
updateOdometer();
}
} else {
if (refueling >= 2) {
refueling++;
}
if (refueling >= K.REFUEL_COUNT) {
refueling = 0;
hideFuelLight();
}
}
}
function updateOdometer() {
var _local2 = Math.sqrt((speedX * speedX) + (speedY * speedY));
odometer = odometer + _local2;
smogOMeter = smogOMeter + _local2;
if (odometer > fillUpDistance) {
odometer = 0;
stopForFuel();
}
if (smogOMeter > smogDistance) {
smogOMeter = 0;
makeSmog();
}
}
function makeSmog() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
if (mySmog > 0) {
_icon.gotoAndPlay("smog");
master.makeSmog(_local3, _local2, mySmog);
}
}
function updateLoc() {
xTile = Math.floor(_x / K.TILE_SIZE);
yTile = Math.floor((_y - K.INT_OFF_Y_PX) / K.TILE_SIZE);
}
function checkCrowded() {
var _local2 = 0;
while (_local2 < master.uArray.length) {
if (master.uArray[_local2].xTile == xTile) {
if (master.uArray[_local2].yTile == yTile) {
crowder = master.uArray[_local2];
return(true);
}
}
_local2++;
}
}
function checkCrowdedX() {
var _local2 = 0;
while (_local2 < master.uArray.length) {
if (master.uArray[_local2].xTile == xTile) {
return(true);
}
_local2++;
}
return(false);
}
function checkCrowdedY() {
var _local2 = 0;
while (_local2 < master.uArray.length) {
if (master.uArray[_local2].yTile == yTile) {
return(true);
}
_local2++;
}
return(false);
}
function moveToLoc(xT, yT) {
destX = master.getUnitX(xT);
destY = master.getUnitY(yT);
if (destY < K.INT_OFF_Y_PX) {
destY = K.INT_OFF_Y_PX;
} else if (destY > (Stage.height - (K.TILE_SIZE * 2))) {
destY = Stage.height - (K.TILE_SIZE * 2);
}
if (destX < K.TILE_SIZE) {
destX = K.TILE_SIZE;
} else if (destX > (Stage.width - K.INT_OFF_X_PX)) {
destX > (Stage.width - K.INT_OFF_X_PX);
}
o_destX = destX;
o_destY = destY;
vect[0] = destX - _x;
vect[1] = destY - _y;
var _local2 = Math.sqrt((vect[0] * vect[0]) + (vect[1] * vect[1]));
vect[0] = vect[0] / _local2;
vect[1] = vect[1] / _local2;
speedX = vect[0] * speed;
speedY = vect[1] * speed;
startMoving();
}
function onMove(sticky) {
if (!sticky) {
master.unClickEverything();
}
}
function onSelected() {
}
function demolishMe() {
}
function repairMe() {
}
function hideFuelLight() {
fuelLight._visible = false;
}
function showFuelLight() {
fuelLight._visible = true;
}
var typeOfThing = K.UNIT;
var movingX = false;
var movingY = false;
var odometer = 0;
var smogOMeter = 0;
var refueling = 0;
var vInUnit = 1000;
var vInFFPlant = 30000;
var tankSize = 25;
var waitForRefuel = false;
var doesSleep = false;
var asleep = false;
}
Symbol 1724 MovieClip [__Packages.HumVee] Frame 0
class HumVee extends Unit
{
var master;
function HumVee () {
super();
}
function setMeUp() {
master.playSound(1, "humVee_click1.wav", 1);
}
function onSelected() {
}
var myIndex = K.HUMVEE;
var myMenu = "HumVee";
var clicks = 0;
var speed = 3;
var selectSound = "humVee_click1.wav";
var affirmSound = "humVee_move1.wav";
var buildSound = "humVee_click1.wav";
}
Symbol 1725 MovieClip [__Packages.Edderkopp] Frame 0
class Edderkopp extends Enemy
{
var hp, maxHp, setToIdle, myLevel, myTargetGarbage, myTargetWaste, myTargetBldg, master, giveHp, moveToLoc, _icon, _x, _y, attackFacing, gotoAndStop, singe, takeDamage, oldTargets, eatGarbage, eatWaste;
function Edderkopp () {
super();
}
function setMeUp() {
hp = 50;
maxHp = 50;
fearsDay = true;
}
function onSelected() {
}
function onRelease() {
}
function findAndAttackBuilding() {
var _local2 = findClosestBuilding();
if (_local2 != undefined) {
gotoBuilding(_local2);
} else {
setToIdle();
K.error("edderkop", "tick", "can't find a bldg!");
}
}
function findAndEatGarbage() {
var _local2 = findSomeGarbage();
if (_local2 != undefined) {
gotoGarbage(_local2);
} else {
findAndAttackBuilding();
}
}
function findAndEatNWaste() {
var _local2 = findSomeNWaste();
if (_local2 != undefined) {
gotoWaste(_local2);
} else {
return(false);
}
return(true);
}
function tick() {
switch (myTask) {
case K.IDLE :
var _local3 = findAndEatNWaste();
if (_local3 == false) {
var _local2;
switch (myLevel) {
case 0 :
_local2 = 2;
case 1 :
_local2 = 2;
case 2 :
_local2 = 1;
case 3 :
_local2 = 0;
}
if (K.randRange(0, _local2) > 0.5) {
findAndEatGarbage();
} else {
findAndAttackBuilding();
}
}
break;
case K.GETGARBAGE :
if ((myTargetGarbage == undefined) || (myTargetGarbage.amount <= 0)) {
setToIdle();
}
break;
case K.GETWASTE :
if ((myTargetWaste == undefined) || (myTargetWaste.amount <= 0)) {
setToIdle();
}
break;
case K.ATTACKTASK :
if ((myTargetBldg.hp <= 0) || (myTargetBldg == undefined)) {
if (hp <= maxHp) {
if (K.randRange(0, 1) > 0.5) {
findAndEatGarbage();
}
}
setToIdle();
}
break;
case K.DYING :
setToIdle();
}
regenerate();
}
function regenerate() {
var _local2 = 5 * master.smogLevelUps;
giveHp(_local2);
}
function gotoWaste(w) {
myTargetWaste = w;
var _local3 = w.xTile;
var _local2 = w.yTile;
moveToLoc(_local3, _local2);
myTask = K.GETWASTE;
onTask = true;
_icon.gotoAndStop("walk");
}
function gotoGarbage(g) {
myTargetGarbage = g;
var _local3 = g.xTile;
var _local2 = g.yTile;
moveToLoc(_local3, _local2);
myTask = K.GETGARBAGE;
onTask = true;
_icon.gotoAndStop("walk");
}
function gotoBuilding(bldg) {
myTargetBldg = bldg;
var _local3;
var _local2;
if (bldg._x < _x) {
_local3 = myTargetBldg.xTileUnit + 2;
} else {
_local3 = myTargetBldg.xTileUnit - 1;
}
if (bldg._y < _y) {
_local2 = myTargetBldg.yTileUnit + 1;
} else {
_local2 = myTargetBldg.yTileUnit - 2;
}
moveToLoc(_local3, _local2);
myTask = K.GOTOBUILDING;
onTask = true;
_icon.gotoAndStop("walk");
}
function attackBuilding(bldg) {
myTask = K.ATTACKTASK;
if (attackFacing != undefined) {
(gotoAndStop(attackFacing));// not popped
} else {
(gotoAndStop("right"));// not popped
}
_icon.gotoAndStop("attack");
}
function onAttackHit() {
myTargetBldg.takeDamage(myDamage);
}
function singeLight(i) {
singe.play();
if (master.smogLevelUps > 0) {
i = i - (0.125 * master.smogLevelUps);
}
takeDamage(i);
}
function singeMe() {
singe.play();
var _local2 = 50;
if ((master.smogLevelUps > 0) && (master.smogLevelUps != undefined)) {
_local2 = _local2 - (2 * master.smogLevelUps);
}
takeDamage(_local2);
}
function findSomeNWaste() {
var _local4 = master.rArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local6 = -10000000;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = 0;
if (_local4[_local2].amEatTargetted == false) {
_local3 = _local3 + 50;
}
var _local5 = K.getDist(this, _local4[_local2]);
if (_local5 < _local7) {
_local7 = _local5;
_local3 = _local3 + 50;
_local3 = _local3 + _local4[_local2].amount;
}
if (_local4[_local2].atMax == true) {
_local3 = _local3 + 100;
}
if (_local3 > _local6) {
_local6 = _local3;
_local8 = _local4[_local2];
}
_local2++;
}
_local8.targetForEating();
return(_local8);
}
function findSomeGarbage() {
var _local4 = master.gArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local6 = -10000000;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = 0;
if (_local4[_local2].amEatTargetted == false) {
_local3 = _local3 + 50;
}
var _local5 = K.getDist(this, _local4[_local2]);
if (_local5 < _local7) {
_local7 = _local5;
_local3 = _local3 + 50;
_local3 = _local3 + _local4[_local2].amount;
}
if (_local4[_local2].atMax == true) {
_local3 = _local3 + 100;
}
if (_local3 > _local6) {
_local6 = _local3;
_local8 = _local4[_local2];
}
_local2++;
}
_local8.targetForEating();
return(_local8);
}
function findClosestBuilding() {
var _local4 = master.bldgArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local3 = 0;
var _local6 = 0;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local5;
_local5 = K.getDist(this, _local4[_local2]);
if (_local5 < _local7) {
_local7 = _local5;
_local3 = _local3 + 5;
}
if (_local4[_local2].myIndex == K.LANDFILL) {
if (_local4[_local2].amount > 25) {
_local3 = _local3 + 25;
} else {
_local3 = _local3 - 25;
}
} else if (_local4[_local2].myIndex == K.NUCLEARDUMP) {
if (_local4[_local2].amount > 1) {
_local3 = _local3 + 50;
} else {
_local3 = _local3 - 25;
}
} else if (_local4[_local2].myIndex == K.GUNTURRET) {
_local3 = _local3 + (25 * myLevel);
} else if (_local4[_local2].myIndex == K.FLOODLIGHTS) {
_local3 = _local3 + (35 * myLevel);
} else if (_local4[_local2].myIndex == K.TESLACOIL) {
_local3 = _local3 + (50 * myLevel);
}
if (notInOldList(_local4[_local2])) {
_local3 = _local3 + 25;
}
if (_local3 >= _local6) {
_local6 = _local3;
_local8 = _local4[_local2];
}
_local3 = 0;
_local2++;
}
return(_local8);
}
function notInOldList(b) {
var _local2 = 0;
while (_local2 < oldTargets.length) {
if (oldTargets[_local2] == b) {
return(false);
}
_local2++;
}
return(true);
}
function findALandfill() {
var _local3 = master.bldgArray;
var _local6;
var _local5 = 100000000 /* 0x5F5E100 */;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].myIndex == K.LANDFILL) {
var _local4;
_local4 = K.getDist(this, _local3[_local2]);
if (_local4 < _local5) {
_local5 = _local4;
_local6 = _local3[_local2];
}
}
_local2++;
}
return(_local6);
}
function onMoveFinish() {
if (onTask) {
if (myTask == K.GOTOBUILDING) {
if (myTargetBldg != undefined) {
tryToAttackBuilding();
}
} else if (myTask == K.GETGARBAGE) {
if ((myTargetGarbage != undefined) && (myTargetGarbage.amount > 0)) {
eatGarbage(myTargetGarbage);
} else {
setToIdle();
}
} else if (myTask == K.GETWASTE) {
if ((myTargetWaste != undefined) && (myTargetWaste.amount > 0)) {
eatWaste(myTargetWaste);
} else {
setToIdle();
}
} else if (myTask == K.ATTACKPOSITION) {
if (myTargetBldg != undefined) {
attackBuilding(myTargetBldg);
} else {
setToIdle();
}
}
}
}
function tryToAttackBuilding() {
if (myTargetBldg.requestAttack(this) == true) {
} else {
findSomethingElse();
}
}
function findSomethingElse() {
oldTargets.push(myTargetBldg);
if (oldTargets.length > 2) {
oldTargets.splice(0, 1);
}
setToIdle();
}
function setAttackLoc(o) {
myTask = K.ATTACKPOSITION;
moveToLoc(o.xTile, o.yTile);
attackFacing = o.facing;
}
var myIndex = K.EDDERKOP;
var myMenu = "Edderkop";
var onTask = false;
var myTask = K.IDLE;
var speed = 1;
var selectSound = "edderkop_click1.wav";
var myDamage = K.DMG_EDDERKOP;
var fearsDay = true;
}
Symbol 1726 MovieClip [__Packages.Landfill] Frame 0
class Landfill extends Building
{
var amSelected, master, outline, onSelected, attachMovie, getNextHighestDepth, xTile, yTile, _visible, removeMovieClip, waste;
function Landfill () {
super();
}
function setMeUp() {
}
function doTick() {
}
function getPercent() {
return((100 * amount) / capacity);
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
updatePercent();
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function demolishMe() {
master.playSound(1, "demolish.wav", 1);
attachMovie("mc_smokeCloud", "theSmoke", getNextHighestDepth());
}
function halfDestroyAnim() {
if (Math.ceil(amount / 4) > 0) {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, 20, true);
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4), false);
}
}
function halfDemolishAnim() {
if (Math.ceil(amount / 4) > 0) {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, 20, true);
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4), false);
}
_visible = false;
}
function onDestroyAnim() {
(removeMovieClip());// not popped
}
function addGarbage(amt, isRubble) {
var _local2 = false;
if ((amount + amt) < capacity) {
amount = amount + amt;
_local2 = true;
if (amSelected) {
updatePercent();
}
} else {
amount = capacity;
amFull = true;
}
if (isRubble) {
waste.gotoAndPlay("rubble");
} else {
waste.gotoAndPlay("garbage");
}
return(_local2);
}
function updatePercent() {
master.unClickEverything();
outline._visible = true;
amSelected = true;
var _local2 = getPercent();
master.selectBuilding(myMenu, _local2, this);
}
var myIndex = K.LANDFILL;
var myMenu = "Landfill";
var smogTicks = 0;
var smogTime = 5;
var amSuper = false;
var capacity = 10000;
var amount = 0;
var eatsFood = false;
var amFull = false;
var foodIn = 0;
}
Symbol 1727 MovieClip [__Packages.Engineer] Frame 0
class Engineer extends Unit
{
var startUpSound, master, odometer, setFuelEconomy, refueling, myTarget, myTargetBldg, useResource, refuel, moveToLoc, myResourceType, haul;
function Engineer () {
super();
}
function setMeUp() {
if (startUpSound) {
master.playSound(1, "engineer_click1.wav", 1);
}
odometer = 0;
setFuelEconomy(K.GASOLINE, 1);
}
function onSelected() {
}
function tick() {
if (refueling == 0) {
switch (myTask) {
case K.IDLE :
var _local4 = findASpill();
if (_local4 != undefined) {
goCleanUpSpill(_local4);
} else if (master.rArray.length >= 1) {
var _local5 = findAResource();
goGetResource(_local5);
}
break;
case K.IDLE_RESOURCE :
var _local3 = findADepot(ResourceToken(myTarget));
myTargetBldg = _local3;
if (_local3 != undefined) {
deliverToDepot();
} else {
master.doMessageAlert("noWasteDump", this);
}
break;
case K.CLEANUPSPILL :
if (!master.hasEnergy(1)) {
break;
}
useResource("energy");
master.energyDrain(2);
var _local2 = TerrainSquare(myTarget).cleanUp(10);
if (!((_local2 <= 0) || (_local2 == undefined))) {
break;
}
setToIdle();
}
} else {
refuel();
}
}
function findASpill() {
var _local3 = master.lArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local6 = 0;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].amSpill == true) {
if (_local3[_local2].amTargetted == false) {
var _local5 = K.getDist(this, _local3[_local2]);
var _local4 = 0;
if (_local5 < _local7) {
_local7 = _local5;
_local4 = _local4 + 25;
_local4 = _local4 + _local3[_local2].hp;
}
if (_local4 > _local6) {
_local6 = _local4;
_local8 = _local3[_local2];
}
}
}
_local2++;
}
if (_local8 != undefined) {
_local8.targetForPickup();
}
return(_local8);
}
function findAResource() {
var _local4 = master.rArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local6 = 0;
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2].amTargetted == false) {
var _local5 = K.getDist(this, _local4[_local2]);
var _local3 = 0;
if (_local5 < _local7) {
_local7 = _local5;
_local3 = _local3 + 25;
_local3 = _local3 + _local4[_local2].amount;
}
if (_local4[_local2].atMax == true) {
_local3 = _local3 + 100;
}
if (_local3 > _local6) {
_local6 = _local3;
_local8 = _local4[_local2];
}
}
_local2++;
}
_local8.targetForPickup();
return(_local8);
}
function findADepot(r, d) {
var _local3 = master.bldgArray;
var _local6;
var _local5 = 100000000 /* 0x5F5E100 */;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].myIndex == K.NUCLEARDUMP) {
if (_local3[_local2] != d) {
var _local4;
_local4 = K.getDist(this, _local3[_local2]);
if (_local4 < _local5) {
_local5 = _local4;
_local6 = _local3[_local2];
}
}
}
_local2++;
}
return(_local6);
}
function goCleanUpSpill(s) {
if ((s != undefined) && (onTask == false)) {
onTask = true;
moveToLoc(s.xUnitLoc, s.yUnitLoc + 3);
myTask = K.GOTOSPILL;
myTarget = s;
}
}
function goGetResource(r) {
if ((r != undefined) && (onTask == false)) {
onTask = true;
moveToLoc(r.xTile, r.yTile - 1);
myTask = K.GETRESOURCE;
myTarget = r;
if (r.myIndex == K.NWASTE) {
isNukeWaste == true;
}
}
}
function takeResourceToDepot(r, b) {
if ((r != undefined) && (onTask == false)) {
onTask = true;
moveToLoc(r.xTile, r.yTile - 1);
myTask = K.GETRESOURCE;
myTarget = r;
if (r.myIndex == K.NWASTE) {
isNukeWaste == true;
}
myTargetBldg = b;
}
}
function getResource(r) {
myResourceType = r.myIndex;
var _local4 = r.myType.toLowerCase();
haul.gotoAndStop(_local4);
var _local3 = r.removeAmount(resourceHaul);
r.unTarget();
myResourceAmt = _local3;
}
function deliverResource(d) {
var _local2 = d.addResource(myResourceAmt, myResourceType);
if (_local2) {
haul.gotoAndStop("nothing");
myResourceAmt = 0;
setToIdle();
} else {
myTargetBldg = findADepot(ResourceToken(myTarget), Depot(myTargetBldg));
deliverToDepot();
}
}
function setToIdle() {
onTask = false;
myTask = K.IDLE;
myTarget = undefined;
myTargetBldg = undefined;
isNukeWaste = false;
}
function deliverToDepot() {
onTask = true;
myTask = K.DELIVERRESOURCE;
moveToLoc(myTargetBldg.xTileUnit, myTargetBldg.yTileUnit);
}
function onMoveFinish() {
if (onTask) {
if (myTask == K.GETRESOURCE) {
getResource(ResourceToken(myTarget));
if (myTargetBldg != undefined) {
deliverToDepot();
} else {
onTask = false;
myTask = K.IDLE_RESOURCE;
myTarget = undefined;
myTargetBldg = undefined;
}
} else if (myTask == K.DELIVERRESOURCE) {
deliverResource(Depot(myTargetBldg));
} else if (myTask == K.GOTOSPILL) {
myTask = K.CLEANUPSPILL;
}
}
}
var myIndex = K.ENGINEER;
var myMenu = "Engineer";
var clicks = 0;
var onTask = false;
var myTask = K.IDLE;
var myResourceAmt = 0;
var resourceHaul = 2;
var fuelEfficiency = 1;
var speed = 1.5;
var selectSound = "engineer_click1.wav";
var affirmSound = "engineer_move1.wav";
var buildSound = "engineer_click1.wav";
var isNukeWaste = false;
var alertTime = 0;
}
Symbol 1728 MovieClip [__Packages.GarbageTruck] Frame 0
class GarbageTruck extends Unit
{
var startUpSound, master, odometer, setFuelEconomy, asleep, refueling, refuel, myTargetBldg, moveToLoc, myTarget, haul, setToIdle;
function GarbageTruck () {
super();
}
function setMeUp() {
if (startUpSound) {
master.playSound(1, "garbage_click1.wav", 1);
}
odometer = 0;
setFuelEconomy(K.GASOLINE, 1);
}
function onSelected() {
}
function gotoSleep() {
asleep = true;
}
function tick() {
if (refueling == 0) {
switch (myTask) {
case K.IDLE :
if (!asleep) {
if (master.gArray.length >= 1) {
var _local2 = findSomeGarbage();
goGetSomeGarbage(_local2);
}
}
break;
case K.IDLE_GARBAGE :
if (!asleep) {
if (myGarbageAmt < garbageHaul) {
if (master.gArray.length <= master.uArray.length) {
findLandfillTask();
} else if (master.gArray.length >= 1) {
var _local2 = findSomeGarbage();
goGetSomeGarbage(_local2);
}
} else {
findLandfillTask();
}
} else {
findLandfillTask();
}
}
} else {
refuel();
}
}
function findLandfillTask() {
var _local2 = findALandfill();
myTargetBldg = _local2;
if (_local2 != undefined) {
dumpAtLandfill();
} else {
master.doMessageAlert("noLandfill", this);
}
}
function findSomeGarbage() {
var _local3 = master.gArray;
var _local8;
var _local7 = 100000000 /* 0x5F5E100 */;
var _local6 = -10000000;
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = 0;
if (_local3[_local2].amTargetted == false) {
var _local5 = K.getDist(this, _local3[_local2]);
if (_local5 < _local7) {
_local7 = _local5;
_local4 = _local4 + 25;
}
if (_local3[_local2].isRubble == false) {
_local4 = _local4 + _local3[_local2].amount;
} else if (_local3[_local2].isRubble == true) {
_local4 = _local4 + (_local3[_local2].amount / 2);
if (_local3[_local2].amount <= garbageHaul) {
_local4 = _local4 + ((_local3[_local2].amount / 2) + 5);
}
}
if (_local3[_local2].atMax == true) {
_local4 = _local4 + 100;
}
if (_local4 > _local6) {
_local6 = _local4;
_local8 = _local3[_local2];
}
}
_local2++;
}
_local8.targetForPickup();
return(_local8);
}
function findALandfill(g, l) {
var _local3 = master.bldgArray;
var _local6;
var _local5 = 100000000 /* 0x5F5E100 */;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].myIndex == K.LANDFILL) {
if (_local3[_local2] != l) {
if (_local3[_local2].amFull == false) {
var _local4;
_local4 = K.getDist(this, _local3[_local2]);
if (_local4 < _local5) {
_local5 = _local4;
_local6 = _local3[_local2];
}
}
}
}
_local2++;
}
return(_local6);
}
function goGetSomeGarbage(g) {
if ((g != undefined) && (onTask == false)) {
onTask = true;
moveToLoc(g.xTile, g.yTile - 1);
myTask = K.GETGARBAGE;
myTarget = g;
}
}
function takeGarbageToLandfill(g, l) {
if ((g != undefined) && (onTask == false)) {
onTask = true;
moveToLoc(g.xTile, g.yTile - 1);
myTask = K.GETGARBAGE;
myTarget = g;
myTargetBldg = l;
}
}
function getGarbage(g) {
if (g != undefined) {
myGarbageIsRubble = g.isRubble;
if (myGarbageIsRubble) {
haul.gotoAndStop("rubble");
} else {
haul.gotoAndStop("garbage");
}
var _local2 = garbageHaul - myGarbageAmt;
var _local4 = g.removeAmount(_local2);
g.unTarget();
myGarbageAmt = myGarbageAmt + _local4;
} else {
setToIdle();
myGarbageAmt = myGarbageAmt + 0;
}
}
function dumpGarbage(l) {
if (myGarbageAmt > 0) {
var _local2 = l.addGarbage(myGarbageAmt, myGarbageIsRubble);
if (_local2) {
haul.gotoAndStop("nothing");
setToIdle();
myGarbageAmt = 0;
} else {
myTargetBldg = findALandfill(Garbage(myTarget), Landfill(myTargetBldg));
dumpAtLandfill();
}
} else {
haul.gotoAndStop("nothing");
setToIdle();
}
}
function dumpAtLandfill() {
onTask = true;
myTask = K.DUMPGARBAGE;
moveToLoc(myTargetBldg.xTileUnit, myTargetBldg.yTileUnit);
}
function onMoveFinish() {
if (onTask) {
if (myTask == K.GETGARBAGE) {
getGarbage(Garbage(myTarget));
if (myTargetBldg != undefined) {
dumpAtLandfill();
} else {
onTask = false;
myTask = K.IDLE_GARBAGE;
myTarget = undefined;
myTargetBldg = undefined;
}
} else if (myTask == K.DUMPGARBAGE) {
dumpGarbage(Landfill(myTargetBldg));
}
}
}
var myIndex = K.GARBAGETRUCK;
var myMenu = "GarbageTruck";
var clicks = 0;
var onTask = false;
var myTask = K.IDLE;
var myGarbageAmt = 0;
var myGarbageIsRubble = false;
var garbageHaul = 15;
var fuelEfficiency = 0.333333333333333;
var speed = 2;
var selectSound = "garbage_click1.wav";
var affirmSound = "garbage_move1.wav";
var buildSound = "garbage_click1.wav";
var alertTime = 0;
}
Symbol 1729 MovieClip [__Packages.Fly] Frame 0
class Fly extends MovieClip
{
var startX, _x, startY, _y;
function Fly () {
super();
}
function onLoad() {
startX = _x;
startY = _y;
}
function onEnterFrame() {
_x = _x + xSpeed;
_y = _y + ySpeed;
xSpeed = xSpeed + (-0.1 + (Math.random() * 0.2));
ySpeed = ySpeed + (-0.1 + (Math.random() * 0.2));
if (((_x - startX) > 6) || ((_x - startX) < -6)) {
xSpeed = xSpeed * -1;
}
if (((_y - startY) > 6) || ((_y - startY) < -6)) {
ySpeed = ySpeed * -1;
}
if (xSpeed < -1.5) {
xSpeed = -1.5;
} else if (xSpeed > 1.5) {
xSpeed = 1.5;
}
if (ySpeed < -1.5) {
ySpeed = -1.5;
} else if (ySpeed > 1.5) {
ySpeed = 1.5;
}
}
var xSpeed = 0.5;
var ySpeed = 0.5;
}
Symbol 1730 MovieClip [__Packages.Objective] Frame 0
class Objective extends MovieClip
{
var theText;
function Objective () {
super();
}
function onLoad() {
}
function setText(s) {
theText = s;
}
}
Symbol 1731 MovieClip [__Packages.FloodLights] Frame 0
class FloodLights extends Building
{
var master, notEnoughEnergy, useResource, showEnergyAlert, amSelected, outline, onSelected, gotoAndPlay, gotoAndStop, disabled, _x, _y;
function FloodLights () {
super();
}
function doTick() {
if (isOn) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
master.drainEnergy(energyIn);
useResource("energy");
} else {
showEnergyAlert();
}
}
}
function playAttackSound() {
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, myDamage, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function turnOn() {
isOn = true;
(gotoAndPlay("bounce"));// not popped
}
function turnOff() {
isOn = false;
(gotoAndStop("default"));// not popped
}
function onCheckTick() {
var _local6 = false;
if (!disabled) {
var _local2 = 0;
while (_local2 < master.eArray.length) {
if (master.eArray[_local2]._x != undefined) {
var _local4 = master.eArray[_local2]._x - _x;
var _local3 = master.eArray[_local2]._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= radius) {
if (!isOn) {
_local6 = true;
break;
}
_local6 = true;
master.eArray[_local2].singeLight(myDamage, K.FLOODLIGHTS);
}
}
_local2++;
}
}
if (_local6) {
if (!isOn) {
turnOn();
}
} else {
turnOffTicks++;
if (turnOffTicks > 10) {
turnOff();
turnOffTicks = 0;
}
}
}
function onBounceEnd() {
}
var myIndex = K.FLOODLIGHTS;
var myMenu = "FloodLights";
var myDamage = K.DMG_FLOODLIGHTS;
var radius = 75;
var isWeapon = true;
var isOn = false;
var turnOffTicks = 0;
var foodIn = 1;
var doesSleep = false;
var eatsFood = false;
var energyIn = K.E_IN_FLOODLIGHTS;
}
Symbol 1732 MovieClip [__Packages.GunTurret] Frame 0
class GunTurret extends Building
{
var radius, master, notEnoughMetal, useResource, showMetalAlert, amSelected, outline, onSelected, disabled, _x, _y, target, gun, gotoAndStop;
function GunTurret () {
super();
}
function setMeUp() {
radius = 6 * K.TILE_SIZE;
}
function fire() {
if (coolDown <= 0) {
if (master.hasMetal(metalIn)) {
notEnoughMetal = false;
master.drainMetal(metalIn);
useResource("metal");
firing = true;
onFire();
coolDown = K.COOLDOWN_GUNTURRET;
} else {
showMetalAlert();
}
} else {
coolDown--;
}
}
function playAttackSound() {
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, myDamage, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onCheckTick() {
if (!disabled) {
var _local2 = 0;
while (_local2 < master.eArray.length) {
if (master.eArray[_local2]._x != undefined) {
var _local4 = master.eArray[_local2]._x - _x;
var _local3 = master.eArray[_local2]._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= radius) {
target = master.eArray[_local2];
fire();
break;
}
}
_local2++;
}
}
}
function onFire() {
var _local4 = target._x - _x;
var _local3 = target._y - _y;
var _local2 = Math.atan2(_local3, _local4);
_local2 = _local2 * 57.2957795130823;
_local2 = _local2 + 180;
gun._rotation = _local2;
gun.gotoAndPlay("fire");
target.takeDamage(myDamage, K.GUNTURRET);
}
function onBounceEnd() {
firing = false;
(gotoAndStop("default"));// not popped
}
var myIndex = K.GUNTURRET;
var myMenu = "GunTurret";
var myDamage = K.DMG_GUNTURRET;
var myRange = 3;
var foodIn = 1;
var isWeapon = true;
var firing = false;
var eatsFood = false;
var metalIn = K.M_IN_GUNTURRET;
var coolDown = 0;
var doesSleep = false;
}
Symbol 1733 MovieClip [__Packages.TeslaCoil] Frame 0
class TeslaCoil extends Building
{
var radius, master, notEnoughEnergy, gotoAndPlay, useResource, showEnergyAlert, amSelected, outline, onSelected, disabled, _x, _y, gotoAndStop;
function TeslaCoil () {
super();
}
function setMeUp() {
radius = 3 * K.TILE_SIZE;
}
function fire() {
if (firing == false) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
useResource("energy");
} else {
showEnergyAlert();
}
firing = true;
}
}
function playAttackSound() {
master.playSound(1, "teslacoil.wav", 1);
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, myDamage, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onCheckTick() {
if (!disabled) {
var _local2 = 0;
while (_local2 < master.eArray.length) {
if (master.eArray[_local2]._x != undefined) {
var _local4 = master.eArray[_local2]._x - _x;
var _local3 = master.eArray[_local2]._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= radius) {
fire();
break;
}
}
_local2++;
}
}
}
function onFire() {
var _local2 = 0;
while (_local2 < master.eArray.length) {
var _local4 = master.eArray[_local2]._x - _x;
var _local3 = master.eArray[_local2]._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= radius) {
master.eArray[_local2].takeDamage(myDamage, K.TESLACOIL);
}
_local2++;
}
}
function onBounceEnd() {
firing = false;
(gotoAndStop("default"));// not popped
}
var myIndex = K.TESLACOIL;
var myMenu = "TeslaCoil";
var myDamage = K.DMG_TESLACOIL;
var myRange = 3;
var isWeapon = true;
var firing = false;
var eatsFood = false;
var energyIn = K.E_IN_TESLACOIL;
var doesSleep = false;
}
Symbol 1734 MovieClip [__Packages.Fortress] Frame 0
class Fortress extends Depot
{
var master, gotoAndPlay, notEnoughEnergy, useResource, tickGarbage, showEnergyAlert, hideHpBar, smogPoint, _x, _y;
function Fortress () {
super();
}
function doTick() {
if (master.hasEnergy(energyIn)) {
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
notEnoughEnergy = false;
useResource("energy");
tickGarbage();
} else {
showEnergyAlert();
}
}
function setMeUp() {
hideHpBar();
}
function demolishMe() {
master.showError("You can't demolish your fortress!");
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(_local3, _local2, smogAmount);
}
function disableToggle() {
master.doMessageAlert("You can't disable a fortress!");
}
function onRemove() {
master.loseLevel();
}
var myIndex = K.FORTRESS;
var myMenu = "Fortress";
var smogAmount = K.S_OUT_FORTRESS;
var energyIn = K.E_IN_FORTRESS;
var foodIn = K.F_IN_FORTRESS;
var garbageRate = K.G_OUT_FORTRESS;
}
Symbol 1735 MovieClip [__Packages.Lab] Frame 0
class Lab extends Building
{
var master, notEnoughEnergy, gotoAndPlay, useResource, tickGarbage, showEnergyAlert, amSelected, outline, garbageAmt, onSelected, makeResource;
function Lab () {
super();
}
function doTick() {
if (master.lessThanMaxResearch()) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
useResource("energy");
tickGarbage();
} else {
showEnergyAlert();
}
}
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, garbageAmt, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onBounceEnd() {
makeResource("research");
master.makeResearch(researchOut);
}
var myIndex = K.LAB;
var myMenu = "lab";
var garbageRate = K.G_OUT_LAB;
var energyIn = K.E_IN_LAB;
var researchOut = K.R_OUT_LAB;
var producing = true;
}
Symbol 1736 MovieClip [__Packages.OilGasWell] Frame 0
class OilGasWell extends Building
{
var master, notEnoughEnergy, gotoAndPlay, useResource, tickGarbage, showEnergyAlert, amSelected, outline, garbageAmt, onSelected, makeResource, resource1, xTileUnit, yTileUnit, resource2;
function OilGasWell () {
super();
}
function setMeUp() {
gasOut = K.GAS_OUT_OILGASWELL;
ffOut = K.FF_OUT_OILGASWELL;
}
function doTick() {
var _local2 = false;
if (gasOrOil == 0) {
_local2 = master.lessThanMaxFF();
} else {
_local2 = master.lessThanMaxGas();
}
if (_local2 == true) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
useResource("energy");
tickGarbage();
} else {
showEnergyAlert();
}
}
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, garbageAmt, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onBounceEnd() {
if (gasOrOil == 0) {
makeResource("FF");
master.makeFF(ffOut);
gasOrOil = 1;
} else {
makeResource("gas");
master.makeGas(gasOut);
gasOrOil = 0;
}
}
function setExternalResource1(amount, type) {
if (resource1.myMenu.toLowerCase() == type.toLowerCase()) {
resource1.setAmount(amount);
} else if (resource1.myIndex == undefined) {
var _local2 = master.makeResourceUnit(xTileUnit + 1, yTileUnit + 1, amount, type);
resource1 = _local2;
}
resource1.setBuilding(this);
}
function setExternalResource2(amount, type) {
if (resource2.myMenu.toLowerCase() == type.toLowerCase()) {
resource2.setAmount(amount);
} else if (resource2.myIndex == undefined) {
var _local2 = master.makeResourceUnit(xTileUnit + 1, yTileUnit, amount, type);
resource2 = _local2;
}
resource2.setBuilding(this);
}
function updateResource1(what) {
setExternalResource1(ffAmt, what);
}
function updateResource2(what) {
setExternalResource2(gasAmt, what);
}
function setResource(amount, index) {
if (index == K.GAS) {
gasAmt = amount;
} else if (index == K.FF) {
ffAmt = amount;
}
}
function removeResource(amount, index) {
if (index == K.GAS) {
gasAmt = gasAmt - amount;
if (gasAmt < 0) {
gasAmt = 0;
}
} else if (index == K.FF) {
ffAmt = ffAmt - amount;
if (ffAmt < 0) {
ffAmt = 0;
}
}
}
var myIndex = K.OILGASWELL;
var myMenu = "OilGasWell";
var garbageRate = K.G_OUT_OILGASWELL;
var energyIn = K.E_IN_OILGASWELL;
var gasOut = 0;
var ffOut = 0;
var ffAmt = 0;
var gasAmt = 0;
var gasOrOil = 0;
}
Symbol 1737 MovieClip [__Packages.Mine] Frame 0
class Mine extends Building
{
var master, notEnoughEnergy, gotoAndPlay, useResource, tickGarbage, showEnergyAlert, amSelected, outline, garbageAmt, onSelected, makeResource;
function Mine () {
super();
}
function doTick() {
if (master.lessThanMaxMetal()) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
useResource("energy");
tickGarbage();
} else {
showEnergyAlert();
}
}
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
master.selectBuilding(myMenu, garbageAmt, this);
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function onBounceEnd() {
makeResource("metal");
master.makeMetal(metalOut);
}
var myIndex = K.MINE;
var myMenu = "mine";
var garbageRate = K.G_OUT_MINE;
var energyIn = K.E_IN_MINE;
var metalOut = K.M_OUT_MINE;
}
Symbol 1738 MovieClip [__Packages.GeoPlant] Frame 0
class GeoPlant extends Building
{
var master, gotoAndPlay, makeResource;
function GeoPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
(gotoAndPlay("bounce"));// not popped
}
}
function setMeUp() {
}
function onBounceEnd() {
makeResource("energy");
master.makeEnergy(energyOut);
}
var myIndex = K.GEOPLANT;
var myMenu = "GeoPlant";
var smogAmount = 0;
var energyOut = K.E_OUT_GEOPLANT;
var eatsFood = true;
var garbageRate = 0;
var doesSleep = false;
}
Symbol 1739 MovieClip [__Packages.SuperGeoPlant] Frame 0
class SuperGeoPlant extends GeoPlant
{
function SuperGeoPlant () {
super();
}
var energyOut = K.E_OUT_SUPERGEOPLANT;
var myMenu = "SuperGeoPlant";
var amSuper = true;
}
Symbol 1740 MovieClip [__Packages.GasPlant] Frame 0
class GasPlant extends Building
{
var master, gotoAndPlay, useResource, tickGarbage, showGasAlert, smogPoint, _x, _y, makeResource;
function GasPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
if (master.hasGas(gasIn)) {
(gotoAndPlay("bounce"));// not popped
master.drainGas(gasIn);
useResource("gas");
tickGarbage();
} else {
showGasAlert();
}
}
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(_local3, _local2, smogAmount);
makeResource("energy");
master.makeEnergy(energyOut);
}
var myIndex = K.GASPLANT;
var myMenu = "GasPlant";
var smogAmount = 5;
var energyOut = K.E_OUT_GASPLANT;
var gasIn = K.GAS_IN_GASPLANT;
var doesSleep = false;
}
Symbol 1741 MovieClip [__Packages.Farm] Frame 0
class Farm extends Building
{
var master, notEnoughEnergy, gotoAndPlay, useResource, tickGarbage, showEnergyAlert, smogPoint, _x, _y, makeResource;
function Farm () {
super();
}
function setMeUp() {
}
function doTick() {
if (master.hasEnergy(energyIn)) {
foodOut = foodProduction;
notEnoughEnergy = false;
if (master.lessThanMaxFood()) {
(gotoAndPlay("bounce"));// not popped
master.drainEnergy(energyIn);
useResource("energy");
tickGarbage();
}
} else {
showEnergyAlert();
foodOut = 0;
}
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(smogAmount);
makeResource("food", false);
master.makeFood(foodOut);
}
var myIndex = K.FARM;
var myMenu = "Farm";
var amSuper = false;
var eatsFood = false;
var garbageRate = K.G_OUT_FARM;
var energyIn = K.E_IN_FARM;
var foodIn = 0;
var foodProduction = K.F_OUT_FARM;
var foodOut = K.F_OUT_FARM;
var smogAmount = K.S_OUT_FARM;
}
Symbol 1742 MovieClip [__Packages.SuperFarm] Frame 0
class SuperFarm extends Farm
{
var smogPoint, _x, _y, master, smogAmount, makeResource, foodOut;
function SuperFarm () {
super();
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(smogAmount);
makeResource("food", true);
master.makeFood(foodOut);
}
var foodProduction = K.F_OUT_SUPERFARM;
var foodIn = K.F_OUT_SUPERFARM;
var myMenu = "SuperFarm";
}
Symbol 1743 MovieClip [__Packages.NuclearDump] Frame 0
class NuclearDump extends Depot
{
var amSelected, master, outline, onSelected, attachMovie, getNextHighestDepth, xTile, yTile, _visible;
function NuclearDump () {
super();
}
function setMeUp() {
}
function doTick() {
}
function getPercent() {
return((100 * amount) / capacity);
}
function selectMe() {
if (!amSelected) {
master.unClickEverything();
outline._visible = true;
master.playSound(0, "click4.wav", 1);
updatePercent();
amSelected = true;
onSelected();
} else {
master.playSound(0, "click2.wav", 1);
master.unClickEverything();
}
}
function demolishMe() {
master.playSound(1, "demolish.wav", 1);
attachMovie("mc_smokeCloud", "theSmoke", getNextHighestDepth());
}
function halfDestroyAnim() {
if (Math.ceil(amount / 4) > 0) {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4), true);
if ((amount > 0) && (amount != undefined)) {
master.makeNWaste(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4));
}
}
}
function halfDemolishAnim() {
if (Math.ceil(amount / 4) > 0) {
master.makeGarbage(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4), true);
if ((amount > 0) && (amount != undefined)) {
master.makeNWaste(xTile, yTile, xTile + 1, yTile + 1, Math.ceil(amount / 4));
}
}
_visible = false;
}
function addResource(amt, type) {
var _local3 = false;
if (amFull == false) {
_local3 = true;
if (amt != undefined) {
if ((amount + amt) < capacity) {
amount = amount + amt;
if (amSelected) {
updatePercent();
}
} else {
amount = capacity;
amFull = true;
}
} else {
amt = 0;
}
}
return(_local3);
}
function updatePercent() {
master.unClickEverything();
outline._visible = true;
amSelected = true;
var _local2 = getPercent();
master.selectBuilding(myMenu, _local2, this);
}
var myIndex = K.NUCLEARDUMP;
var myMenu = "NuclearDump";
var smogTicks = 0;
var smogTime = 5;
var amSuper = false;
var capacity = 10000;
var amount = 0;
var eatsFood = false;
var amFull = false;
var foodIn = 0;
}
Symbol 1744 MovieClip [__Packages.SolarPlant] Frame 0
class SolarPlant extends Building
{
var master, gotoAndPlay, makeResource;
function SolarPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
(gotoAndPlay("bounce"));// not popped
}
}
function setMeUp() {
}
function onBounceEnd() {
makeResource("energy");
master.makeEnergy(energyOut);
}
var myIndex = K.SOLARPLANT;
var myMenu = "SolarPlant";
var smogAmount = 0;
var energyOut = K.E_OUT_SOLARPLANT;
var eatsFood = false;
var garbageRate = 0;
}
Symbol 1745 MovieClip [__Packages.WindPlant] Frame 0
class WindPlant extends Building
{
var master, gotoAndPlay, makeResource;
function WindPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
(gotoAndPlay("bounce"));// not popped
}
}
function setMeUp() {
}
function onBounceEnd() {
makeResource("energy");
master.makeEnergy(energyOut);
}
var myIndex = K.WINDPLANT;
var myMenu = "WindPlant";
var smogAmount = 0;
var energyOut = K.E_OUT_WINDPLANT;
var eatsFood = false;
var garbageRate = 0;
var doesSleep = false;
}
Symbol 1746 MovieClip [__Packages.NuclearPlant] Frame 0
class NuclearPlant extends Building
{
var master, gotoAndPlay, tickGarbage, smogPoint, _x, _y, makeResource, resource1, xTileUnit, yTileUnit;
function NuclearPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
(gotoAndPlay("bounce"));// not popped
tickGarbage();
}
}
function setMeUp() {
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
makeResource("energy");
master.makeEnergy(energyOut);
nWasteAmt = nWasteAmt + nWasteOut;
updateResource1("nWaste");
}
function setExternalResource1(amount, type) {
if (resource1.myMenu.toLowerCase() == type.toLowerCase()) {
resource1.setAmount(amount);
} else if (resource1.myIndex == undefined) {
var _local2 = master.makeResourceUnit(xTileUnit + 1, yTileUnit + 1, amount, type);
resource1 = _local2;
}
resource1.setBuilding(this);
}
function updateResource1(what) {
setExternalResource1(nWasteAmt, what);
}
function setResource(amount, index) {
if (index == K.NWASTE) {
nWasteAmt = amount;
}
}
function removeResource(amount, index) {
if (index == K.NWASTE) {
nWasteAmt = nWasteAmt - amount;
if (nWasteAmt < 0) {
nWasteAmt = 0;
}
}
}
var myIndex = K.NUCLEARPLANT;
var myMenu = "NuclearPlant";
var energyOut = K.E_OUT_NUCLEARPLANT;
var nWasteOut = K.NWASTE_OUT_NUCLEARPLANT;
var doesSleep = false;
var garbageRate = 0;
var nWasteAmt = 0;
}
Symbol 1747 MovieClip [__Packages.FFPlant] Frame 0
class FFPlant extends Building
{
var master, gotoAndPlay, useResource, tickGarbage, showFFAlert, smogPoint, _x, _y, makeResource;
function FFPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
if (master.hasFF(FFIn)) {
(gotoAndPlay("bounce"));// not popped
master.drainFF(FFIn);
useResource("FF");
tickGarbage();
} else {
showFFAlert();
}
}
}
function setMeUp() {
}
function onBounceEnd() {
var _local3 = _x + smogPoint._x;
var _local2 = _y + smogPoint._y;
master.makeSmog(_local3, _local2, smogAmount);
makeResource("energy");
master.makeEnergy(energyOut);
}
var myIndex = K.FFPLANT;
var myMenu = "FFPlant";
var smogAmount = K.S_OUT_FFPLANT;
var energyOut = K.E_OUT_FFPLANT;
var FFIn = K.FF_IN_FFPLANT;
var doesSleep = false;
var garbageRate = 0;
}
Symbol 1748 MovieClip [__Packages.FFResource] Frame 0
class FFResource extends ResourceToken
{
var atMax, myBuilding, master, gotoAndStop;
function FFResource () {
super();
}
function setAmount(amt) {
var _local3;
var _local4 = false;
var _local5 = "ff";
if (amt == 1) {
_local3 = "little";
atMax = false;
} else if (amt == 2) {
_local3 = "some";
atMax = false;
} else if (amt == 3) {
_local3 = "lots";
atMax = false;
} else if (amt > 3) {
_local3 = "max";
atMax = true;
} else if (amt <= 0) {
_local4 = true;
atMax = false;
}
amount = amt;
if (myBuilding != undefined) {
myBuilding.setResource(amt, myIndex);
}
if (_local4) {
master.deleteResourceToken(this);
}
(gotoAndStop(_local3));// not popped
if (amSelected) {
master.selectBuilding(_local5, amount, this);
}
if (atMax) {
master.doMessageAlert("ffPickupAlert", this);
}
}
var amSelected = false;
var myMenu = "ff";
var myType = "ff";
var myIndex = K.FF;
var amount = 0;
var amTargetted = false;
}
Symbol 1749 MovieClip [__Packages.GasResource] Frame 0
class GasResource extends ResourceToken
{
var atMax, myBuilding, master, gotoAndStop;
function GasResource () {
super();
}
function setAmount(amt) {
var _local3;
var _local4 = false;
var _local5 = "gas";
if (amt == 1) {
_local3 = "little";
atMax = false;
} else if (amt == 2) {
_local3 = "some";
atMax = false;
} else if (amt == 3) {
_local3 = "lots";
atMax = false;
} else if (amt > 3) {
_local3 = "max";
atMax = true;
} else if (amt <= 0) {
_local4 = true;
atMax = false;
}
amount = amt;
if (myBuilding != undefined) {
myBuilding.setResource(amt, myIndex);
}
if (_local4) {
master.deleteResourceToken(this);
}
(gotoAndStop(_local3));// not popped
if (amSelected) {
master.selectBuilding(_local5, amount, this);
}
if (atMax) {
master.doMessageAlert("gasPickupAlert", this);
}
}
var amSelected = false;
var myMenu = "gas";
var myType = "gas";
var myIndex = K.GAS;
var amount = 0;
var amTargetted = false;
}
Symbol 1750 MovieClip [__Packages.MetalResource] Frame 0
class MetalResource extends ResourceToken
{
var atMax, myBuilding, master, gotoAndStop;
function MetalResource () {
super();
}
function setAmount(amt) {
var _local3;
var _local4 = false;
myMenu = "metal";
if ((amt > 0) && (amt < 15)) {
_local3 = "little";
atMax = false;
} else if ((amt >= 15) && (amt < 35)) {
_local3 = "some";
atMax = false;
} else if ((amt >= 35) && (amt < 50)) {
_local3 = "lots";
atMax = false;
} else if (amt >= 50) {
_local3 = "max";
atMax = true;
} else if (amt <= 0) {
_local4 = true;
atMax = false;
}
amount = amt;
if (myBuilding != undefined) {
myBuilding.setResource(amt);
}
if (_local4) {
master.deleteResourceToken(this);
}
(gotoAndStop(_local3));// not popped
if (amSelected) {
master.selectBuilding(myMenu, amount, this);
}
if (atMax) {
master.doMessageAlert("mPickupAlert", this);
}
}
var amSelected = false;
var myMenu = "metal";
var myType = "metal";
var myIndex = K.METAL;
var amount = 0;
var amTargetted = false;
}
Symbol 1751 MovieClip [__Packages.Tank] Frame 0
class Tank extends Unit
{
var master;
function Tank () {
super();
}
function setMeUp() {
master.playSound(1, "tank_click1.wav", 1);
}
function onSelected() {
}
var myIndex = K.TANK;
var myMenu = "Tank";
var clicks = 0;
var speed = 3;
var selectSound = "tank_click1.wav";
var affirmSound = "tank_move1.wav";
var buildSound = "tank_click1.wav";
}
Symbol 1752 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.2");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
}
return(_local4);
}
}
Symbol 1542 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 1543 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 1544 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 1545 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 1546 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 1547 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1548 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 1549 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 1550 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 1551 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 1552 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 1553 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.126";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 1554 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.126";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1555 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1575 MovieClip [__Packages.mx.controls.CheckBox] Frame 0
class mx.controls.CheckBox extends mx.controls.Button
{
var _getTextFormat, labelPath, iconName;
function CheckBox () {
super();
}
function onRelease() {
super.onRelease();
}
function init() {
super.init();
}
function size() {
super.size();
}
function get emphasized() {
return(undefined);
}
function calcPreferredHeight() {
var _local5 = _getTextFormat();
var _local3 = _local5.getTextExtent2(labelPath.text).height;
var _local4 = iconName._height;
var _local2 = 0;
if ((__labelPlacement == "left") || (__labelPlacement == "right")) {
_local2 = Math.max(_local3, _local4);
} else {
_local2 = _local3 + _local4;
}
return(Math.max(14, _local2));
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "CheckBox";
static var symbolOwner = mx.controls.CheckBox;
static var version = "2.0.2.126";
var className = "CheckBox";
var ignoreClassStyleDeclaration = {Button:1};
var btnOffset = 0;
var __toggle = true;
var __selected = false;
var __labelPlacement = "right";
var __label = "CheckBox";
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "CheckFalseUp";
var falseDownIcon = "CheckFalseDown";
var falseOverIcon = "CheckFalseOver";
var falseDisabledIcon = "CheckFalseDisabled";
var trueUpIcon = "CheckTrueUp";
var trueDownIcon = "CheckTrueDown";
var trueOverIcon = "CheckTrueOver";
var trueDisabledIcon = "CheckTrueDisabled";
var clipParameters = {label:1, labelPlacement:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.CheckBox.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
var centerContent = false;
var borderW = 0;
}
Symbol 1592 MovieClip [__Packages.mx.controls.NumericStepper] Frame 0
class mx.controls.NumericStepper extends mx.core.UIComponent
{
var boundingBox_mc, _visible, tabEnabled, tabChildren, nextButton_mc, __width, prevButton_mc, __height, inputField, StepTrack_mc, focusTextField, createObject, enabled, __set__visible, setSize, createClassObject, __maxChars, dispatchEvent;
function NumericStepper () {
super();
}
function init() {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
tabEnabled = false;
tabChildren = true;
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
if (initializing) {
__visible = x;
}
}
function layoutControl() {
nextButton_mc._x = __width - nextButton_mc.__width;
nextButton_mc._y = 0;
prevButton_mc._x = __width - prevButton_mc.__width;
prevButton_mc._y = __height - prevButton_mc.__height;
inputField.setSize(__width - nextButton_mc.__width, __height);
StepTrack_mc._width = Math.max(nextButton_mc.__width, prevButton_mc.__width);
StepTrack_mc._x = __width - StepTrack_mc._width;
StepTrack_mc._height = __height - (nextButton_mc._height + prevButton_mc._height);
StepTrack_mc._y = nextButton_mc.__height;
}
function createChildren() {
super.createChildren();
addAsset("nextButton_mc", skinIDUpArrow);
addAsset("prevButton_mc", skinIDDownArrow);
addAsset("inputField", skinIDInput);
focusTextField = inputField.label;
createObject("StepTrack", "StepTrack_mc", 2);
size();
}
function draw() {
prevButton_mc.enabled = enabled;
nextButton_mc.enabled = enabled;
inputField.enabled = enabled;
size();
initializing = false;
__set__visible(__visible);
}
function size() {
var _local2 = calcMinHeight();
var _local3 = calcMinWidth();
if (__height < _local2) {
setSize(__width, _local2);
}
if (__width < _local3) {
setSize(_local3, __height);
}
layoutControl();
}
function calcMinHeight() {
return(22);
}
function calcMinWidth() {
return(40);
}
function addAsset(id, skinID) {
var _local2 = new Object();
_local2.styleName = this;
if (skinID == 10) {
_local2.falseUpSkin = upArrowUp;
_local2.falseOverSkin = upArrowOver;
_local2.falseDownSkin = upArrowDown;
_local2.falseDisabledSkin = upArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local5 = nextButton_mc;
_local5.tabEnabled = false;
_local5.styleName = this;
_local5._x = __width - _local5.__width;
_local5._y = 0;
_local5.owner = this;
_local5.autoRepeat = true;
_local5.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local5.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 11) {
_local2.falseUpSkin = downArrowUp;
_local2.falseOverSkin = downArrowOver;
_local2.falseDownSkin = downArrowDown;
_local2.falseDisabledSkin = downArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local3 = prevButton_mc;
_local3.tabEnabled = false;
_local3.styleName = this;
_local3._x = __width - _local3.__width;
_local3._y = __height - _local3.__height;
_local3.owner = this;
_local3.autoRepeat = true;
_local3.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local3.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 9) {
createClassObject(mx.controls.TextInput, id, skinID);
var _local4 = inputField;
_local4.styleName = this;
_local4.setSize(__width - nextButton_mc.__width, __height);
_local4.restrict = "0-9\\-\\.\\,";
_local4.maxChars = __maxChars;
_local4.text = value;
_local4.onSetFocus = function () {
this._parent.onSetFocus();
};
_local4.onKillFocus = function () {
this._parent.onKillFocus();
};
_local4.drawFocus = function (b) {
this._parent.drawFocus(b);
};
_local4.onKeyDown = function () {
this._parent.onFieldKeyDown();
};
}
}
function setFocus() {
Selection.setFocus(inputField);
}
function onKillFocus() {
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
super.onKillFocus();
Key.removeListener(inputField);
if (Number(inputField.text) != value) {
var _local3 = checkValidValue(Number(inputField.text));
inputField.text = _local3;
value = (_local3);
dispatchEvent({type:"change"});
}
}
function onSetFocus() {
super.onSetFocus();
Key.addListener(inputField);
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
}
function onFieldKeyDown() {
var _local2 = value;
switch (Key.getCode()) {
case 40 :
var _local3 = value - stepSize;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 38 :
_local3 = stepSize + value;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 36 :
inputField.text = minimum;
value = (minimum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 35 :
inputField.text = maximum;
value = (maximum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 13 :
value = (Number(inputField.text));
if (_local2 == value) {
break;
}
dispatchEvent({type:"change"});
}
}
function get nextValue() {
if (checkRange(value + stepSize)) {
__nextValue = value + stepSize;
return(__nextValue);
}
}
function get previousValue() {
if (checkRange(__value - stepSize)) {
__previousValue = value - stepSize;
return(__previousValue);
}
}
function set maxChars(num) {
__maxChars = num;
inputField.maxChars = __maxChars;
//return(maxChars);
}
function get maxChars() {
return(__maxChars);
}
function get value() {
return(__value);
}
function set value(v) {
var _local2 = checkValidValue(v);
if (_local2 == __value) {
return;
}
inputField.text = (__value = _local2);
//return(value);
}
function get minimum() {
return(__minimum);
}
function set minimum(v) {
__minimum = v;
//return(minimum);
}
function get maximum() {
return(__maximum);
}
function set maximum(v) {
__maximum = v;
//return(maximum);
}
function get stepSize() {
return(__stepSize);
}
function set stepSize(v) {
__stepSize = v;
//return(stepSize);
}
function onFocus() {
}
function buttonPress(button) {
var _local2 = value;
if (button._name == "nextButton_mc") {
value = value + stepSize;
} else {
value = value - stepSize;
}
if (_local2 != value) {
dispatchEvent({type:"change"});
Selection.setSelection(0, 0);
}
}
function checkRange(v) {
return((v >= minimum) and (v <= maximum));
}
function checkValidValue(val) {
var _local7 = val / stepSize;
var _local9 = Math.floor(_local7);
var _local2 = stepSize;
var _local6 = minimum;
var _local5 = maximum;
if ((val > _local6) and (val < _local5)) {
if ((_local7 - _local9) == 0) {
return(val);
}
var _local8 = Math.floor(val / _local2);
var _local4 = _local8 * _local2;
if (((((val - _local4) >= (_local2 / 2)) && (_local5 >= (_local4 + _local2))) && (_local6 <= (_local4 - _local2))) || (((val + _local2) == _local5) && (((_local5 - _local4) - _local2) > 1E-14))) {
_local4 = _local4 + _local2;
}
return(_local4);
}
if (val >= _local5) {
return(_local5);
}
return(_local6);
}
function onLabelChanged(o) {
var _local2 = checkValidValue(Number(o.__get__text()));
o.__set__text(_local2);
value = (_local2);
}
function get tabIndex() {
return(inputField.tabIndex);
}
function set tabIndex(w) {
inputField.tabIndex = w;
//return(tabIndex);
}
static var symbolName = "NumericStepper";
static var symbolOwner = mx.controls.NumericStepper;
static var version = "2.0.2.126";
var className = "NumericStepper";
var upArrowUp = "StepUpArrowUp";
var upArrowDown = "StepUpArrowDown";
var upArrowOver = "StepUpArrowOver";
var upArrowDisabled = "StepUpArrowDisabled";
var downArrowUp = "StepDownArrowUp";
var downArrowDown = "StepDownArrowDown";
var downArrowOver = "StepDownArrowOver";
var downArrowDisabled = "StepDownArrowDisabled";
var skinIDUpArrow = 10;
var skinIDDownArrow = 11;
var skinIDInput = 9;
var initializing = true;
var __visible = true;
var __minimum = 0;
var __maximum = 10;
var __stepSize = 1;
var __value = 0;
var __nextValue = 0;
var __previousValue = 0;
var clipParameters = {minimum:1, maximum:1, stepSize:1, value:1, maxChars:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
}
Symbol 1615 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.2.126";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 1637 Button
on (release) {
stopAllSounds();
gotoAndStop ("game");
if (theSuperDirector != undefined) {
theSuperDirector.removeMovieClip();
var d = theSuperDirector.getDepth();
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", d);
} else {
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", getNextHighestDepth());
}
theSuperDirector.startTheGame();
}
Symbol 1641 Button
on (release) {
gotoAndStop ("sandbox");
}
Symbol 1645 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 1649 MovieClip Frame 1
function answer() {
answered = true;
}
function noResponse() {
if (!answered) {
getURL ("http://jayisgames.com/cgdc5/?ref=8fefdbfa");
}
}
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.addCallback("answer", this, answer);
}
var answered = false;
button_mc.onRelease = function () {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("close");
}
setTimeout(noResponse, 500);
};
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("8fefdbfa", this, 10301, true);
Symbol 1654 Button
on (release) {
var temp = levelStepper.value;
stopAllSounds();
gotoAndStop ("game");
if (theSuperDirector != undefined) {
theSuperDirector.removeMovieClip();
var d = theSuperDirector.getDepth();
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", d);
} else {
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", getNextHighestDepth());
}
theSuperDirector.setLevel(temp);
theSuperDirector.startTheGame();
}
Symbol 1660 Button
on (release) {
gotoAndStop ("main");
}
Symbol 1661 MovieClip Frame 1
gotoAndStop(_currentframe + 1);
Symbol 1661 MovieClip Frame 2
gotoAndStop(_currentframe + 1);
Symbol 1661 MovieClip Frame 3
stop();
Symbol 1661 MovieClip Frame 4
stop();
Symbol 1661 MovieClip Frame 5
stop();
Symbol 1661 MovieClip Frame 6
stop();
Symbol 1661 MovieClip Frame 7
stop();
Symbol 1661 MovieClip Frame 8
stop();
Symbol 1661 MovieClip Frame 9
stop();
Symbol 1661 MovieClip Frame 10
stop();
Symbol 1662 Button
on (release) {
levels.gotoAndStop(levels._currentframe - 1);
currentLevel = -levels._currentframe;
}
Symbol 1663 Button
on (release) {
levels.gotoAndStop(levels._currentframe + 1);
currentLevel = -levels._currentframe;
}
Symbol 1667 Button
on (release) {
stopAllSounds();
gotoAndStop ("game");
if (theSuperDirector != undefined) {
theSuperDirector.removeMovieClip();
var d = theSuperDirector.getDepth();
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", d);
} else {
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", getNextHighestDepth());
}
theSuperDirector.setLevel(currentLevel);
theSuperDirector.startTheGame();
}