Frame 1
stop();
Instance of Symbol 471 MovieClip [mc_loadbar] in Frame 1
onClipEvent (enterFrame) {
var p = (getBytesLoaded() / getBytesTotal());
percent = Math.floor(p * 100);
bar._width = p * 500;
if (percent >= 100) {
_parent.play();
}
}
Frame 4
_root.kongregateServices.connect();
MochiAd.showPreGameAd({id:"5225294dfd0829db", res:"800x600"});
Instance of Symbol 495 MovieClip [CheckBox] in Frame 4
//component parameters
onClipEvent (construct) {
label = "CheckBox";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 1194 MovieClip [NumericStepper] in Frame 4
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1211 MovieClip [RadioButton] in Frame 4
//component parameters
onClipEvent (construct) {
data = "";
groupName = "radioGroup";
label = "Radio Button";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 1194 MovieClip [NumericStepper] in Frame 4
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1211 MovieClip [RadioButton] in Frame 4
//component parameters
onClipEvent (construct) {
data = "";
groupName = "radioGroup";
label = "Radio Button";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 1464 MovieClip in Frame 4
onClipEvent (load) {
_parent.stopAllSounds();
}
Frame 5
Frame 6
var theSuperDirector;
Mouse.show();
Instance of Symbol 1194 MovieClip [NumericStepper] "levelStepper" in Frame 6
//component parameters
onClipEvent (construct) {
maximum = 8;
minimum = 1;
stepSize = 1;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 7
stop();
Frame 8
stop();
Instance of Symbol 1194 MovieClip [NumericStepper] "r_f" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_s" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 50;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_r" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_m" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 400;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_g" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_ff" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_e" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 400;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "increase_time" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 1;
stepSize = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "spawn_time" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 1;
stepSize = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 437 MovieClip [ComboBox] "zombiesOn" in Frame 8
//component parameters
onClipEvent (construct) {
data = [];
data[0] = true;
data[1] = false;
editable = false;
labels = [];
labels[0] = "Yes";
labels[1] = "No";
rowCount = 2;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "time_night" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 80;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "time_day" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 150;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "spawn_rate" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 20;
minimum = 0;
stepSize = 1;
value = 3;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "increase_rate" in Frame 8
//component parameters
onClipEvent (construct) {
maximum = 5;
minimum = 0;
stepSize = 1;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 9
currentLevel = -1;
Instance of Symbol 1194 MovieClip [NumericStepper] "r_f" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_s" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 50;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_r" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_m" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 400;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_g" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_ff" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 30;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "r_e" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 0;
stepSize = 10;
value = 400;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "increase_time" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 1;
stepSize = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "spawn_time" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 1;
stepSize = 1;
value = 2;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 437 MovieClip [ComboBox] "zombiesOn" in Frame 9
//component parameters
onClipEvent (construct) {
data = [];
data[0] = true;
data[1] = false;
editable = false;
labels = [];
labels[0] = "Yes";
labels[1] = "No";
rowCount = 2;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "time_night" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 10;
stepSize = 10;
value = 80;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "time_day" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 999;
minimum = 10;
stepSize = 10;
value = 150;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "spawn_rate" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 20;
minimum = 0;
stepSize = 1;
value = 3;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 1194 MovieClip [NumericStepper] "increase_rate" in Frame 9
//component parameters
onClipEvent (construct) {
maximum = 5;
minimum = 0;
stepSize = 1;
value = 1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 33 MovieClip Frame 19
stop();
Symbol 34 MovieClip [mc_goop] Frame 28
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 52 MovieClip [mc_wasteland_vertical] Frame 1
#initclip 157
Object.registerClass("mc_wasteland_vertical", ToggleButton);
#endinitclip
stop();
Symbol 52 MovieClip [mc_wasteland_vertical] Frame 2
stop();
Symbol 61 MovieClip [wasteland_button_horiz] Frame 1
#initclip 154
Object.registerClass("wasteland_button_horiz", ToggleButton);
#endinitclip
stop();
Symbol 61 MovieClip [wasteland_button_horiz] Frame 2
stop();
Symbol 79 Button
on (release) {
_parent.endTextThing();
}
Symbol 121 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 2
stop();
Symbol 121 MovieClip Frame 3
stop();
Symbol 121 MovieClip Frame 4
stop();
Symbol 121 MovieClip Frame 5
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 2
stop();
Symbol 296 MovieClip Frame 3
stop();
Symbol 296 MovieClip Frame 4
stop();
Symbol 296 MovieClip Frame 5
stop();
Symbol 296 MovieClip Frame 6
stop();
Symbol 296 MovieClip Frame 7
stop();
Symbol 296 MovieClip Frame 8
stop();
Symbol 296 MovieClip Frame 9
stop();
Symbol 296 MovieClip Frame 10
stop();
Symbol 296 MovieClip Frame 11
stop();
Symbol 296 MovieClip Frame 12
stop();
Symbol 296 MovieClip Frame 13
stop();
Symbol 296 MovieClip Frame 14
stop();
Symbol 296 MovieClip Frame 15
stop();
Symbol 296 MovieClip Frame 16
stop();
Symbol 296 MovieClip Frame 17
stop();
Symbol 296 MovieClip Frame 18
stop();
Symbol 296 MovieClip Frame 19
stop();
Symbol 296 MovieClip Frame 20
stop();
Symbol 301 MovieClip [mc_textThing] Frame 1
#initclip 155
Object.registerClass("mc_textThing", TextThing);
#endinitclip
stop();
Symbol 301 MovieClip [mc_textThing] Frame 2
stop();
Symbol 302 MovieClip [mc_light] Frame 1
#initclip 156
Object.registerClass("mc_light", LightBox);
#endinitclip
stop();
Symbol 302 MovieClip [mc_light] Frame 2
stop();
Symbol 308 MovieClip [Defaults] Frame 1
#initclip 123
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 309 MovieClip [UIObjectExtensions] Frame 1
#initclip 124
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 310 MovieClip [UIObject] Frame 1
#initclip 125
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 311 MovieClip [it.sephiroth.tooltip] Frame 1
#initclip 126
Object.registerClass("it.sephiroth.tooltip", it.sephiroth.tooltip);
#endinitclip
stop();
Symbol 333 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 334 MovieClip Frame 1
#initclip 127
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 335 MovieClip [FocusRect] Frame 1
#initclip 128
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 336 MovieClip [FocusManager] Frame 1
#initclip 129
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 337 MovieClip [UIComponentExtensions] Frame 1
#initclip 130
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 338 MovieClip [UIComponent] Frame 1
#initclip 131
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 340 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 342 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 345 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 347 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 350 MovieClip [SimpleButton] Frame 1
#initclip 132
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 353 MovieClip [Border] Frame 1
#initclip 133
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 354 MovieClip [RectBorder] Frame 1
#initclip 134
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 355 MovieClip [TextInput] Frame 1
#initclip 135
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 356 MovieClip [ComboBase] Frame 1
#initclip 136
mx.controls.listclasses.DataSelector.Initialize(Object(mx.controls.ComboBase).prototype);
Object.registerClass("ComboBase", mx.controls.ComboBase);
#endinitclip
stop();
Instance of Symbol 350 MovieClip [SimpleButton] in Symbol 356 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 355 MovieClip [TextInput] in Symbol 356 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 357 MovieClip [DataProvider] Frame 1
#initclip 137
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 358 MovieClip [DataSelector] Frame 1
#initclip 138
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 359 MovieClip [SelectableRow] Frame 1
#initclip 139
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 360 MovieClip [ButtonSkin] Frame 1
#initclip 140
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 361 MovieClip [Button] Frame 1
#initclip 141
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 350 MovieClip [SimpleButton] in Symbol 361 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 362 MovieClip [CustomBorder] Frame 1
#initclip 142
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 374 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 376 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 387 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 389 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 396 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 417 MovieClip [BtnDownArrow] Frame 1
#initclip 143
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 418 MovieClip [BtnUpArrow] Frame 1
#initclip 144
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 420 MovieClip [HScrollBar] Frame 1
#initclip 145
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 361 MovieClip [Button] in Symbol 420 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 350 MovieClip [SimpleButton] in Symbol 420 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 421 MovieClip [VScrollBar] Frame 1
#initclip 146
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 361 MovieClip [Button] in Symbol 421 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 350 MovieClip [SimpleButton] in Symbol 421 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 422 MovieClip [View] Frame 1
#initclip 147
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 423 MovieClip [ScrollView] Frame 1
#initclip 148
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 420 MovieClip [HScrollBar] in Symbol 423 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 421 MovieClip [VScrollBar] in Symbol 423 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 424 MovieClip [ScrollSelectList] Frame 1
#initclip 149
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 425 MovieClip [List] Frame 1
#initclip 150
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 431 MovieClip [ComboDownArrowDisabled] Frame 1
#initclip 151
Object.registerClass("ComboDownArrowDisabled", mx.controls.SimpleButton);
#endinitclip
Symbol 433 MovieClip [ComboThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 436 MovieClip [ComboAssets] Frame 1
#initclip 152
mx.controls.ComboBox.prototype.downArrowUpName = "ComboDownArrowUp";
mx.controls.ComboBox.prototype.downArrowDownName = "ComboDownArrowDown";
mx.controls.ComboBox.prototype.downArrowOverName = "ComboDownArrowOver";
mx.controls.ComboBox.prototype.downArrowDisabledName = "ComboDownArrowDisabled";
mx.controls.ComboBox.prototype.wrapDownArrowButton = false;
mx.controls.ComboBox.prototype.dropDownBorderStyle = "solid";
mx.controls.ComboBox.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, {bl:0, tl:0, tr:5, br:5}, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
#endinitclip
Symbol 437 MovieClip [ComboBox] Frame 1
#initclip 153
Object.registerClass("ComboBox", mx.controls.ComboBox);
#endinitclip
stop();
Instance of Symbol 425 MovieClip [List] in Symbol 437 MovieClip [ComboBox] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1548 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");
}
function setUp() {
isDown = false;
gotoAndStop("up");
}
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 1549 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");
} else {
gotoAndStop("tutorial");
tutorial.gotoAndStop(t);
}
}
function setTitle(t) {
titleName = t;
}
}
Symbol 1550 MovieClip [__Packages.LightBox] Frame 0
class LightBox extends MovieClip
{
var lightsArray, lightMask, createEmptyMovieClip, getNextHighestDepth, theLight, attachMovie;
function LightBox () {
super();
}
function onLoad() {
lightsArray = new Array();
}
function makeLightMask() {
lightMask = createEmptyMovieClip("lightMask", getNextHighestDepth());
}
function setUpMask() {
theLight.setMask(lightMask);
}
function makeLight(xx, yy) {
var _local2 = attachMovie("mc_floodcircle", "circle_" + lightCount, getNextHighestDepth());
_local2._x = xx + 16;
_local2._y = yy;
_local2.blendMode = "overlay";
lightCount++;
lightsArray.push(_local2);
}
function clearLights() {
var _local2 = 0;
while (_local2 < lightsArray.length) {
lightsArray[_local2].removeMovieClip();
lightsArray[_local2] = undefined;
_local2++;
}
lightsArray = new Array();
}
var lightCount = 0;
}
Symbol 1551 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 1552 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 = -20;
static var MENU_CODE = -21;
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_EF_SUPERGEOPLANT = 1.5;
static var U_EM_GEOPLANT = 0.75;
static var U_EM_SUPERGEOPLANT = 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 1553 MovieClip [__Packages.Director] Frame 0
class Director extends MovieClip
{
var master, sandBoxObject, 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, night, light, smogLayer, drawLayer, 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() {
setMeUp();
}
function setMeUp() {
}
function setMaster(s) {
master = s;
}
function setSandBoxObject(sO) {
sandBoxObject = sO;
}
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);
night.swapDepths(theTerrain.getDepth() + 2);
light.swapDepths(theTerrain.getDepth() + 3);
groundLayer.swapDepths(theTerrain.getDepth() + 4);
resourceLayer.swapDepths(theTerrain.getDepth() + 5);
unitLayer.swapDepths(theTerrain.getDepth() + 6);
smogLayer.swapDepths(theTerrain.getDepth() + 7);
drawLayer.swapDepths(theTerrain.getDepth() + 8);
underLayer._alpha = 100;
groundLayer._alpha = 100;
resourceLayer._alpha = 100;
unitLayer._alpha = 100;
smogLayer._alpha = 100;
drawLayer._alpha = 100;
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, sandBoxObject);
} else {
lData.initialize(nextLevel, this, sandBoxObject);
}
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();
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 < uArray.length) {
uArray[_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() {
if (lData.inSandbox == true) {
killResearch();
}
master.resetLevel(sandBoxObject);
}
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 checkEnemyArray() {
var _local3 = true;
var _local2 = 0;
while (_local2 < eArray.length) {
if (eArray[_local2] != undefined) {
if (eArray[_local2].destroying == false) {
_local3 = false;
}
}
_local2++;
}
if (_local3) {
refreshEnemyArray();
}
}
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 usePower(i) {
master.statNugget.usePower(i);
}
function useFuel(i) {
master.statNugget.useFuel(i);
}
function playSandboxLevel(i) {
master.statNugget.playSandboxLevel(i);
}
function beatLevel(i) {
master.statNugget.beatLevel(i);
addCampaignStats();
updateLevelStats();
}
function updateDayStats() {
if (lData.inCampaign == true) {
if (lData.myIndex > 4) {
kongregateSubmit("EnergyProduced_Day", energyProduced_Day);
kongregateSubmit("EnergyConsumed_Day", energyConsumed_Day);
}
}
energyProduced_Day = 0;
energyConsumed_Day = 0;
}
function updateLevelStats() {
updateDayStats();
if (lData.inCampaign == true) {
if (lData.myIndex > 4) {
kongregateSubmit("EnergyProduced_Level", energyProduced_Level);
kongregateSubmit("EnergyConsumed_Level", energyConsumed_Level);
}
}
energyProduced_Level = 0;
energyConsumed_Level = 0;
}
function addCampaignStats() {
if (lData.inCampaign == true) {
master.statNugget.addEnergyConsumed(energyConsumed_Level);
master.statNugget.addGarbage(garbageProduced_);
master.statNugget.addFossilFuelsConsumed(fossilFuelsConsumed_);
master.statNugget.addMetalConsumed(metalConsumed_);
master.statNugget.addNaturalGasConsumed(naturalGasConsumed_);
master.statNugget.addNuclearAccidents(nuclearAccidents_);
master.statNugget.addPollutionAccidents(pollutionAccidents_);
master.statNugget.addSmog(smogProduced_);
}
}
function finalizeCampaignStats() {
master.statNugget.finalizeCampaignStats();
}
function winTheGame() {
beatLevel(lData.myIndex);
addCampaignStats();
finalizeCampaignStats();
quitTheGame();
}
function doNextLevel() {
beatLevel(lData.myIndex);
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") {
winTheGame();
}
theInterface.hideBldgButton();
}
function achieveObjective() {
onlyShowTextThing();
}
function onEnemyDie() {
checkEnemyArray();
attemptStatistic_ZombieKill();
}
function attemptStatistic_ZombieKill() {
if (lData.inCampaign == true) {
kongregateSubmit("ZombiesNeutralized", 1);
}
}
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;
updateDayStats();
}
function kongregateSubmit(str, n) {
_root.kongregateStats.submit(str, n);
}
function checkLevelsBeaten() {
return(master.statNugget.checkLevelsBeaten(lData));
}
function setNightImmediately() {
night.gotoAndStop("night_now");
musicThePump();
putBuildingsToSleep();
nowItsNight();
}
function makeLight() {
light.clearLights();
makeLightThings();
}
function killLight() {
}
function makeLightThings() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].myIndex == K.FLOODLIGHTS) {
if (bldgArray[_local2].isOn == true) {
light.makeLight(getBuildingX(bldgArray[_local2].xTile), getBuildingY(bldgArray[_local2].yTile));
}
}
_local2++;
}
}
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 refreshEnemyArray() {
eArray = new Array();
}
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);
superPush(eArray, _local3);
}
var _local2 = 0;
while (_local2 < levelUps) {
_local3.doNextLevel();
_local2++;
}
cursor.swapDepths(_local3);
}
function superPush(a, thing) {
var _local3 = false;
var _local1 = 0;
while (_local1 < a.length) {
if (a[_local1] == undefined) {
a[_local1] = thing;
_local3 = true;
break;
}
_local1++;
}
if (!_local3) {
a.push(thing);
}
}
function updateFleetFuel() {
setFleetFuel(fleetFuelType);
}
function setFleetFuel(f) {
switch (f) {
case K.GASOLINE :
fleetFuelString = "gasoline";
useFuel(1);
break;
case K.DIESEL :
fleetFuelString = "diesel";
break;
case K.ETHANOL :
fleetFuelString = "ethanol";
useFuel(2);
break;
case K.ELECTRIC :
fleetFuelString = "electric";
useFuel(3);
break;
case K.NATGAS :
fleetFuelString = "natGas";
useFuel(4);
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, ei, eo) {
energyNet = e;
theInterface.setEnergyNet(e, ei, eo);
}
function setNetFood(f) {
foodNet = f;
theInterface.setFoodNet(f);
}
function checkForAlerts() {
if ((energyNet < 0) && (foodNet < 0)) {
if (lastAlert != "efDefecit") {
doMessageAlert("efDefecit");
}
} else if (energyNet < 0) {
if (lastAlert != "eDefecit") {
doMessageAlert("eDefecit");
}
} else if (foodNet < 0) {
if (lastAlert != "fDefecit") {
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 _local5 = 0;
var _local4 = 0;
var _local6 = 0;
if (fleetFuelType == K.ELECTRIC) {
var _local2 = 0;
while (_local2 < uArray.length) {
if (uArray[_local2].myIndex == K.ENGINEER) {
_local3 = _local3 - uArray.fuelConsumption;
_local4 = _local4 - uArray.fuelConsumption;
} else {
_local3 = _local3 - (uArray.fuelConsumption * 3);
_local4 = _local4 - (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);
_local4 = _local4 - ((bldgArray[_local2].energyIn * K.REPAIRTIME) / K.FAST_TICK_AMOUNT);
}
} else {
_local3 = _local3 + bldgArray[_local2].energyOut;
_local6 = _local6 + bldgArray[_local2].energyOut;
_local3 = _local3 - bldgArray[_local2].energyIn;
_local4 = _local4 - bldgArray[_local2].energyIn;
_local5 = _local5 + bldgArray[_local2].foodOut;
}
if (bldgArray[_local2].eatsFood) {
if (dayTime == K.DAY) {
_local5 = _local5 - bldgArray[_local2].foodIn;
}
}
}
_local2++;
}
_local3 = Math.round(_local3);
_local5 = Math.round(_local5);
setNetEnergy(_local3, _local6, _local4);
setNetFood(_local5);
}
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 produceSmog(amt) {
smogProduced_ = smogProduced_ + amt;
}
function produceGarbage(amt) {
garbageProduced_ = garbageProduced_ + amt;
}
function makeFF(f) {
setFF(r_FF + f);
}
function makeResearch(r) {
setResearch(r_research + r);
}
function drainFF(f) {
setFF(r_FF - f);
fossilFuelsConsumed_ = fossilFuelsConsumed_ + f;
}
function drainResearch(r) {
setResearch(r_research - r);
}
function makeGas(g) {
setGas(r_gas + g);
}
function drainGas(g) {
setGas(r_gas - g);
naturalGasConsumed_ = naturalGasConsumed_ + g;
}
function makeEnergy(e) {
energyProduced_Day = energyProduced_Day + e;
energyProduced_Level = energyProduced_Level + e;
setEnergy(r_energy + e);
}
function drainEnergy(e) {
energyConsumed_Day = energyConsumed_Day + e;
energyConsumed_Level = energyConsumed_Level + 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);
metalConsumed_ = metalConsumed_ + m;
}
function unitFFDrain() {
drainFF(1);
}
function FFPlantDrain() {
drainFF(1);
}
function foodDrain(f) {
setFood(r_food - f);
}
function energyDrain(e) {
drainEnergy(e);
}
function mineDrain() {
drainEnergy(K.E_IN_MINE);
}
function farmMake() {
setFood(r_food + 5);
}
function superFarmMake() {
setFood(r_food + 10);
}
function gasPlantMake() {
makeEnergy(20);
}
function giveMetal(m) {
makeMetal(m);
}
function FFPlantMake() {
makeEnergy(30);
}
function mineMake() {
makeMetal(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 if (str == "gWarning") {
if (gWarnCounter != 0) {
gWarnCounter--;
} else if (gWarnCounter == 0) {
theAlert = str;
alertNextFrame = true;
gWarnCounter = 60;
}
} else {
theAlert = str;
alertNextFrame = true;
}
alertTarget = thing;
}
function messageAlert(str) {
lastAlert = 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 globalRepair() {
var _local2 = 0;
while (_local2 < bldgArray.length) {
if (bldgArray[_local2].hp < 100) {
bldgArray[_local2].repairMe();
}
_local2++;
}
}
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 bruteForceClick(notThis) {
var _local4 = getBuildingLocX(_xmouse);
var _local3 = getBuildingLocY(_ymouse);
var _local5 = false;
var _local2 = 0;
while (_local2 < bldgArray.length) {
if ((bldgArray[_local2].xTile == _local4) && (bldgArray[_local2].yTile == _local3)) {
if (bldgArray[_local2] != notThis) {
bldgArray[_local2].onRelease();
_local5 = true;
}
}
_local2++;
}
if (!_local5) {
onClickTerrain();
}
}
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);
} else if (_local3[_local2].myMenu.toLowerCase() == ("super" + target)) {
_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 nuclearAccident() {
nuclearAccidents_++;
}
function polluteTile(xx, yy) {
pollutionAccidents_++;
var _local3 = false;
var _local4;
var _local6 = xx - 0.5;
var _local5 = yy - 1;
var _local2 = 0;
while (_local2 < lArray.length) {
if ((lArray[_local2].xLoc == _local6) && (lArray[_local2].yLoc == _local5)) {
_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 checkPowerUse(thing) {
if (thing == "FFPlant") {
usePower(1);
} else if (thing == "GasPlant") {
usePower(2);
} else if (thing == "GeoPlant") {
usePower(3);
} else if (thing == "NuclearPlant") {
usePower(4);
} else if (thing == "SolarPlant") {
usePower(5);
} else if (thing == "WindPlant") {
usePower(6);
}
}
function buildBuilding(xx, yy, thing, buildSuper, dontSelectIt) {
checkPowerUse(thing);
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 findReservoir(xx, yy) {
return(lData.findReservoir(xx, yy));
}
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) {
produceGarbage(amt);
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);
produceGarbage(amt);
_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) {
produceSmog(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 27 :
theInterface.goBackButton("default");
break;
case 65 :
break;
case 66 :
theInterface.doPressButton("bLab");
break;
case 67 :
theInterface.doPressButton("bFactory");
break;
case 68 :
theInterface.doPressButton("b_Defense");
break;
case 69 :
theInterface.doActionButton("demolish");
break;
case 70 :
theInterface.doPressButton("bFarm");
break;
case 71 :
theInterface.doPressButton("bGasPlant");
break;
case 72 :
break;
case 73 :
theInterface.doPressButton("bWindPlant");
break;
case 74 :
break;
case 75 :
break;
case 76 :
theInterface.doPressButton("bLandfill");
break;
case 77 :
theInterface.doPressButton("bMine");
break;
case 78 :
theInterface.doPressButton("bNuclearPlant");
break;
case 79 :
theInterface.doPressButton("bFFPlant");
break;
case 80 :
theInterface.doPressButton("b_PowerPlant");
break;
case 81 :
break;
case 82 :
repairSelected();
break;
case 83 :
theInterface.doPressButton("bSolarPlant");
break;
case 84 :
theInterface.doPressButton("bGeoPlant");
break;
case 85 :
theInterface.doPressButton("bNuclearDump");
break;
case 86 :
break;
case 87 :
theInterface.doPressButton("bOilGasWell");
break;
case 88 :
disableToggleBuilding();
break;
case 89 :
break;
case 90 :
break;
case 48 :
case 49 :
theInterface.doPressButton("bFloodLights");
break;
case 50 :
theInterface.doPressButton("bGunTurret");
break;
case 51 :
theInterface.doPressButton("bTeslaCoil");
break;
case 52 :
case 53 :
case 54 :
case 55 :
case 56 :
case 57 :
case 189 :
cheat(1);
}
}
}
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 (lData.zombiesOn == true) {
if (n == undefined) {
n = getLevelEnemies();
}
} else {
n = 0;
}
var _local5 = Math.round(smogLevel / 250);
var _local6 = 0;
if ((n > 0) && (n != undefined)) {
var _local4 = false;
var _local2 = 0;
while (!_local4) {
if (lArray[0] == undefined) {
n = 0;
_local4 = true;
}
_local2 = K.randRange(0, lArray.length);
if (lArray[_local2].myIndex == K.SCORCHED) {
makeABadGuy(_local2, n, _local5, 0);
_local6++;
if (_local6 >= n) {
_local4 = true;
}
}
}
_local2 = 0;
while (_local2 < lArray.length) {
if (lArray[_local2].myIndex == K.POLLUTED) {
makeABadGuy(_local2, n, _local5, 0);
makeABadGuy(_local2, n, _local5, 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 lastAlert = "";
var daysSurvived = 0;
var spawnTicks = 0;
var inAMenu = false;
var energyDefecits = false;
var foodDefecits = false;
var gWarnCounter = 0;
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;
var energyProduced_Level = 0;
var energyProduced_Day = 0;
var energyConsumed_Level = 0;
var energyConsumed_Day = 0;
var upgradesAchieved = 0;
var sandboxMapsPlayed = 0;
var fuelSourcesUsed = 0;
var powerSourcesUsed = 0;
var fossilFuelsConsumed_ = 0;
var naturalGasConsumed_ = 0;
var metalConsumed_ = 0;
var smogProduced_ = 0;
var garbageProduced_ = 0;
var energyConsumed_ = 0;
var pollutionAccidents_ = 0;
var nuclearAccidents_ = 0;
var levelsBeaten = 0;
var fuelsUsed = 0;
}
Symbol 1554 MovieClip [__Packages.SuperDirector] Frame 0
class SuperDirector extends MovieClip
{
var currentLevel, statNugget, sandBoxObject, attachMovie, getNextHighestDepth, theDirector, theTransition, _parent, removeMovieClip;
function SuperDirector () {
super();
}
function onLoad() {
}
function setMeUp() {
startTheGame();
}
function setLevel(i) {
currentLevel = i;
}
function setStat(str, n) {
statNugget.setValue(str, n);
}
function setNugget(n) {
sandBoxObject = n;
}
function startTheGame() {
startGameLevel(currentLevel);
}
function startGameLevel(i) {
statNugget = new StatisticNugget(this);
currentLevel = i;
attachMovie("mc_director", "theDirector", getNextHighestDepth());
theDirector.nextLevel = i;
theDirector.setMaster(this);
var back = this;
theDirector.setMeUp = function () {
this.setSandBoxObject(back.sandBoxObject);
};
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(i) {
attachMovie("mc_director", "theDirector", getNextHighestDepth());
theDirector.nextLevel = currentLevel;
theDirector.setMaster(this);
var back = this;
theDirector.setMeUp = function () {
this.setSandBoxObject(back.sandBoxObject);
};
makeTransition();
onMidTransition = function () {
this.theDirector.doFirstStuff();
this.theTransition.play();
};
theTransition.gotoAndPlay("mid");
}
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(n) {
sandBoxObject = n;
makeTransition();
onMidTransition = function () {
this.theDirector.deleteMe();
this.sameGameLevel();
};
}
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();
}
function makeTransition() {
if (theTransition != undefined) {
theTransition.removeMovieClip();
}
attachMovie("mc_transitioner", "theTransition", getNextHighestDepth());
}
function onMidTransition() {
}
}
Symbol 1555 MovieClip [__Packages.LevelNugget] Frame 0
class LevelNugget extends Object
{
var e, f, s, r, m, g, ff, time_day, time_night, spawn_rate, spawn_time, increase_rate, increase_time, zombiesOn, wastelandN, wastelandS, wastelandW, wastelandE;
function LevelNugget () {
super();
}
function setR(_e, _f, _s, _r, _m, _g, _ff) {
e = _e;
f = _f;
s = _s;
r = _r;
m = _m;
g = _g;
ff = _ff;
}
function setS(td, tn, sr, st, ir, it, zo) {
time_day = td;
time_night = tn;
spawn_rate = sr;
spawn_time = st;
increase_rate = ir;
increase_time = it;
zombiesOn = zo;
}
function setW(n, s, w, e) {
wastelandN = n;
wastelandS = s;
wastelandW = w;
wastelandE = e;
}
}
Symbol 1556 MovieClip [__Packages.StatisticNugget] Frame 0
class StatisticNugget extends Object
{
var master, levelBeatArray, fuelsUsedArray, powersUsedArray, sandboxMapsArray, lData;
function StatisticNugget (sd) {
super();
master = sd;
levelBeatArray = new Array(8);
var _local3 = 0;
while (_local3 < levelBeatArray.length) {
levelBeatArray[_local3] = false;
_local3++;
}
fuelsUsedArray = new Array(4);
_local3 = 0;
while (_local3 < fuelsUsedArray.length) {
fuelsUsedArray[_local3] = false;
_local3++;
}
powersUsedArray = new Array(6);
_local3 = 0;
while (_local3 < powersUsedArray.length) {
powersUsedArray[_local3] = false;
_local3++;
}
sandboxMapsArray = new Array(8);
_local3 = 0;
while (_local3 < sandboxMapsArray.length) {
sandboxMapsArray[_local3] = false;
_local3++;
}
}
function setValue(str, n) {
if (this[str] != undefined) {
this[str] = n;
}
}
function setLData() {
lData = master.theDirector.lData;
}
function playSandboxLevel(i) {
kongregateSubmit("Sandbox_" + i, 1);
}
function beatLevel(i) {
levelBeatArray[i - 1] = true;
checkLevelsBeaten();
}
function useFuel(i) {
fuelsUsedArray[i - 1] = true;
checkFuelsUsed();
}
function usePower(i) {
powersUsedArray[i - 1] = true;
checkPowersUsed();
}
function checkPowersUsed() {
setLData();
fuelsUsed = 0;
powersUsed = 0;
var _local2 = 0;
while (_local2 < powersUsedArray.length) {
if (powersUsedArray[_local2] == true) {
powersUsed++;
}
_local2++;
}
if (lData.inCampaign == true) {
kongregateSubmit("PowerSourcesUsed", powersUsed);
}
}
function checkFuelsUsed() {
setLData();
fuelsUsed = 0;
var _local2 = 0;
while (_local2 < fuelsUsedArray.length) {
if (fuelsUsedArray[_local2] == true) {
fuelsUsed++;
}
_local2++;
}
if (lData.inCampaign == true) {
kongregateSubmit("FuelSourcesUsed", fuelsUsed);
}
}
function checkSandboxMaps() {
setLData();
sandboxMaps = 0;
var _local2 = 0;
while (_local2 < sandboxMapsArray.length) {
if (sandboxMapsArray[_local2] == true) {
sandboxMaps++;
}
_local2++;
}
kongregateSubmit("SandboxMapsPlayed", sandboxMaps);
}
function checkLevelsBeaten() {
setLData();
levelsBeaten = 0;
var _local2 = 0;
while (_local2 < levelBeatArray.length) {
if (levelBeatArray[_local2] == true) {
levelsBeaten++;
}
_local2++;
}
if (levelsBeaten == 8) {
if (lData.inCampaign == true) {
kongregateSubmit("LevelsCompleted", 8);
}
return(true);
}
if (lData.inCampaign == true) {
kongregateSubmit("LevelsCompleted", levelsBeaten);
}
return(false);
}
function addEnergyConsumed(e) {
energyConsumed_Campaign = energyConsumed_Campaign + e;
}
function addGarbage(garbageProduced_) {
garbageProduced_Campaign = garbageProduced_Campaign + garbageProduced_;
}
function addFossilFuelsConsumed(fossilFuelsConsumed_) {
fossilFuelsConsumed_Campaign = fossilFuelsConsumed_Campaign + fossilFuelsConsumed_;
}
function addMetalConsumed(metalConsumed_) {
metalConsumed_Campaign = metalConsumed_Campaign + metalConsumed_;
}
function addNaturalGasConsumed(naturalGasConsumed_) {
naturalGasConsumed_Campaign = naturalGasConsumed_Campaign + naturalGasConsumed_;
}
function addNuclearAccidents(nuclearAccidents_) {
nuclearAccidents_Campaign = nuclearAccidents_Campaign + nuclearAccidents_;
}
function addPollutionAccidents(pollutionAccidents_) {
pollutionAccidents_Campaign = pollutionAccidents_Campaign + pollutionAccidents_;
}
function addSmog(smogProduced_) {
smogProduced_Campaign = smogProduced_Campaign + smogProduced_;
}
function finalizeCampaignStats() {
if (checkLevelsBeaten()) {
kongregateSubmit("EnergyConsumed_Campaign", energyConsumed_Campaign);
kongregateSubmit("FossilFuelsConsumed_Campaign", fossilFuelsConsumed_Campaign);
kongregateSubmit("GarbageProduced_Campaign", garbageProduced_Campaign);
kongregateSubmit("MetalConsumed_Campaign", metalConsumed_Campaign);
kongregateSubmit("NaturalGasConsumed_Campaign", naturalGasConsumed_Campaign);
kongregateSubmit("NuclearAccidents_Campaign", nuclearAccidents_Campaign);
kongregateSubmit("PollutionAccidents_Campaign", pollutionAccidents_Campaign);
kongregateSubmit("SmogProduced_Campaign", smogProduced_Campaign);
kongregateSubmit("GameCompleted", 1);
}
}
function kongregateSubmit(str, n) {
_root.kongregateStats.submit(str, n);
}
var energyProduced_Level = 0;
var energyProduced_Day = 0;
var energyConsumed_Level = 0;
var energyConsumed_Day = 0;
var upgradesAchieved = 0;
var sandboxMapsPlayed = 0;
var fuelSourcesUsed = 0;
var powerSourcesUsed = 0;
var fossilFuelsConsumed_ = 0;
var fossilFuelsConsumed_Campaign = 0;
var naturalGasConsumed_ = 0;
var naturalGasConsumed_Campaign = 0;
var metalConsumed_ = 0;
var metalConsumed_Campaign = 0;
var smogProduced_ = 0;
var smogProduced_Campaign = 0;
var garbageProduced_ = 0;
var garbageProduced_Campaign = 0;
var energyConsumed_ = 0;
var energyConsumed_Campaign = 0;
var pollutionAccidents_ = 0;
var pollutionAccidents_Campaign = 0;
var nuclearAccidents_ = 0;
var nuclearAccidents_Campaign = 0;
var levelsBeaten = 0;
var fuelsUsed = 0;
var powersUsed = 0;
var sandboxMaps = 0;
}
Symbol 1557 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, sandO) {
if (sandO != undefined) {
this.getSandSettings(sandO);
}
this.setMaster(d);
this.setLevel(i);
};
_local2.getSandSettings = function (sandO) {
this.sandDayTime = sandO.time_day / K.CYCLETIME;
this.sandNightTime = sandO.time_night / K.CYCLETIME;
this.sandSpawnRate = sandO.spawn_rate;
this.sandSpawnTicks = sandO.spawn_time;
this.sandIncreaseRate = sandO.increase_rate;
this.sandIncreaseTicks = sandO.increase_time;
this.sandWasteland = new Array();
this.sandWasteland[0] = sandO.wastelandW;
this.sandWasteland[1] = sandO.wastelandE;
this.sandWasteland[2] = sandO.wastelandN;
this.sandWasteland[3] = sandO.wastelandS;
this.sandResources = new Array(sandO.e, sandO.f, sandO.s, sandO.r, sandO.m, sandO.g, sandO.ff);
this.zombiesOn = sandO.zombiesOn;
};
_local2.setInSandbox = function () {
this.inSandbox = true;
this.inCampaign = false;
this.master.playSandboxLevel(this.myIndex);
};
_local2.setInCampaign = function () {
this.inSandbox = false;
this.inCampaign = true;
};
_local2.setLevel = function (i) {
if ((i >= (-K.MAX_LEVEL)) && (i <= K.MAX_LEVEL)) {
this.myIndex = Math.abs(i);
this.otherIndex = 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.setInSandbox();
break;
case -2 :
this.levelSand2();
this.onWithTheShow();
this.setInSandbox();
break;
case -3 :
this.levelSand3();
this.onWithTheShow();
this.setInSandbox();
break;
case -4 :
this.levelSand4();
this.onWithTheShow();
this.setInSandbox();
break;
case -5 :
this.levelSand5();
this.onWithTheShow();
this.setInSandbox();
break;
case -6 :
this.levelSand6();
this.onWithTheShow();
this.setInSandbox();
break;
case -7 :
this.levelSand7();
this.onWithTheShow();
this.setInSandbox();
break;
case -8 :
this.levelSand8();
this.onWithTheShow();
this.setInSandbox();
break;
case -9 :
break;
case -10 :
break;
case 1 :
this.level1();
this.onWithTheShow();
this.setInCampaign();
break;
case 2 :
this.level2();
this.onWithTheShow();
this.setInCampaign();
break;
case 3 :
this.level3();
this.onWithTheShow();
this.setInCampaign();
break;
case 4 :
this.level4();
this.onWithTheShow();
this.setInCampaign();
break;
case 5 :
this.level5();
this.onWithTheShow();
this.setInCampaign();
break;
case 6 :
this.level6();
this.onWithTheShow();
this.setInCampaign();
break;
case 7 :
this.level7();
this.onWithTheShow();
this.setInCampaign();
break;
case 8 :
this.level8();
this.onWithTheShow();
this.setInCampaign();
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.makeReservoirs();
this.master.levelDataLoaded(K.TILES);
this.master.levelDataLoaded(K.PROPERTIES);
};
_local2.makeReservoirs = function () {
this.reservoirs = 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.OIL) {
var _local4 = new Reservoir();
_local4.setLoc(_local2, _local3);
this.reservoirs.push(_local4);
}
_local2++;
}
_local3++;
}
};
_local2.findReservoir = function (xx, yy) {
var _local2 = 0;
while (_local2 < this.reservoirs.length) {
if ((this.reservoirs[_local2].xLoc == xx) && (this.reservoirs[_local2].yLoc == yy)) {
return(this.reservoirs[_local2]);
}
_local2++;
}
};
_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, 45, 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";
};
} else {
// unexpected jump
}
_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] = "";
};
_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, 7.5];
this.disables = [];
this.missionTime = [10, 3, 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 = 6;
this.spawnTicks = 2;
this.increaseRate = 1;
this.increaseTicks = 2;
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 1";
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, 0, 4, 4, 0);
this.pArray[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 0, 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, 21, 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, 0, 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, 0, 0, 0, 0, 0, 0, 0, 4, 0);
this.pArray[14] = new Array(0, 0, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
// unexpected jump
// unexpected jump
_local2.levelSand2 = function () {
this.titleName = "Sandbox 2";
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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand3 = function () {
this.titleName = "Sandbox 3";
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, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0);
this.pArray[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1, 0, 0, 0, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand4 = function () {
this.titleName = "Sandbox 4";
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, 13, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 0, 4, 4, 9, 10, 9, 0, 21, 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, 0, 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, 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, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand5 = function () {
this.titleName = "Sandbox 5";
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, 0, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand6 = function () {
this.titleName = "Sandbox 6";
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[5] = new Array(0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[6] = new Array(0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(0, 2, 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, 2, 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, 21, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand7 = function () {
this.titleName = "Sandbox 7";
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, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
this.pArray[7] = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 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, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2);
this.pArray[9] = 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[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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_local2.levelSand8 = function () {
this.titleName = "Sandbox 8";
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, 13, 1, 21, 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 = this.sandResources;
this.disables = [];
this.missionTime = [this.sandDayTime, this.sandNightTime, true];
this.noMansLand = this.sandWasteland;
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!";
};
_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.otherIndex = 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.sandDayTime = 50;
_local2.sandNightTime = 50;
_local2.zombiesOn = true;
_local2.sandSpawnRate = 3;
_local2.sandSpawnTicks = 2;
_local2.sandIncreaseRate = 1;
_local2.sandIncreaseTicks = 2;
_local2.inCampaign = false;
_local2.inSandbox = false;
ASSetPropFlags(_global.LevelData.prototype, null, 1);
#endinitclip
Symbol 1558 MovieClip [__Packages.Reservoir] Frame 0
class Reservoir extends Object
{
var pumpRate, oilPumped, gasPumped, xLoc, yLoc;
function Reservoir () {
super();
pumpRate = 1;
oilPumped = 0;
gasPumped = 0;
}
function setLoc(xx, yy) {
xLoc = xx;
yLoc = yy;
}
function pumpOil(amt) {
amt = amt * pumpRate;
oilPumped = oilPumped + amt;
adjustPumpRate();
return(amt);
}
function pumpGas(amt) {
amt = amt * pumpRate;
gasPumped = gasPumped + amt;
adjustPumpRate();
return(amt);
}
function adjustPumpRate() {
var _local4 = oilPumped + gasPumped;
var _local3 = Math.floor(_local4 / chunkSize);
pumpRate = 1;
var _local2 = 0;
while (_local2 < _local3) {
pumpRate = pumpRate * 0.75;
_local2++;
}
}
var chunkSize = 75;
}
Symbol 1559 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, ei, eo) {
r_energy.setNet(e, ei, eo);
}
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");
};
electricGlow.onLoad = function () {
this.gotoAndStop("default");
};
ethanolGlow.onLoad = function () {
this.gotoAndStop("default");
};
natgasGlow.onLoad = function () {
this.gotoAndStop("default");
};
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");
};
}
function disableDemolish() {
demolishGlow.gotoAndStop("disable");
demolishGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableNatGas() {
natgasGlow.gotoAndStop("disable");
natgasGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableElectric() {
electricGlow.gotoAndStop("disable");
electricGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableEthanol() {
ethanolGlow.gotoAndStop("disable");
ethanolGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableGasoline() {
gasolineGlow.gotoAndStop("disable");
gasolineGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableFFPlant() {
FFPlantGlow.gotoAndStop("disable");
FFPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableGasPlant() {
gasPlantGlow.gotoAndStop("disable");
gasPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableWindPlant() {
windPlantGlow.gotoAndStop("disable");
windPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableSolarPlant() {
solarPlantGlow.gotoAndStop("disable");
solarPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableNuclearPlant() {
nuclearPlantGlow.gotoAndStop("disable");
nuclearPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableGeoPlant() {
geoPlantGlow.gotoAndStop("disable");
geoPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableGarbageTruck() {
garbageTruckGlow.gotoAndStop("disable");
garbageTruckGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableEngineer() {
engineerGlow.gotoAndStop("disable");
engineerGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableLandFill() {
landFillGlow.gotoAndStop("disable");
landFillGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableFactory() {
factoryGlow.gotoAndStop("disable");
factoryGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableDefenses() {
defenseGlow.gotoAndStop("disable");
defenseGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableOilGasWell() {
oilGasGlow.gotoAndStop("disable");
oilGasGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableNuclearDump() {
nuclearDumpGlow.gotoAndStop("disable");
nuclearDumpGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableLab() {
labGlow.gotoAndStop("disable");
labGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableMine() {
mineGlow.gotoAndStop("disable");
mineGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableTeslaCoil() {
teslaCoilGlow.gotoAndStop("disable");
teslaCoilGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableFloodLights() {
floodLightsGlow.gotoAndStop("disable");
floodLightsGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableGunTurret() {
gunTurretGlow.gotoAndStop("disable");
gunTurretGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableFlameTurret() {
flameTurretGlow.gotoAndStop("disable");
flameTurretGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disableFarm() {
farmGlow.gotoAndStop("disable");
farmGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
function disablePowerPlant() {
powerPlantGlow.gotoAndStop("disable");
powerPlantGlow.onLoad = function () {
this.gotoAndStop("disable");
};
}
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");
};
}
function showGlowyElectric() {
electricGlow.gotoAndPlay("glow");
electricGlow.onLoad = function () {
this.gotoAndPlay("glow");
};
}
function showGlowyEthanol() {
ethanolGlow.gotoAndPlay("glow");
ethanolGlow.onLoad = function () {
this.gotoAndPlay("glow");
};
}
function showGlowyGasoline() {
gasolineGlow.gotoAndPlay("glow");
gasolineGlow.onLoad = function () {
this.gotoAndPlay("glow");
};
}
function updateGameTime(g) {
if (g >= 0) {
gameTime = g;
timeString = String(gameTime);
} else {
gameTime = 999;
timeString = "---";
}
}
function goBackButton(str) {
if ((currMenu == lastMenu[lastMenu.length - 1]) || (str == "default")) {
currMenu = "default";
}
if (str == undefined) {
currMenu = String(lastMenu.pop());
} else {
currMenu = str;
}
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);
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.getE_Usage("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 doPressButton(str) {
goBackButton("default");
pressButton(str);
}
function doActionButton(str) {
actionButton(str);
}
function pressButton(str) {
if (currMenu != 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 1560 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);
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 1561 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 1562 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 303 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.127";
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 312 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 313 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 315 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 314 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 304 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.127";
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 441 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.127";
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 463 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.127";
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 1195 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.127";
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 1212 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.127";
var className = "RadioButtonGroup";
var indexNumber = 0;
}
Symbol 316 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 324 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 1563 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 1564 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 1565 MovieClip [__Packages.ProgressBar] Frame 0
class ProgressBar extends MovieClip
{
var gotoAndStop;
function ProgressBar () {
super();
}
function onLoad() {
}
function setAmount(a) {
num = a;
gotoAndStop(num);
amount = String(num + "%");
}
var amount = "100%";
var num = 100;
}
Symbol 1566 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 1567 MovieClip [__Packages.ResourceAmount] Frame 0
class ResourceAmount extends MovieClip
{
var _in, _out, net, netButton, myType, surplusDefecit, amount, _icon, hidden, gotoAndStop;
function ResourceAmount () {
super();
}
function onLoad() {
_in = 0;
_out = 0;
net = 0;
var back = this;
netButton.onRollOver = function () {
this._in = Math.round(back._in * 10) / 10;
this._out = Math.round(back._out * 10) / 10;
};
}
function boink() {
}
function setIn(i) {
_in = i;
}
function setOut(o) {
_out = o;
}
function setType(t) {
myType = t;
}
function setNet(n, i, o) {
net = n;
setIn(i);
setOut(o);
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");
} else if (amount < 100) {
gotoAndStop("2digits");
} else if (amount < 150) {
gotoAndStop("low");
} else if (amount < 350) {
gotoAndStop("medium");
} else {
gotoAndStop("high");
}
break;
case K.FOOD :
if (amount < 10) {
gotoAndStop("1digit");
} else if (amount < 25) {
gotoAndStop("2digits");
} else if (amount < 50) {
gotoAndStop("medium");
} else if (amount < 100) {
gotoAndStop("high");
} else {
gotoAndStop("3digits");
}
break;
case K.SMOG :
if (amount < 100) {
gotoAndStop("low");
} else if (amount < 500) {
gotoAndStop("medium");
} else {
gotoAndStop("high");
}
var _local2 = Math.floor(amount / 100) + 1;
var _local3 = "level" + _local2;
_icon.gotoAndStop(_local3);
break;
default :
gotoAndStop("default");
}
}
function hideMe() {
hidden = true;
gotoAndStop("hide");
}
function showMe() {
hidden = false;
setAmount(amount);
}
function error() {
if (myType != K.SMOG) {
_icon.gotoAndPlay("error");
}
}
}
Symbol 1568 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);
}
var amount = 100;
}
Symbol 1569 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 1570 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");
} else if (theAmount > 0) {
gotoAndStop("makes");
} else {
gotoAndStop("default");
}
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 1571 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, isSand) {
var _local2;
if (i < 0) {
i = Math.abs(i);
_local2 = "s" + i;
} else {
_local2 = "" + i;
}
bakeLevel.gotoAndStop(_local2);
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.otherIndex, master.lData.inSandbox);
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 1572 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);
}
function hideCursor() {
}
function onMouseMove() {
_x = master._xmouse;
_y = master._ymouse;
}
}
Symbol 1573 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) {
myMaster.react(lastKey, true);
} else if (!keyIsDown) {
myMaster.react(lastKey, false);
}
}
}
Symbol 1574 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 1575 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");
gotoAndStop(myString);
}
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);
} else {
gotoAndStop(myString + "_NO");
}
}
function onEnterFrame() {
enterFrameFunction();
}
var active = false;
var myString = "default";
var tileX = 0;
var tileY = 0;
}
Symbol 1576 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();
}
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 1577 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();
var _local2 = this;
}
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) {
isAlert = false;
}
doTick();
} else {
if (!notEnoughResource) {
isAlert = false;
}
showRepairAlert();
doTick();
}
} else {
showGarbageAlert();
}
} else {
showFoodAlert();
if (!tooMuchGarbage) {
if (needsRepair == false) {
if (!notEnoughResource) {
isAlert = false;
}
doTick();
} else {
if (!notEnoughResource) {
isAlert = false;
}
showRepairAlert();
doTick();
}
} 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");
}
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();
}
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 1578 MovieClip [__Packages.Garbage] Frame 0
class Garbage extends MovieClip
{
var outline, master, gotoAndStop, countDownID, xTile, yTile, myBuilding, myBuildingIndex, targetTruck, 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);
myMenu = "Rubble";
} else {
gotoAndStop(_local3);
}
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");
}
}
function deactivateMe(str) {
outline._visible = false;
onRelease = undefined;
gotoAndStop(str);
}
function targetForEating() {
amEatTargetted = true;
}
function targetForPickup(whom) {
if (targetTruck != undefined) {
targetTruck.setToIdle();
}
amTargetted = true;
targetTruck = whom;
}
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 1579 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");
} else {
gotoAndStop("left");
}
}
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 = 2000;
var vInFFPlant = 30000;
var tankSize = 25;
var waitForRefuel = false;
var doesSleep = false;
var asleep = false;
}
Symbol 1580 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 _local6 = 100000000 /* 0x5F5E100 */;
var _local7 = -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 < _local6) {
_local6 = _local5;
_local4 = _local4 + 25;
}
} else {
var _local5 = K.getDist(this, _local3[_local2]);
if (_local5 < _local6) {
if (_local5 < K.getDist(_local3[_local2], _local3[_local2].targetTruck)) {
_local6 = _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 > _local7) {
_local7 = _local4;
_local8 = _local3[_local2];
}
_local2++;
}
_local8.targetForPickup(this);
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 _local4 = garbageHaul - myGarbageAmt;
var _local3 = g.removeAmount(_local4);
g.unTarget();
myGarbageAmt = myGarbageAmt + _local3;
} 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 * (Unit.prototype.vInUnit / 1000);
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 1581 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();
}
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;
var doesSleep = false;
}
Symbol 1582 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 1583 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() {
tick();
}
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");
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");
} else {
gotoAndStop("left");
}
_icon.gotoAndStop("walk");
} else {
if (speedY > 0) {
gotoAndStop("down");
} else {
gotoAndStop("up");
}
_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();
master.nuclearAccident();
}
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] = undefined;
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");
master.makeGarbageUnit(Math.floor(xTile / 2) * 2, (Math.floor(yTile / 2) * 2) + 1, 5, 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 = 5;
var myLevel = 0;
var wasHereFirst = false;
var singeTime = 0;
var myXP = 0;
}
Symbol 1584 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 1585 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);
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 1586 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 1587 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 1588 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");
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 eatsFood = false;
var isPaused = false;
var energyDiscount = 0;
}
Symbol 1589 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");
} else if (amount < 10) {
gotoAndPlay("mediumGrow");
} else {
gotoAndPlay("bigGrow");
}
}
function timeToDie() {
master.onSmogLeave(this);
}
var size = 0.1;
}
Symbol 1590 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 1591 MovieClip [__Packages.Objective] Frame 0
class Objective extends MovieClip
{
var theText;
function Objective () {
super();
}
function onLoad() {
}
function setText(s) {
theText = s;
}
}
Symbol 1592 MovieClip [__Packages.Edderkopp] Frame 0
class Edderkopp extends Enemy
{
var hp, maxHp, setToIdle, garbageDist, wasteDist, bestDist, myTargetGarbage, myTargetWaste, myTargetBldg, master, giveHp, moveToLoc, _icon, _x, _y, attackFacing, gotoAndStop, singe, takeDamage, bldgDist, 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[0] != undefined) {
gotoBuilding(_local2[0]);
} else {
setToIdle();
K.error("edderkop", "tick", "can't find a bldg!");
}
}
function findAndEatGarbage() {
var _local2 = findSomeGarbage();
if (_local2[0] != undefined) {
gotoGarbage(_local2[0]);
} else {
findAndAttackBuilding();
}
}
function decideWhatToDo() {
var _local3 = findSomeGarbage();
var _local4 = findSomeNWaste();
var _local2 = findClosestBuilding();
if ((_local3[1] < _local4[1]) && (_local3[1] < _local2[1])) {
gotoGarbage(_local3[0]);
} else if ((_local4[1] < _local3[1]) && (_local4[1] < _local2[1])) {
gotoWaste(_local4[0]);
} else if ((_local2[1] < _local3[1]) && (_local2[1] < _local4[1])) {
gotoBuilding(_local2[0]);
}
}
function findAndEatNWaste() {
var _local2 = findSomeNWaste();
if (_local2[0] != undefined) {
gotoWaste(_local2[0]);
} else {
return(false);
}
return(true);
}
function clearDistances() {
garbageDist = 1000000 /* 0x0F4240 */;
wasteDist = 1000000 /* 0x0F4240 */;
buildingDist = 1000000 /* 0x0F4240 */;
bestDist = 1000000 /* 0x0F4240 */;
}
function tick() {
switch (myTask) {
case K.IDLE :
clearDistances();
decideWhatToDo();
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 _local4 = w.xTile;
var _local3 = w.yTile;
moveToLoc(_local4, _local3);
myTask = K.GETWASTE;
onTask = true;
_icon.gotoAndStop("walk");
}
function gotoGarbage(g) {
myTargetGarbage = g;
var _local4 = g.xTile;
var _local3 = g.yTile;
moveToLoc(_local4, _local3);
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);
} else {
gotoAndStop("right");
}
_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 _local6 = 100000000 /* 0x5F5E100 */;
var _local7 = -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 < _local6) {
_local6 = _local5;
_local3 = _local3 + 50;
_local3 = _local3 + _local4[_local2].amount;
}
if (_local4[_local2].atMax == true) {
_local3 = _local3 + 100;
}
if (_local3 > _local7) {
_local7 = _local3;
_local8 = _local4[_local2];
}
_local2++;
}
_local8.targetForEating();
wasteDist = _local6;
return(new Array(_local8, _local6));
}
function findSomeGarbage() {
var _local4 = master.gArray;
var _local8;
var _local6 = 100000000 /* 0x5F5E100 */;
var _local7 = -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 < _local6) {
_local6 = _local5;
_local3 = _local3 + 50;
_local3 = _local3 + _local4[_local2].amount;
}
if (_local4[_local2].atMax == true) {
_local3 = _local3 + 100;
}
if (_local3 > _local7) {
_local7 = _local3;
_local8 = _local4[_local2];
}
_local2++;
}
_local8.targetForEating();
garbageDist = _local6;
return(new Array(_local8, _local6));
}
function findClosestBuilding() {
var _local3 = master.bldgArray;
var _local6;
var _local5 = 100000000 /* 0x5F5E100 */;
var _local8 = 0;
var _local7 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local3.length) {
_local4 = K.getDist(this, _local3[_local2]);
if (_local4 < _local5) {
_local5 = _local4;
_local6 = _local3[_local2];
}
_local2++;
}
bldgDist = _local5;
return(new Array(_local6, _local5));
}
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 1593 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");
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 1594 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");
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 1595 MovieClip [__Packages.FloodLights] Frame 0
class FloodLights extends Building
{
var clickyThing, master, demolishMe, repairMe, notEnoughEnergy, useResource, showEnergyAlert, amSelected, outline, onSelected, gotoAndPlay, gotoAndStop, disabled, _x, _y;
function FloodLights () {
super();
}
function setMeUp() {
var _local2 = this;
}
function onRelease() {
var _local3;
var _local2;
_local3 = Math.abs(clickyThing._xmouse);
_local2 = Math.abs(clickyThing._ymouse);
if ((_local3 < 32) && (_local2 < 32)) {
normalClick();
} else {
master.bruteForceClick(this);
}
}
function normalClick() {
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 doTick() {
if (isOn) {
if (master.hasEnergy(energyIn)) {
notEnoughEnergy = false;
master.drainEnergy(energyIn);
useResource("energy");
} else {
showEnergyAlert();
turnOff();
}
}
}
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 makeLightsHappen() {
master.makeLight();
}
function turnOn() {
if (master.hasEnergy(energyIn)) {
isOn = true;
gotoAndPlay("bounce");
}
}
function turnOff() {
isOn = false;
gotoAndStop("default");
makeLightsHappen();
}
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 1596 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");
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 1597 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");
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 1598 MovieClip [__Packages.GeoPlant] Frame 0
class GeoPlant extends Building
{
var master, gotoAndPlay, makeResource;
function GeoPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
gotoAndPlay("bounce");
}
}
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 1599 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");
}
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 1600 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");
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 1601 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");
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 1602 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 1603 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");
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 1604 MovieClip [__Packages.OilGasWell] Frame 0
class OilGasWell extends Building
{
var reservoir, master, xTile, yTile, notEnoughEnergy, gotoAndPlay, useResource, tickGarbage, showEnergyAlert, amSelected, outline, garbageAmt, onSelected, makeResource, resource1, xTileUnit, yTileUnit, resource2;
function OilGasWell () {
super();
}
function setMeUp() {
findReservoir();
if (reservoir != undefined) {
gasOut = K.GAS_OUT_OILGASWELL * reservoir.pumpRate;
ffOut = K.FF_OUT_OILGASWELL * reservoir.pumpRate;
} else {
K.error("OilGasWell", "SetMeUp", "No Reservoir found!");
}
}
function findReservoir() {
reservoir = master.findReservoir(xTile, yTile);
}
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");
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");
ffOut = reservoir.pumpOil(K.FF_OUT_OILGASWELL);
master.makeFF(ffOut);
gasOrOil = 1;
} else {
makeResource("gas");
gasOut = reservoir.pumpGas(K.GAS_OUT_OILGASWELL);
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;
var doesSleep = false;
}
Symbol 1605 MovieClip [__Packages.SolarPlant] Frame 0
class SolarPlant extends Building
{
var master, gotoAndPlay, makeResource;
function SolarPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
gotoAndPlay("bounce");
}
}
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 1606 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 1607 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 1608 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");
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");
}
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 1609 MovieClip [__Packages.WindPlant] Frame 0
class WindPlant extends Building
{
var master, gotoAndPlay, makeResource;
function WindPlant () {
super();
}
function doTick() {
if (master.lessThanMaxEnergy()) {
gotoAndPlay("bounce");
}
}
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 1610 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);
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 1611 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);
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 1612 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);
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 1613 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 1614 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 1615 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 305 MovieClip [__Packages.it.sephiroth.tooltip] Frame 0
class it.sephiroth.tooltip extends mx.core.UIComponent
{
var tManager, _tf, boundingBox_mc, _visible, showID, hideID, getBounds, _height, _width, _parent, _x, _y, dispatchEvent, textBoxLabel, createLabel, clear, swapDepths, lineStyle, beginFill, drawRect, endFill, invalidate, _text, _html;
function tooltip () {
super();
tManager = new mx.transitions.TransitionManager(this);
tManager.addEventListener("allTransitionsInDone", this);
tManager.addEventListener("allTransitionsOutDone", this);
mx.events.EventDispatcher.initialize(this);
}
function init() {
super.init();
_tf = new TextFormat();
_tf.font = "Tahoma";
_tf.size = 11;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
displayed = false;
}
function show(time, followMouse) {
clearInterval(showID);
clearInterval(hideID);
_visible = false;
tManager.removeAllTransitions();
tManager.restoreContentAppearance();
if (((time == null) or (time == undefined)) or (time < 0)) {
time = 0;
}
if ((followMouse == null) or (followMouse == undefined)) {
followMouse = true;
}
showID = setInterval(_show, time, this, followMouse);
}
function hide(time) {
clearInterval(hideID);
clearInterval(showID);
if (displayed == false) {
return(undefined);
}
if (((time == null) or (time == undefined)) or (time < 0)) {
time = 0;
}
hideID = setInterval(_hide, time, this);
}
function _show(mc, followMouse) {
clearInterval(mc.showID);
mc.displayed = true;
if (followMouse == true) {
var _local2 = new Object();
_local2.x = mc._parent._xmouse;
_local2.y = mc._parent._ymouse;
mc._x = _local2.x - 10;
mc._y = (_local2.y - mc.textBoxLabel.height) - 5;
}
mc.invalidatePosition();
var _local3 = mc.tManager.startTransition({direction:0, duration:1, easing:mx.transitions.easing.None.easeNone, type:mx.transitions.Fade});
_local3.removeEventListener("transitionProgress", mc);
_local3.addEventListener("transitionProgress", mc);
}
function invalidatePosition() {
var _local4 = getBounds(_root);
var _local3 = new Object();
_local3.x = _local4.xMin;
_local3.y = _local4.yMin;
if (_local4.yMax > Stage.height) {
_local3.y = (Stage.height - _height) - 5;
} else if (_local4.yMin < 0) {
_local3.y = 5;
}
if (_local4.xMax > Stage.width) {
_local3.x = (Stage.width - _width) - 5;
} else if (_local4.xMin < 0) {
_local3.x = 0;
}
_parent.globalToLocal(_local3);
_x = _local3.x;
_y = _local3.y;
}
function _hide(mc) {
clearInterval(mc.hideID);
mc.tManager.removeAllTransitions();
mc.displayed = false;
var _local2 = mc.tManager.startTransition({direction:1, duration:0.5, easing:mx.transitions.easing.None.easeNone, type:mx.transitions.Fade});
_local2.removeEventListener("transitionProgress", mc);
_local2.addEventListener("transitionProgress", mc);
}
function transitionProgress(event) {
}
function allTransitionsInDone(evt) {
displayed = true;
var _local2 = new Object();
_local2.type = "allTransitionsInDone";
_local2.target = this;
dispatchEvent(_local2);
}
function allTransitionsOutDone(evt) {
_visible = false;
displayed = false;
var _local2 = new Object();
_local2.type = "allTransitionsOutDone";
_local2.target = this;
dispatchEvent(_local2);
}
function createChildren() {
textBoxLabel = createLabel("textBoxLabel", 1);
textBoxLabel.selectable = false;
textBoxLabel.multiline = true;
textBoxLabel.autoSize = true;
}
function draw() {
clear();
if (html == true) {
textBoxLabel.html = true;
textBoxLabel.htmlText = text;
} else {
textBoxLabel.html = false;
textBoxLabel.text = text;
}
textBoxLabel.setTextFormat(_tf);
swapDepths(_parent.getNextHighestDepth());
textBoxLabel.setSize(textBoxLabel.textWidth + 5, textBoxLabel.textHeight + 3);
var _local3 = textBoxLabel.width;
var _local2 = textBoxLabel.height;
lineStyle(0.1, borderColor, 100);
beginFill(backgroundColor);
drawRect(0, 0, _local3 + 4, _local2 + 2);
endFill();
var _local5 = _xshadow;
var _local4 = _yshadow;
lineStyle(0, 0, 0);
beginFill(0, 60);
drawRect(_local3 + 4, _local4 + 2, _local3 + 5, _local2 + 3);
drawRect(_local5 + 2, _local2 + 2, _local3 + 4, _local2 + 3);
endFill();
beginFill(0, 30);
drawRect(_local3 + 4, _local4 + 1, _local3 + 6, _local4 + 2);
drawRect(_local5 + 1, _local2 + 2, _local5 + 2, _local2 + 4);
drawRect(_local3 + 5, _local4 + 2, _local3 + 6, _local2 + 3);
drawRect(_local5 + 2, _local2 + 3, _local3 + 6, _local2 + 4);
beginFill(0, 15);
drawRect(_local3 + 4, _local4, _local3 + 7, _local4 + 1);
drawRect(_local5, _local2 + 2, _local5 + 1, _local2 + 5);
drawRect(_local3 + 6, _local4 + 1, _local3 + 7, _local2 + 4);
drawRect(_local5 + 1, _local2 + 4, _local3 + 7, _local2 + 5);
endFill();
textBoxLabel.move(1, 1);
_visible = false;
}
function size() {
invalidate();
}
function toString() {
return("[ToolTip]");
}
function set text(testo) {
_text = testo;
invalidate();
//return(text);
}
function get text() {
return(_text);
}
function set backgroundColor(bgColor) {
_backgroundColor = bgColor;
invalidate();
//return(backgroundColor);
}
function get backgroundColor() {
return(_backgroundColor);
}
function set borderColor(col) {
_borderColor = col;
invalidate();
//return(borderColor);
}
function get borderColor() {
return(_borderColor);
}
function setTextFormat(tf) {
_tf = tf;
invalidate();
}
function getTextFormat() {
return(_tf);
}
function set html(useHtml) {
if (typeof(useHtml) == "string") {
_html = useHtml.toLowerCase() == "true";
} else {
_html = useHtml;
}
invalidate();
//return(html);
}
function get html() {
return(_html);
}
function set _xshadow(num) {
__xshadow = num;
invalidate();
//return(_xshadow);
}
function get _xshadow() {
return(__xshadow);
}
function set _yshadow(num) {
__yshadow = num;
invalidate();
//return(_yshadow);
}
function get _yshadow() {
return(__yshadow);
}
static var symbolName = "tooltip";
static var symbolOwner = it.sephiroth.tooltip;
var depth = 0;
var _backgroundColor = 16777164;
var _borderColor = 0;
var __xshadow = 3;
var __yshadow = 4;
var displayed = false;
var className = "tooltip";
}
Symbol 317 MovieClip [__Packages.mx.transitions.TransitionManager] Frame 0
class mx.transitions.TransitionManager
{
var _transitions, removeEventListener, _content, addEventListener, _contentAppearance, _innerBounds, _outerBounds, _width, _height, _triggerEvent, dispatchEvent;
function TransitionManager (content) {
this.content = (content);
_transitions = {};
}
function set content(c) {
removeEventListener("allTransitionsInDone", _content);
removeEventListener("allTransitionsOutDone", _content);
_content = c;
saveContentAppearance();
addEventListener("allTransitionsInDone", _content);
addEventListener("allTransitionsOutDone", _content);
//return(content);
}
function get content() {
return(_content);
}
function get transitions() {
return(_transitions);
}
function get numTransitions() {
var _local2 = 0;
for (var _local3 in _transitions) {
_local2++;
}
return(_local2);
}
function get numInTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (!_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get numOutTransitions() {
var _local3 = 0;
var _local2 = _transitions;
for (var _local4 in _local2) {
if (_local2[_local4].direction) {
_local3++;
}
}
return(_local3);
}
function get contentAppearance() {
return(_contentAppearance);
}
static function start(content, transParams) {
if (content.__transitionManager == undefined) {
content.__transitionManager = new mx.transitions.TransitionManager(content);
}
if (transParams.direction == 1) {
content.__transitionManager._triggerEvent = "hide";
} else {
content.__transitionManager._triggerEvent = "reveal";
}
return(content.__transitionManager.startTransition(transParams));
}
function startTransition(transParams) {
removeTransition(findTransition(transParams));
var _local3 = transParams.type;
var _local2 = new _local3[undefined](_content, transParams, this);
addTransition(_local2);
_local2.start();
return(_local2);
}
function addTransition(trans) {
trans.ID = ++IDCount;
_transitions[trans.ID] = trans;
return(trans);
}
function removeTransition(trans) {
if (_transitions[trans.ID] == undefined) {
return(false);
}
trans.cleanUp();
return(delete _transitions[trans.ID]);
}
function findTransition(transParams) {
var _local2;
for (var _local4 in _transitions) {
_local2 = _transitions[_local4];
if (_local2.type == transParams.type) {
return(_local2);
}
}
return(undefined);
}
function removeAllTransitions() {
for (var _local2 in _transitions) {
_transitions[_local2].cleanUp();
removeTransition(_transitions[_local2]);
}
}
function saveContentAppearance() {
var _local2 = _content;
if (_contentAppearance == undefined) {
var _local3 = (_contentAppearance = {});
for (var _local4 in _visualPropList) {
_local3[_local4] = _local2[_local4];
}
_local3.colorTransform = new Color(_local2).getTransform();
}
_innerBounds = _local2.getBounds(targetPath(_local2));
_outerBounds = _local2.getBounds(targetPath(_local2._parent));
_width = _local2._width;
_height = _local2._height;
}
function restoreContentAppearance() {
var _local2 = _content;
var _local3 = _contentAppearance;
for (var _local4 in _visualPropList) {
_local2[_local4] = _local3[_local4];
}
new Color(_local2).setTransform(_local3.colorTransform);
}
function transitionInDone(e) {
removeTransition(e.target);
if (numInTransitions == 0) {
var _local2;
_local2 = _content._visible;
if ((_triggerEvent == "hide") || (_triggerEvent == "hideChild")) {
_content._visible = false;
}
if (_local2) {
dispatchEvent({type:"allTransitionsInDone", target:this});
}
}
}
function transitionOutDone(e) {
removeTransition(e.target);
if (numOutTransitions == 0) {
restoreContentAppearance();
var _local2;
_local2 = _content._visible;
if (_local2 && ((_triggerEvent == "hide") || (_triggerEvent == "hideChild"))) {
_content._visible = false;
}
updateAfterEvent();
if (_local2) {
dispatchEvent({type:"allTransitionsOutDone", target:this});
}
}
}
function toString() {
return("[TransitionManager]");
}
static var IDCount = 0;
var type = mx.transitions.TransitionManager;
var className = "TransitionManager";
var _visualPropList = {_x:null, _y:null, _xscale:null, _yscale:null, _alpha:null, _rotation:null};
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.TransitionManager.prototype);
}
Symbol 318 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
}
Symbol 319 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
}
Symbol 320 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 321 MovieClip [__Packages.mx.transitions.Transition] Frame 0
class mx.transitions.Transition
{
var _manager, removeEventListener, addEventListener, _content, _twn, _easing, _progress, dispatchEvent, _innerBounds, _outerBounds, _width, _height;
function Transition (content, transParams, manager) {
if (!arguments.length) {
return;
}
init(content, transParams, manager);
}
function set manager(mgr) {
if (_manager != undefined) {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
}
_manager = mgr;
addEventListener("transitionInDone", _manager);
addEventListener("transitionOutDone", _manager);
addEventListener("transitionProgress", _manager);
//return(manager);
}
function get manager() {
return(_manager);
}
function set content(c) {
if (typeof(c) == "movieclip") {
_content = c;
_twn.obj = c;
}
//return(content);
}
function get content() {
return(_content);
}
function set direction(direction) {
_direction = (direction ? 1 : 0);
//return(this.direction);
}
function get direction() {
return(_direction);
}
function set duration(d) {
if (d) {
_duration = d;
_twn.duration = d;
}
//return(duration);
}
function get duration() {
return(_duration);
}
function set easing(e) {
if (typeof(e) == "string") {
e = eval (e);
} else if (e == undefined) {
e = _noEase;
}
_easing = e;
_twn.easing = e;
//return(easing);
}
function get easing() {
return(_easing);
}
function set progress(p) {
if (_progress == p) {
return;
}
_progress = p;
if (_direction) {
_render(1 - p);
} else {
_render(p);
}
dispatchEvent({type:"transitionProgress", target:this, progress:p});
//return(progress);
}
function get progress() {
return(_progress);
}
function init(content, transParams, manager) {
this.content = (content);
direction = (transParams.direction);
duration = (transParams.duration);
easing = (transParams.easing);
this.manager = (manager);
_innerBounds = this.manager._innerBounds;
_outerBounds = this.manager._outerBounds;
_width = this.manager._width;
_height = this.manager._height;
_resetTween();
}
function toString() {
return(("[Transition " + className) + "]");
}
function start() {
content._visible = true;
_twn.start();
}
function stop() {
_twn.fforward();
_twn.stop();
}
function cleanUp() {
removeEventListener("transitionInDone", _manager);
removeEventListener("transitionOutDone", _manager);
removeEventListener("transitionProgress", _manager);
stop();
}
function getNextHighestDepthMC(mc) {
var _local4 = mc.getNextHighestDepth();
if (_local4 != undefined) {
return(_local4);
}
_local4 = -1;
var _local3;
var _local1;
for (var _local5 in mc) {
_local1 = mc[_local5];
if ((typeof(_local1) == "movieclip") && (_local1._parent == mc)) {
_local3 = _local1.getDepth();
if (_local3 > _local4) {
_local4 = _local3;
}
}
}
return(_local4 + 1);
}
function drawBox(mc, x, y, w, h) {
mc.moveTo(x, y);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function _render(p) {
}
function _resetTween() {
_twn.stop();
_twn.removeListener(this);
_twn = new mx.transitions.Tween(this, null, easing, 0, 1, duration, true);
_twn.stop();
_twn.prop = "progress";
_twn.addListener(this);
}
function _noEase(t, b, c, d) {
return(((c * t) / d) + b);
}
function onMotionFinished(src) {
if (direction) {
dispatchEvent({type:"transitionOutDone", target:this});
} else {
dispatchEvent({type:"transitionInDone", target:this});
}
}
var type = mx.transitions.Transition;
var className = "Transition";
var _direction = 0;
var _duration = 2;
static var __mixinFED = mx.events.EventDispatcher.initialize(mx.transitions.Transition.prototype);
}
Symbol 322 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 323 MovieClip [__Packages.mx.transitions.Fade] Frame 0
class mx.transitions.Fade extends mx.transitions.Transition
{
var _alphaFinal, manager, _content;
function Fade (content, transParams, manager) {
super();
init(content, transParams, manager);
}
function init(content, transParams, manager) {
super.init(content, transParams, manager);
_alphaFinal = this.manager.contentAppearance._alpha;
}
function _render(p) {
_content._alpha = _alphaFinal * p;
}
var type = mx.transitions.Fade;
var className = "Fade";
}
Symbol 325 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 326 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 327 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 328 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 329 MovieClip [__Packages.mx.controls.ComboBase] Frame 0
class mx.controls.ComboBase extends mx.core.UIComponent
{
var getValue, tabEnabled, tabChildren, boundingBox_mc, downArrow_mc, createClassObject, onDownArrow, border_mc, __border, text_mc, focusTextField, __width, __height, getFocusManager, __get__height, height, _parent;
function ComboBase () {
super();
getValue = _getValue;
}
function init() {
super.init();
tabEnabled = !_editable;
tabChildren = _editable;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren() {
var _local3 = new Object();
_local3.styleName = this;
if (downArrow_mc == undefined) {
_local3.falseUpSkin = downArrowUpName;
_local3.falseOverSkin = downArrowOverName;
_local3.falseDownSkin = downArrowDownName;
_local3.falseDisabledSkin = downArrowDisabledName;
_local3.validateNow = true;
_local3.tabEnabled = false;
createClassObject(mx.controls.SimpleButton, "downArrow_mc", 19, _local3);
downArrow_mc.buttonDownHandler = onDownArrow;
downArrow_mc.useHandCursor = false;
downArrow_mc.onPressWas = downArrow_mc.onPress;
downArrow_mc.onPress = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = true;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onPressWas();
};
downArrow_mc.onDragOutWas = downArrow_mc.onDragOut;
downArrow_mc.onDragOut = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = false;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOutWas();
};
downArrow_mc.onDragOverWas = downArrow_mc.onDragOver;
downArrow_mc.onDragOver = function () {
this.trackAsMenu = this.trackAsMenuWas;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOverWas();
};
}
if (border_mc == undefined) {
_local3.tabEnabled = false;
createClassObject(_global.styles.rectBorderClass, "border_mc", 17, _local3);
border_mc.move(0, 0);
__border = border_mc;
}
_local3.borderStyle = "none";
_local3.readOnly = !_editable;
_local3.tabEnabled = _editable;
if (text_mc == undefined) {
createClassObject(mx.controls.TextInput, "text_mc", 18, _local3);
text_mc.move(0, 0);
text_mc.addEnterEvents();
text_mc.enterHandler = _enterHandler;
text_mc.changeHandler = _changeHandler;
text_mc.oldOnSetFocus = text_mc.onSetFocus;
text_mc.onSetFocus = function () {
this.oldOnSetFocus();
this._parent.onSetFocus();
};
text_mc.__set__restrict("^\x1B");
text_mc.oldOnKillFocus = text_mc.onKillFocus;
text_mc.onKillFocus = function (n) {
this.oldOnKillFocus(n);
this._parent.onKillFocus(n);
};
text_mc.drawFocus = function (b) {
this._parent.drawFocus(b);
};
delete text_mc.borderStyle;
}
focusTextField = text_mc;
text_mc.owner = this;
layoutChildren(__width, __height);
}
function onKillFocus() {
super.onKillFocus();
Key.removeListener(text_mc);
getFocusManager().defaultPushButtonEnabled = true;
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
Key.addListener(text_mc);
}
function setFocus() {
if (_editable) {
Selection.setFocus(text_mc);
} else {
Selection.setFocus(this);
}
}
function setSize(w, h, noEvent) {
super.setSize(w, ((h == undefined) ? (__get__height()) : (h)), noEvent);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
downArrow_mc.enabled = enabledFlag;
text_mc.enabled = enabledFlag;
}
function setEditable(e) {
_editable = e;
if (wrapDownArrowButton == false) {
if (e) {
border_mc.borderStyle = "inset";
text_mc.borderStyle = "inset";
symbolName = "ComboBox";
invalidateStyle();
} else {
border_mc.borderStyle = "comboNonEdit";
text_mc.borderStyle = "dropDown";
symbolName = "DropDown";
invalidateStyle();
}
}
tabEnabled = !e;
tabChildren = e;
text_mc.tabEnabled = e;
if (e) {
delete text_mc.onPress;
delete text_mc.onRelease;
delete text_mc.onReleaseOutside;
delete text_mc.onDragOut;
delete text_mc.onDragOver;
delete text_mc.onRollOver;
delete text_mc.onRollOut;
} else {
text_mc.onPress = function () {
this._parent.downArrow_mc.onPress();
};
text_mc.onRelease = function () {
this._parent.downArrow_mc.onRelease();
};
text_mc.onReleaseOutside = function () {
this._parent.downArrow_mc.onReleaseOutside();
};
text_mc.onDragOut = function () {
this._parent.downArrow_mc.onDragOut();
};
text_mc.onDragOver = function () {
this._parent.downArrow_mc.onDragOver();
};
text_mc.onRollOver = function () {
this._parent.downArrow_mc.onRollOver();
};
text_mc.onRollOut = function () {
this._parent.downArrow_mc.onRollOut();
};
text_mc.useHandCursor = false;
}
}
function get editable() {
return(_editable);
}
function set editable(e) {
setEditable(e);
//return(editable);
}
function _getValue() {
return((_editable ? (text_mc.getText()) : (DSgetValue())));
}
function draw() {
downArrow_mc.draw();
border_mc.draw();
}
function size() {
layoutChildren(__width, __height);
}
function setTheme(t) {
downArrowUpName = (t + "downArrow") + "Up_mc";
downArrowDownName = (t + "downArrow") + "Down_mc";
downArrowDisabledName = (t + "downArrow") + "Disabled_mc";
}
function get text() {
return(text_mc.getText());
}
function set text(t) {
setText(t);
//return(text);
}
function setText(t) {
text_mc.setText(t);
}
function get textField() {
return(text_mc);
}
function get restrict() {
return(text_mc.__get__restrict());
}
function set restrict(w) {
text_mc.__set__restrict(w);
//return(restrict);
}
function invalidateStyle() {
downArrow_mc.invalidateStyle();
text_mc.invalidateStyle();
border_mc.invalidateStyle();
}
function layoutChildren(w, h) {
if (downArrow_mc == undefined) {
return(undefined);
}
if (wrapDownArrowButton) {
var _local2 = border_mc.__get__borderMetrics();
downArrow_mc._width = (downArrow_mc._height = (h - _local2.top) - _local2.bottom);
downArrow_mc.move((w - downArrow_mc._width) - _local2.right, _local2.top);
border_mc.setSize(w, h);
text_mc.setSize(w - downArrow_mc._width, h);
} else {
downArrow_mc.move(w - downArrow_mc._width, 0);
border_mc.setSize(w - downArrow_mc.width, h);
text_mc.setSize(w - downArrow_mc._width, h);
downArrow_mc._height = height;
}
}
function _changeHandler(obj) {
}
function _enterHandler(obj) {
var _local2 = _parent;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function get tabIndex() {
return(text_mc.__get__tabIndex());
}
function set tabIndex(w) {
text_mc.__set__tabIndex(w);
//return(tabIndex);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.ComboBase);
static var symbolName = "ComboBase";
static var symbolOwner = mx.controls.ComboBase;
static var version = "2.0.2.126";
var _editable = false;
var downArrowUpName = "ScrollDownArrowUp";
var downArrowDownName = "ScrollDownArrowDown";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDisabledName = "ScrollDownArrowDisabled";
var wrapDownArrowButton = true;
var DSgetValue = mx.controls.listclasses.DataSelector.prototype.getValue;
var multipleSelection = false;
}
Symbol 330 MovieClip [__Packages.mx.controls.ComboBox] Frame 0
class mx.controls.ComboBox extends mx.controls.ComboBase
{
var __set__editable, editable, __labels, data, __dropdownWidth, __width, _editable, selectedIndex, __dropdown, dataProvider, __labelFunction, createObject, border_mc, mask, text_mc, dispatchValueChangedEvent, getValue, length, selectedItem, _y, isPressed, owner, __set__visible, height, localToGlobal, __selectedIndexOnDropdown, __initialSelectedIndexOnDropdown, __get__height, getStyle, _parent, width, __dataProvider, selected, dispatchEvent;
function ComboBox () {
super();
}
function init() {
super.init();
}
function createChildren() {
super.createChildren();
__set__editable(editable);
if (__labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
dropdownWidth = (((typeof(__dropdownWidth) == "number") ? (__dropdownWidth) : (__width)));
if (!_editable) {
selectedIndex = 0;
}
initializing = false;
}
function onKillFocus(n) {
if (_showingDropdown && (n != null)) {
displayDropdown(false);
}
super.onKillFocus();
}
function getDropdown() {
if (initializing) {
return(undefined);
}
if (!hasDropdown()) {
var _local3 = new Object();
_local3.styleName = this;
if (dropdownBorderStyle != undefined) {
_local3.borderStyle = dropdownBorderStyle;
}
_local3._visible = false;
__dropdown = mx.managers.PopUpManager.createPopUp(this, mx.controls.List, false, _local3, true);
__dropdown.scroller.mask.removeMovieClip();
if (dataProvider == undefined) {
dataProvider = new Array();
}
__dropdown.setDataProvider(dataProvider);
__dropdown.selectMultiple = false;
__dropdown.rowCount = __rowCount;
__dropdown.selectedIndex = selectedIndex;
__dropdown.vScrollPolicy = "auto";
__dropdown.labelField = __labelField;
__dropdown.labelFunction = __labelFunction;
__dropdown.owner = this;
__dropdown.changeHandler = _changeHandler;
__dropdown.scrollHandler = _scrollHandler;
__dropdown.itemRollOverHandler = _itemRollOverHandler;
__dropdown.itemRollOutHandler = _itemRollOutHandler;
__dropdown.resizeHandler = _resizeHandler;
__dropdown.mouseDownOutsideHandler = function (eventObj) {
var _local3 = this.owner;
var _local4 = new Object();
_local4.x = _local3._root._xmouse;
_local4.y = _local3._root._ymouse;
_local3._root.localToGlobal(_local4);
if (_local3.hitTest(_local4.x, _local4.y, false)) {
} else if ((!this.wrapDownArrowButton) && (this.owner.downArrow_mc.hitTest(_root._xmouse, _root._ymouse, false))) {
} else {
_local3.displayDropdown(false);
}
};
__dropdown.onTweenUpdate = function (v) {
this._y = v;
};
__dropdown.setSize(__dropdownWidth, __dropdown.height);
createObject("BoundingBox", "mask", 20);
mask._y = border_mc.height;
mask._width = __dropdownWidth;
mask._height = __dropdown.height;
mask._visible = false;
__dropdown.setMask(mask);
}
return(__dropdown);
}
function setSize(w, h, noEvent) {
super.setSize(w, h, noEvent);
__dropdownWidth = w;
__dropdown.rowHeight = h;
__dropdown.setSize(__dropdownWidth, __dropdown.height);
}
function setEditable(e) {
super.setEditable(e);
if (e) {
text_mc.setText("");
} else {
text_mc.setText(selectedLabel);
}
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function getLabelField() {
return(__labelField);
}
function get labelField() {
return(getLabelField());
}
function setLabelField(s) {
__dropdown.labelField = (__labelField = s);
text_mc.setText(selectedLabel);
}
function set labelField(s) {
setLabelField(s);
//return(labelField);
}
function getLabelFunction() {
return(__labelFunction);
}
function get labelFunction() {
return(getLabelFunction());
}
function set labelFunction(f) {
__dropdown.labelFunction = (__labelFunction = f);
text_mc.setText(selectedLabel);
//return(labelFunction);
}
function setSelectedItem(v) {
super.setSelectedItem(v);
__dropdown.selectedItem = v;
text_mc.setText(selectedLabel);
}
function setSelectedIndex(v) {
super.setSelectedIndex(v);
__dropdown.selectedIndex = v;
if (v != undefined) {
text_mc.setText(selectedLabel);
}
dispatchValueChangedEvent(getValue());
}
function setRowCount(count) {
if (isNaN(count)) {
return(undefined);
}
__rowCount = count;
__dropdown.setRowCount(count);
}
function get rowCount() {
return(Math.max(1, Math.min(length, __rowCount)));
}
function set rowCount(v) {
setRowCount(v);
//return(rowCount);
}
function setDropdownWidth(w) {
__dropdownWidth = w;
__dropdown.setSize(w, __dropdown.height);
}
function get dropdownWidth() {
return(__dropdownWidth);
}
function set dropdownWidth(v) {
setDropdownWidth(v);
//return(dropdownWidth);
}
function get dropdown() {
return(getDropdown());
}
function setDataProvider(dp) {
super.setDataProvider(dp);
__dropdown.setDataProvider(dp);
if (!_editable) {
selectedIndex = 0;
}
}
function open() {
displayDropdown(true);
}
function close() {
displayDropdown(false);
}
function get selectedLabel() {
var _local2 = selectedItem;
if (_local2 == undefined) {
return("");
}
if (labelFunction != undefined) {
return(labelFunction(_local2));
}
if (typeof(_local2) != "object") {
return(_local2);
}
if (_local2[labelField] != undefined) {
return(_local2[labelField]);
}
if (_local2.label != undefined) {
return(_local2.label);
}
var _local3 = " ";
for (var _local4 in _local2) {
if (_local4 != "__ID__") {
_local3 = (_local2[_local4] + ", ") + _local3;
}
}
_local3 = _local3.substring(0, _local3.length - 3);
return(_local3);
}
function hasDropdown() {
return((__dropdown != undefined) && (__dropdown.valueOf() != undefined));
}
function tweenEndShow(value) {
_y = value;
isPressed = true;
owner.dispatchEvent({type:"open", target:owner});
}
function tweenEndHide(value) {
_y = value;
__set__visible(false);
owner.dispatchEvent({type:"close", target:owner});
}
function displayDropdown(show) {
if (show == _showingDropdown) {
return(undefined);
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = height;
localToGlobal(_local3);
if (show) {
__selectedIndexOnDropdown = selectedIndex;
__initialSelectedIndexOnDropdown = selectedIndex;
getDropdown();
var _local2 = __dropdown;
_local2.isPressed = true;
_local2.rowCount = rowCount;
_local2.visible = show;
_local2._parent.globalToLocal(_local3);
_local2.onTweenEnd = tweenEndShow;
var _local5;
var _local8;
if ((_local3.y + _local2.height) > Stage.height) {
_local5 = _local3.y - __get__height();
_local8 = _local5 - _local2.height;
mask._y = -_local2.height;
} else {
_local5 = _local3.y - _local2.height;
_local8 = _local3.y;
mask._y = border_mc.height;
}
var _local6 = _local2.selectedIndex;
if (_local6 == undefined) {
_local6 = 0;
}
var _local4 = _local2.vPosition;
_local4 = _local6 - 1;
_local4 = Math.min(Math.max(_local4, 0), _local2.length - _local2.rowCount);
_local2.vPosition = _local4;
_local2.move(_local3.x, _local5);
_local2.tween = new mx.effects.Tween(__dropdown, _local5, _local8, getStyle("openDuration"));
} else {
__dropdown._parent.globalToLocal(_local3);
delete __dropdown.dragScrolling;
__dropdown.onTweenEnd = tweenEndHide;
__dropdown.tween = new mx.effects.Tween(__dropdown, __dropdown._y, _local3.y - __dropdown.height, getStyle("openDuration"));
if (__initialSelectedIndexOnDropdown != selectedIndex) {
dispatchChangeEvent(undefined, __initialSelectedIndexOnDropdown, selectedIndex);
}
}
var _local9 = getStyle("openEasing");
if (_local9 != undefined) {
__dropdown.tween.easingEquation = _local9;
}
_showingDropdown = show;
}
function onDownArrow() {
_parent.displayDropdown(!_parent._showingDropdown);
}
function keyDown(e) {
if (e.ctrlKey && (e.code == 40)) {
displayDropdown(true);
} else if (e.ctrlKey && (e.code == 38)) {
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
} else if (e.code == 27) {
displayDropdown(false);
} else if (e.code == 13) {
if (_showingDropdown) {
selectedIndex = __dropdown.selectedIndex;
displayDropdown(false);
}
} else if (((((!_editable) || (e.code == 38)) || (e.code == 40)) || (e.code == 33)) || (e.code == 34)) {
selectedIndex = 0 + selectedIndex;
bInKeyDown = true;
var _local3 = dropdown;
_local3.keyDown(e);
bInKeyDown = false;
selectedIndex = __dropdown.selectedIndex;
}
}
function invalidateStyle(styleProp) {
__dropdown.invalidateStyle(styleProp);
super.invalidateStyle(styleProp);
}
function changeTextStyleInChildren(styleProp) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeTextStyleInChildren(styleProp);
super.changeTextStyleInChildren(styleProp);
}
function changeColorStyleInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeColorStyleInChildren(sheetName, styleProp, newValue);
super.changeColorStyleInChildren(sheetName, styleProp, newValue);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
function onUnload() {
__dropdown.removeMovieClip();
}
function _resizeHandler() {
var _local2 = owner;
_local2.mask._width = width;
_local2.mask._height = height;
}
function _changeHandler(obj) {
var _local2 = owner;
var _local3 = _local2.selectedIndex;
obj.target = _local2;
if (this == owner.text_mc) {
_local2.selectedIndex = undefined;
_local2.dispatchChangeEvent(obj, -1, -2);
} else {
_local2.selectedIndex = selectedIndex;
if (!_local2._showingDropdown) {
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
} else if (!_local2.bInKeyDown) {
_local2.displayDropdown(false);
}
}
}
function _scrollHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOverHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOutHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
if (0 == __dataProvider.length) {
text_mc.setText("");
delete selected;
} else if ((__dataProvider.length == ((eventObj.lastItem - eventObj.firstItem) + 1)) && (eventObj.eventName == "addItems")) {
selectedIndex = 0;
}
}
function dispatchChangeEvent(obj, prevValue, newValue) {
var _local2;
if (prevValue != newValue) {
if ((obj != undefined) && (obj.type == "change")) {
_local2 = obj;
} else {
_local2 = {type:"change"};
}
dispatchEvent(_local2);
}
}
static var symbolName = "ComboBox";
static var symbolOwner = mx.controls.ComboBox;
static var version = "2.0.2.126";
var clipParameters = {labels:1, data:1, editable:1, rowCount:1, dropdownWidth:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ComboBox.prototype.clipParameters, mx.controls.ComboBase.prototype.clipParameters);
var className = "ComboBox";
var _showingDropdown = false;
var __rowCount = 5;
var dropdownBorderStyle = undefined;
var initializing = true;
var __labelField = "label";
var bInKeyDown = false;
}
Symbol 438 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 439 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 440 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 442 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 443 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 444 MovieClip [__Packages.mx.managers.PopUpManager] Frame 0
class mx.managers.PopUpManager
{
var popUp, setSize, move, modalWindow, _parent, _name, _visible, owner;
function PopUpManager () {
}
static function createModalWindow(parent, o, broadcastOutsideEvents) {
var _local2 = parent.createChildAtDepth("Modal", mx.managers.DepthManager.kTopmost);
_local2.setDepthBelow(o);
o.modalID = _local2._name;
_local2._alpha = _global.style.modalTransparency;
_local2.tabEnabled = false;
if (broadcastOutsideEvents) {
_local2.onPress = mixins.onPress;
} else {
_local2.onPress = mixins.nullFunction;
}
_local2.onRelease = mixins.nullFunction;
_local2.resize = mixins.resize;
mx.managers.SystemManager.init();
mx.managers.SystemManager.addEventListener("resize", _local2);
_local2.resize();
_local2.useHandCursor = false;
_local2.popUp = o;
o.modalWindow = _local2;
o.deletePopUp = mixins.deletePopUp;
o.setVisible = mixins.setVisible;
o.getVisible = mixins.getVisible;
o.addProperty("visible", o.getVisible, o.setVisible);
}
static function createPopUp(parent, className, modal, initobj, broadcastOutsideEvents) {
if (mixins == undefined) {
mixins = new mx.managers.PopUpManager();
}
if (broadcastOutsideEvents == undefined) {
broadcastOutsideEvents = false;
}
var _local5 = parent._root;
if (_local5 == undefined) {
_local5 = _root;
}
while (parent != _local5) {
parent = parent._parent;
}
initobj.popUp = true;
var _local4 = parent.createClassChildAtDepth(className, ((broadcastOutsideEvents || (modal)) ? (mx.managers.DepthManager.kTopmost) : (mx.managers.DepthManager.kTop)), initobj);
var _local2 = _root;
var _local6 = _local2.focusManager != undefined;
while (_local2._parent != undefined) {
_local2 = _local2._parent._root;
if (_local2.focusManager != undefined) {
_local6 = true;
break;
}
}
if (_local6) {
_local4.createObject("FocusManager", "focusManager", -1);
if (_local4._visible == false) {
mx.managers.SystemManager.deactivate(_local4);
}
}
if (modal) {
createModalWindow(parent, _local4, broadcastOutsideEvents);
} else {
if (broadcastOutsideEvents) {
_local4.mouseListener = new Object();
_local4.mouseListener.owner = _local4;
_local4.mouseListener.onMouseDown = mixins.onMouseDown;
Mouse.addListener(_local4.mouseListener);
}
_local4.deletePopUp = mixins.deletePopUp;
}
return(_local4);
}
function onPress(Void) {
var _local3 = popUp._root;
if (_local3 == undefined) {
_local3 = _root;
}
if (popUp.hitTest(_local3._xmouse, _local3._ymouse, false)) {
return(undefined);
}
popUp.dispatchEvent({type:"mouseDownOutside"});
}
function nullFunction(Void) {
}
function resize(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
setSize(_local2.width, _local2.height);
move(_local2.x, _local2.y);
}
function deletePopUp(Void) {
if (modalWindow != undefined) {
_parent.destroyObject(modalWindow._name);
}
_parent.destroyObject(_name);
}
function setVisible(v, noEvent) {
super.setVisible(v, noEvent);
modalWindow._visible = v;
}
function getVisible(Void) {
return(_visible);
}
function onMouseDown(Void) {
var _local3 = owner._root;
if (_local3 == undefined) {
_local3 = _root;
}
var _local4 = new Object();
_local4.x = _local3._xmouse;
_local4.y = _local3._ymouse;
_local3.localToGlobal(_local4);
if (owner.hitTest(_local4.x, _local4.y, false)) {
} else {
owner.mouseDownOutsideHandler(owner);
}
}
static var version = "2.0.2.126";
static var mixins = undefined;
}
Symbol 445 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.126";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 446 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 447 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.126";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 448 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 449 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 450 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.126";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 451 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 452 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 453 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.126";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 454 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 455 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 456 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 457 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 458 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 459 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 460 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 461 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 462 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 464 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 465 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 479 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 1177 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 478 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 483 MovieClip [CheckThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 494 MovieClip [CheckBoxAssets] Frame 1
#initclip 158
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 495 MovieClip [CheckBox] Frame 1
#initclip 159
Object.registerClass("CheckBox", mx.controls.CheckBox);
#endinitclip
stop();
Instance of Symbol 361 MovieClip [Button] in Symbol 495 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 519 MovieClip [mc_arrow] Frame 1
#initclip 226
Object.registerClass("mc_arrow", ArrowCursor);
#endinitclip
stop();
Symbol 519 MovieClip [mc_arrow] Frame 2
stop();
Symbol 519 MovieClip [mc_arrow] Frame 3
stop();
Symbol 519 MovieClip [mc_arrow] Frame 4
stop();
Symbol 519 MovieClip [mc_arrow] Frame 5
stop();
Symbol 519 MovieClip [mc_arrow] Frame 6
stop();
Symbol 519 MovieClip [mc_arrow] Frame 7
stop();
Symbol 519 MovieClip [mc_arrow] Frame 8
stop();
Symbol 519 MovieClip [mc_arrow] Frame 9
stop();
Symbol 519 MovieClip [mc_arrow] Frame 10
stop();
Symbol 519 MovieClip [mc_arrow] Frame 11
stop();
Symbol 519 MovieClip [mc_arrow] Frame 12
stop();
Symbol 519 MovieClip [mc_arrow] Frame 15
stop();
Symbol 519 MovieClip [mc_arrow] Frame 16
stop();
Symbol 519 MovieClip [mc_arrow] Frame 17
stop();
Symbol 519 MovieClip [mc_arrow] Frame 18
stop();
Symbol 519 MovieClip [mc_arrow] Frame 19
stop();
Symbol 519 MovieClip [mc_arrow] Frame 20
stop();
Symbol 519 MovieClip [mc_arrow] Frame 21
stop();
Symbol 519 MovieClip [mc_arrow] Frame 22
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 61
stop();
_parent.nowItsNight();
Symbol 521 MovieClip Frame 121
stop();
_parent.nowItsDay();
Symbol 524 MovieClip Frame 1
stop();
Symbol 527 MovieClip [mc_director] Frame 1
#initclip 163
Object.registerClass("mc_director", Director);
#endinitclip
Symbol 538 Button
on (release) {
master.gotoMenu();
}
Symbol 541 Button
on (release) {
master.gotoHelp();
}
Symbol 552 Button
on (release) {
pressButton("bFarm");
}
on (rollOver) {
showBldgButton("Farm");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 560 Button
on (release) {
pressButton("b_PowerPlant");
}
on (rollOver) {
showBldgButton("_PowerPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 569 Button
on (release) {
pressButton("bMine");
}
on (rollOver) {
showBldgButton("Mine");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 577 MovieClip Frame 1
stop();
Symbol 577 MovieClip Frame 2
stop();
Symbol 582 Button
on (release) {
pressButton("bOilGasWell");
}
on (rollOver) {
showBldgButton("OilGasWell");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 599 MovieClip Frame 1
stop();
Symbol 602 Button
on (release) {
pressButton("bFactory");
}
on (rollOver) {
showBldgButton("Factory");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 609 Button
on (release) {
pressButton("bLab");
}
on (rollOver) {
showBldgButton("Lab");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 617 Button
on (release) {
pressButton("b_Defense");
}
on (rollOver) {
showBldgButton("Defense");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 622 Button
on (release) {
_parent.actionButton("demolish");
}
Symbol 623 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 2
stop();
Symbol 628 Button
on (release) {
pressButton("bLandfill");
}
on (rollOver) {
showBldgButton("Landfill");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 634 Button
on (release) {
pressButton("bNuclearDump");
}
on (rollOver) {
showBldgButton("NuclearDump");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 639 Button
on (release) {
_parent.globalRepair();
}
Symbol 641 MovieClip Frame 2
stop();
Symbol 641 MovieClip Frame 12
stop();
Symbol 641 MovieClip Frame 22
stop();
Symbol 641 MovieClip Frame 32
stop();
Symbol 641 MovieClip Frame 33
stop();
Symbol 644 MovieClip Frame 1
stop();
Symbol 644 MovieClip Frame 15
stop();
Symbol 644 MovieClip Frame 29
stop();
Symbol 644 MovieClip Frame 43
stop();
Symbol 644 MovieClip Frame 44
stop();
Symbol 644 MovieClip Frame 45
stop();
Symbol 645 MovieClip Frame 1
stop();
Symbol 645 MovieClip Frame 11
stop();
Symbol 645 MovieClip Frame 21
stop();
Symbol 645 MovieClip Frame 31
stop();
Symbol 645 MovieClip Frame 32
stop();
Symbol 647 MovieClip Frame 2
stop();
Symbol 647 MovieClip Frame 13
stop();
Symbol 647 MovieClip Frame 23
stop();
Symbol 647 MovieClip Frame 34
stop();
Symbol 647 MovieClip Frame 35
stop();
Symbol 657 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 2
stop();
Symbol 657 MovieClip Frame 3
stop();
Symbol 657 MovieClip Frame 4
stop();
Symbol 657 MovieClip Frame 5
stop();
Symbol 657 MovieClip Frame 6
stop();
Symbol 657 MovieClip Frame 7
stop();
Symbol 657 MovieClip Frame 8
stop();
Symbol 657 MovieClip Frame 9
stop();
Symbol 657 MovieClip Frame 10
stop();
Symbol 657 MovieClip Frame 11
stop();
Symbol 657 MovieClip Frame 12
stop();
Symbol 662 MovieClip [mc_cost] Frame 1
#initclip 164
Object.registerClass("mc_cost", CostDisplay);
#endinitclip
Instance of Symbol 657 MovieClip "resource2" in Symbol 662 MovieClip [mc_cost] Frame 1
onClipEvent (load) {
this.gotoAndStop("metal");
}
Symbol 753 MovieClip Frame 1
stop();
Symbol 828 MovieClip [mc_fly] Frame 1
#initclip 165
Object.registerClass("mc_fly", Fly);
#endinitclip
Symbol 834 MovieClip [mc_garbage] Frame 1
#initclip 166
Object.registerClass("mc_garbage", Garbage);
#endinitclip
stop();
Symbol 834 MovieClip [mc_garbage] Frame 2
stop();
Symbol 834 MovieClip [mc_garbage] Frame 3
stop();
Symbol 834 MovieClip [mc_garbage] Frame 4
stop();
Symbol 834 MovieClip [mc_garbage] Frame 5
stop();
Symbol 834 MovieClip [mc_garbage] Frame 6
stop();
Symbol 834 MovieClip [mc_garbage] Frame 7
stop();
Symbol 834 MovieClip [mc_garbage] Frame 8
stop();
Symbol 841 MovieClip Frame 1
stop();
Symbol 841 MovieClip Frame 2
stop();
Symbol 841 MovieClip Frame 3
stop();
Symbol 841 MovieClip Frame 4
stop();
Symbol 841 MovieClip Frame 5
stop();
Symbol 841 MovieClip Frame 6
stop();
Symbol 841 MovieClip Frame 7
stop();
Symbol 841 MovieClip Frame 8
stop();
Symbol 841 MovieClip Frame 9
stop();
Symbol 841 MovieClip Frame 10
stop();
Symbol 841 MovieClip Frame 11
stop();
Symbol 841 MovieClip Frame 12
stop();
Symbol 841 MovieClip Frame 13
stop();
Symbol 841 MovieClip Frame 14
stop();
Symbol 841 MovieClip Frame 15
stop();
Symbol 841 MovieClip Frame 16
stop();
Symbol 841 MovieClip Frame 17
stop();
Symbol 841 MovieClip Frame 18
stop();
Instance of Symbol 563 MovieClip "g" in Symbol 841 MovieClip Frame 18
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 19
stop();
Instance of Symbol 579 MovieClip "g" in Symbol 841 MovieClip Frame 19
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 20
stop();
Symbol 841 MovieClip Frame 21
stop();
Symbol 841 MovieClip Frame 22
stop();
Symbol 841 MovieClip Frame 23
stop();
Symbol 841 MovieClip Frame 24
stop();
Symbol 841 MovieClip Frame 25
stop();
Symbol 841 MovieClip Frame 26
stop();
Symbol 841 MovieClip Frame 27
stop();
Symbol 841 MovieClip Frame 28
stop();
Symbol 841 MovieClip Frame 29
stop();
Symbol 841 MovieClip Frame 30
stop();
Symbol 841 MovieClip Frame 31
stop();
Symbol 841 MovieClip Frame 32
stop();
Symbol 841 MovieClip Frame 33
stop();
Symbol 841 MovieClip Frame 34
stop();
Symbol 841 MovieClip Frame 35
stop();
Symbol 841 MovieClip Frame 36
stop();
Symbol 841 MovieClip Frame 37
stop();
Symbol 841 MovieClip Frame 38
stop();
Symbol 841 MovieClip Frame 39
stop();
Symbol 841 MovieClip Frame 40
stop();
Symbol 841 MovieClip Frame 41
stop();
Symbol 841 MovieClip Frame 42
stop();
Symbol 841 MovieClip Frame 43
stop();
Symbol 841 MovieClip Frame 44
stop();
Symbol 841 MovieClip Frame 45
stop();
Symbol 841 MovieClip Frame 46
stop();
Symbol 841 MovieClip Frame 47
stop();
Symbol 841 MovieClip Frame 48
stop();
Symbol 841 MovieClip Frame 49
stop();
Symbol 841 MovieClip Frame 50
stop();
Symbol 841 MovieClip Frame 51
stop();
Symbol 841 MovieClip Frame 52
stop();
Symbol 841 MovieClip Frame 53
stop();
Symbol 841 MovieClip Frame 54
stop();
Symbol 841 MovieClip Frame 55
stop();
Symbol 841 MovieClip Frame 56
stop();
Symbol 841 MovieClip Frame 57
stop();
Symbol 841 MovieClip Frame 58
stop();
Symbol 841 MovieClip Frame 59
stop();
Symbol 841 MovieClip Frame 60
stop();
Symbol 841 MovieClip Frame 61
stop();
Symbol 841 MovieClip Frame 62
stop();
Symbol 841 MovieClip Frame 63
stop();
Symbol 841 MovieClip Frame 64
stop();
Symbol 841 MovieClip Frame 65
stop();
Symbol 841 MovieClip Frame 66
stop();
Symbol 841 MovieClip Frame 67
stop();
Symbol 841 MovieClip Frame 68
stop();
Symbol 841 MovieClip Frame 69
stop();
Symbol 841 MovieClip Frame 70
stop();
Symbol 841 MovieClip Frame 71
stop();
Symbol 841 MovieClip Frame 72
stop();
Symbol 841 MovieClip Frame 73
stop();
g.deactivateMe("lots");
Symbol 841 MovieClip Frame 74
stop();
g.deactivateMe("some");
Instance of Symbol 834 MovieClip [mc_garbage] "g" in Symbol 841 MovieClip Frame 74
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("some");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 75
stop();
g.deactivateMe("little");
Instance of Symbol 834 MovieClip [mc_garbage] "g" in Symbol 841 MovieClip Frame 75
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 76
stop();
Instance of Symbol 563 MovieClip "g" in Symbol 841 MovieClip Frame 76
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 77
stop();
Instance of Symbol 579 MovieClip "g" in Symbol 841 MovieClip Frame 77
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("little");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 78
stop();
Instance of Symbol 656 MovieClip "g" in Symbol 841 MovieClip Frame 78
onClipEvent (load) {
function __f_load(eventObj) {
deactivateMe("rubble");
}
this.addEventListener("load", __f_load);
}
Symbol 841 MovieClip Frame 79
stop();
Symbol 841 MovieClip Frame 80
stop();
Symbol 841 MovieClip Frame 81
stop();
Symbol 841 MovieClip Frame 82
stop();
Symbol 841 MovieClip Frame 83
stop();
Symbol 841 MovieClip Frame 84
stop();
Symbol 841 MovieClip Frame 85
stop();
Symbol 841 MovieClip Frame 86
stop();
Symbol 841 MovieClip Frame 87
stop();
Symbol 841 MovieClip Frame 88
stop();
Symbol 841 MovieClip Frame 89
stop();
Symbol 841 MovieClip Frame 90
stop();
Symbol 841 MovieClip Frame 91
stop();
Symbol 841 MovieClip Frame 92
stop();
Symbol 841 MovieClip Frame 93
stop();
Symbol 841 MovieClip Frame 94
stop();
Symbol 842 Button
on (release) {
_parent.master.showCurrObjective();
}
Symbol 844 MovieClip [mc_objective] Frame 1
#initclip 167
Object.registerClass("mc_objective", Objective);
#endinitclip
Symbol 849 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 227
stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 852 MovieClip Frame 28
gotoAndStop ("default");
Symbol 852 MovieClip Frame 29
stop();
Symbol 852 MovieClip Frame 30
stop();
Symbol 852 MovieClip Frame 31
stop();
Symbol 860 Button
on (release) {
goBackButton("default");
}
Symbol 862 Button
on (release) {
buildButton("scout");
}
Symbol 864 Button
on (release) {
buildButton("humVee");
}
Symbol 866 Button
on (release) {
buildButton("engineer");
}
Symbol 868 Button
on (release) {
buildButton("tank");
}
Symbol 871 Button
on (release) {
pressButton("uFuel");
}
Symbol 872 Button
on (release) {
pressButton("uPowerPlants");
}
Symbol 873 Button
on (release) {
pressButton("uDefense");
}
Symbol 877 Button
on (release) {
pressButton("uRecycling");
}
Symbol 878 Button
on (release) {
pressButton("uBuildings");
}
Symbol 879 Button
on (release) {
pressButton("uUnits");
}
Symbol 885 Button
on (release) {
pressButton("uFFPlant");
}
on (rollOver) {
showBldgButton("FFPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 889 Button
on (release) {
pressButton("uGasPlant");
}
Symbol 897 Button
on (release) {
pressButton("uWindPlant");
}
Symbol 900 Button
on (release) {
pressButton("uSolarPlant");
}
Symbol 904 Button
on (release) {
pressButton("uGeoPlant");
}
Symbol 907 Button
on (release) {
pressButton("uNuclearPlant");
}
Symbol 910 Button
on (release) {
goBackButton();
}
Symbol 911 Button
on (release) {
upgradeButton("fuel", "gasoline", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "gasoline", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 914 MovieClip Frame 1
stop();
Symbol 914 MovieClip Frame 2
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 1
#initclip 168
Object.registerClass("mc_levelStatus", LevelStatus);
#endinitclip
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 2
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 3
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 4
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 5
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 6
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 7
stop();
Symbol 916 MovieClip [mc_levelStatus] Frame 8
stop();
Symbol 917 Button
on (release) {
upgradeButton("fuel", "electric", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "electric", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 918 Button
on (release) {
upgradeButton("fuel", "ethanol", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "ethanol", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 920 Button
on (release) {
upgradeButton("fuel", "natGas", K.UNIT);
}
on (rollOver) {
showUpgradeButton("fuel", "natGas", K.UNIT);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 921 Button
on (release) {
goBackButton("iFFPlant");
}
Symbol 925 Button
on (release) {
upgradeButton("ffplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("ffplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 926 Button
on (release) {
goBackButton("iGasPlant");
}
Symbol 928 Button
on (release) {
upgradeButton("gasplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("gasplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 929 Button
on (release) {
goBackButton("iHydroPlant");
}
Symbol 931 Button
on (release) {
upgradeButton("hydroplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("hydroplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 932 Button
on (release) {
goBackButton("iWindPlant");
}
Symbol 934 Button
on (release) {
upgradeButton("windplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("windplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 935 Button
on (release) {
goBackButton("iGeoPlant");
}
Symbol 937 Button
on (release) {
upgradeButton("geoplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("geoplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 938 Button
on (release) {
goBackButton("iSolarPlant");
}
Symbol 940 Button
on (release) {
upgradeButton("solarplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("solarplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 941 Button
on (release) {
goBackButton("iNuclearPlant");
}
Symbol 943 Button
on (release) {
upgradeButton("nuclearplant", "Both", K.BUILDING);
}
on (rollOver) {
showUpgradeButton("nuclearplant", "Both", K.BUILDING);
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 949 Button
on (release) {
pressButton("uFloodLights");
}
Symbol 953 Button
on (release) {
pressButton("uGunTurret");
}
Symbol 957 Button
on (release) {
pressButton("uLaserTurret");
}
Symbol 960 Button
on (release) {
pressButton("uFlameTurret");
}
Symbol 978 Button
on (release) {
pressButton("rPETE");
}
Symbol 980 Button
on (release) {
pressButton("rMetal");
}
Symbol 982 Button
on (release) {
pressButton("rGas");
}
Symbol 984 Button
on (release) {
pressButton("rBiodiesel");
}
Symbol 993 Button
on (release) {
pressButton("bFFPlant");
}
on (rollOver) {
showBldgButton("FFPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 994 Button
on (release) {
pressButton("bGasPlant");
}
on (rollOver) {
showBldgButton("GasPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 995 Button
on (release) {
pressButton("bWindPlant");
}
on (rollOver) {
showBldgButton("WindPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 996 Button
on (release) {
pressButton("bSolarPlant");
}
on (rollOver) {
showBldgButton("SolarPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 997 Button
on (release) {
pressButton("bGeoPlant");
}
on (rollOver) {
showBldgButton("GeoPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 998 Button
on (release) {
pressButton("bNuclearPlant");
}
on (rollOver) {
showBldgButton("NuclearPlant");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 999 Button
on (release) {
pressButton("bFloodLights");
}
on (rollOver) {
showBldgButton("FloodLights");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 1000 Button
on (release) {
pressButton("bGunTurret");
}
on (rollOver) {
showBldgButton("GunTurret");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 1001 Button
on (release) {
pressButton("bTeslaCoil");
}
on (rollOver) {
showBldgButton("TeslaCoil");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 1002 Button
on (release) {
pressButton("bFlameTurret");
}
on (rollOver) {
showBldgButton("FlameTurret");
}
on (rollOut) {
hideBldgButton();
}
on (releaseOutside) {
hideBldgButton();
}
Symbol 1017 MovieClip Frame 1
stop();
Symbol 1017 MovieClip Frame 2
stop();
Symbol 1017 MovieClip Frame 3
stop();
Symbol 1017 MovieClip Frame 4
stop();
Symbol 1017 MovieClip Frame 5
stop();
Symbol 1017 MovieClip Frame 6
stop();
Symbol 1017 MovieClip Frame 7
stop();
Symbol 1017 MovieClip Frame 8
stop();
Symbol 1017 MovieClip Frame 9
stop();
Symbol 1017 MovieClip Frame 10
stop();
Symbol 1023 MovieClip [mc_usageLine] Frame 1
#initclip 169
Object.registerClass("mc_usageLine", UsageLine);
#endinitclip
stop();
Symbol 1023 MovieClip [mc_usageLine] Frame 2
stop();
Symbol 1023 MovieClip [mc_usageLine] Frame 3
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 1
#initclip 170
Object.registerClass("mc_usage_key", UsageMeter);
#endinitclip
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 2
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 3
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 4
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 5
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 6
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 7
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 8
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 9
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 10
stop();
Symbol 1025 MovieClip [mc_usage_key] Frame 11
stop();
Symbol 1033 Button
on (release) {
directorUnClickBuildings();
}
Symbol 1039 MovieClip [mc_hpbar] Frame 1
#initclip 171
Object.registerClass("mc_hpbar", HpBar);
#endinitclip
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1061 MovieClip Frame 2
stop();
Symbol 1061 MovieClip Frame 3
stop();
Symbol 1061 MovieClip Frame 4
stop();
Symbol 1061 MovieClip Frame 5
stop();
Symbol 1061 MovieClip Frame 6
stop();
Symbol 1061 MovieClip Frame 7
stop();
Symbol 1063 Button
on (release) {
pressButton("uFFPlant");
}
Symbol 1072 MovieClip [mc_disabletoggle] Frame 1
#initclip 172
Object.registerClass("mc_disabletoggle", ToggleButton);
#endinitclip
stop();
Symbol 1072 MovieClip [mc_disabletoggle] Frame 2
stop();
Symbol 1074 Button
on (release) {
repairSelected();
}
Symbol 1077 Button
on (release) {
pressButton("uNuclearPlant");
}
Symbol 1078 Button
on (release) {
pressButton("uWindPlant");
}
Symbol 1079 Button
on (release) {
pressButton("uSolarPlant");
}
Symbol 1080 Button
on (release) {
pressButton("uGeoPlant");
}
Symbol 1081 Button
on (release) {
pressButton("uGasPlant");
}
Symbol 1101 Button
on (release) {
buildButton("garbageTruck");
}
on (rollOver) {
showUnitButton("garbageTruck");
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 1103 Button
on (release) {
buildButton("engineer");
}
on (rollOver) {
showUnitButton("engineer");
}
on (rollOut) {
hideUnitButton();
}
on (releaseOutside) {
hideUnitButton();
}
Symbol 1104 Button
on (release) {
pressButton("uFactory");
}
Symbol 1108 MovieClip Frame 6
stop();
Symbol 1119 MovieClip Frame 6
stop();
Symbol 1127 Button
on (release) {
_parent.onCancelBuild();
}
Symbol 1133 MovieClip [mc_unitProduction] Frame 1
#initclip 173
Object.registerClass("mc_unitProduction", UnitProduction);
#endinitclip
stop();
Symbol 1133 MovieClip [mc_unitProduction] Frame 2
stop();
Symbol 1133 MovieClip [mc_unitProduction] Frame 3
stop();
Symbol 1133 MovieClip [mc_unitProduction] Frame 4
stop();
Symbol 1145 Button
on (release) {
setFleetFuel(K.GASOLINE, "gasoline");
}
Symbol 1146 Button
on (release) {
setFleetFuel(K.ETHANOL, "ethanol");
}
Symbol 1147 Button
on (release) {
setFleetFuel(K.ELECTRIC, "electric");
}
Symbol 1148 Button
on (release) {
setFleetFuel(K.NATGAS, "natgas");
}
Symbol 1151 MovieClip [mc_interface] Frame 1
#initclip 174
Object.registerClass("mc_interface", Interface);
#endinitclip
resourceText = "";
pollutionText = "";
nutrientText = "";
materialText = "";
stop();
Instance of Symbol 63 MovieClip "sideRegion" in Symbol 1151 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 63 MovieClip "topRegion" in Symbol 1151 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 63 MovieClip "bottomRegion" in Symbol 1151 MovieClip [mc_interface] Frame 1
on (release) {
_parent.onClickRegion();
}
Instance of Symbol 662 MovieClip [mc_cost] "theCost" in Symbol 1151 MovieClip [mc_interface] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1151 MovieClip [mc_interface] Frame 2
stop();
Symbol 1151 MovieClip [mc_interface] Frame 3
stop();
Symbol 1151 MovieClip [mc_interface] Frame 4
stop();
Instance of Symbol 662 MovieClip [mc_cost] "theCost" in Symbol 1151 MovieClip [mc_interface] Frame 4
onClipEvent (load) {
_visible = false;
}
Symbol 1151 MovieClip [mc_interface] Frame 5
stop();
Symbol 1151 MovieClip [mc_interface] Frame 6
stop();
Symbol 1151 MovieClip [mc_interface] Frame 7
stop();
Symbol 1151 MovieClip [mc_interface] Frame 8
stop();
Symbol 1151 MovieClip [mc_interface] Frame 9
stop();
Symbol 1151 MovieClip [mc_interface] Frame 10
stop();
Symbol 1151 MovieClip [mc_interface] Frame 11
stop();
Symbol 1151 MovieClip [mc_interface] Frame 12
stop();
Symbol 1151 MovieClip [mc_interface] Frame 13
stop();
Symbol 1151 MovieClip [mc_interface] Frame 14
stop();
Symbol 1151 MovieClip [mc_interface] Frame 15
stop();
Symbol 1151 MovieClip [mc_interface] Frame 16
stop();
Symbol 1151 MovieClip [mc_interface] Frame 17
stop();
Symbol 1151 MovieClip [mc_interface] Frame 18
stop();
Symbol 1151 MovieClip [mc_interface] Frame 19
stop();
Symbol 1151 MovieClip [mc_interface] Frame 20
stop();
Symbol 1151 MovieClip [mc_interface] Frame 21
stop();
Symbol 1151 MovieClip [mc_interface] Frame 22
stop();
Symbol 1151 MovieClip [mc_interface] Frame 23
resourceText = "";
pollutionText = "";
nutrientText = "";
materialText = "";
stop();
Symbol 1151 MovieClip [mc_interface] Frame 24
stop();
Symbol 1151 MovieClip [mc_interface] Frame 25
stop();
Symbol 1151 MovieClip [mc_interface] Frame 26
stop();
Symbol 1151 MovieClip [mc_interface] Frame 27
stop();
Symbol 1151 MovieClip [mc_interface] Frame 28
stop();
Symbol 1151 MovieClip [mc_interface] Frame 29
stop();
Symbol 1151 MovieClip [mc_interface] Frame 30
stop();
Symbol 1151 MovieClip [mc_interface] Frame 31
stop();
Symbol 1151 MovieClip [mc_interface] Frame 32
stop();
Symbol 1151 MovieClip [mc_interface] Frame 33
stop();
Symbol 1151 MovieClip [mc_interface] Frame 34
stop();
Symbol 1151 MovieClip [mc_interface] Frame 35
stop();
Symbol 1151 MovieClip [mc_interface] Frame 36
stop();
Symbol 1151 MovieClip [mc_interface] Frame 37
stop();
Symbol 1151 MovieClip [mc_interface] Frame 38
stop();
Symbol 1151 MovieClip [mc_interface] Frame 39
stop();
Symbol 1151 MovieClip [mc_interface] Frame 40
stop();
Symbol 1151 MovieClip [mc_interface] Frame 41
stop();
Symbol 1151 MovieClip [mc_interface] Frame 42
stop();
Symbol 1151 MovieClip [mc_interface] Frame 43
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 43
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 44
stop();
Symbol 1151 MovieClip [mc_interface] Frame 45
stop();
Symbol 1151 MovieClip [mc_interface] Frame 46
stop();
Symbol 1151 MovieClip [mc_interface] Frame 47
stop();
Symbol 1151 MovieClip [mc_interface] Frame 48
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 48
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 49
stop();
Symbol 1151 MovieClip [mc_interface] Frame 50
stop();
Symbol 1151 MovieClip [mc_interface] Frame 51
stop();
Symbol 1151 MovieClip [mc_interface] Frame 52
stop();
Symbol 1151 MovieClip [mc_interface] Frame 53
stop();
Symbol 1151 MovieClip [mc_interface] Frame 54
stop();
Symbol 1151 MovieClip [mc_interface] Frame 55
stop();
Symbol 1151 MovieClip [mc_interface] Frame 56
stop();
Symbol 1151 MovieClip [mc_interface] Frame 57
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 57
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 58
stop();
Symbol 1151 MovieClip [mc_interface] Frame 59
stop();
Symbol 1151 MovieClip [mc_interface] Frame 60
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 60
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 61
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 61
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 62
stop();
Symbol 1151 MovieClip [mc_interface] Frame 63
stop();
Symbol 1151 MovieClip [mc_interface] Frame 64
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 64
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 65
stop();
Symbol 1151 MovieClip [mc_interface] Frame 66
stop();
Symbol 1151 MovieClip [mc_interface] Frame 67
stop();
Instance of Symbol 1072 MovieClip [mc_disabletoggle] "disableButt" in Symbol 1151 MovieClip [mc_interface] Frame 67
onClipEvent (load) {
setButton();
this.myFunction = function () {
_parent._parent.disableToggleBuilding();
};
}
Symbol 1151 MovieClip [mc_interface] Frame 68
stop();
Symbol 1151 MovieClip [mc_interface] Frame 69
stop();
Symbol 1151 MovieClip [mc_interface] Frame 70
stop();
Symbol 1151 MovieClip [mc_interface] Frame 71
stop();
Symbol 1151 MovieClip [mc_interface] Frame 72
stop();
Symbol 1151 MovieClip [mc_interface] Frame 73
stop();
Symbol 1151 MovieClip [mc_interface] Frame 74
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 1
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 2
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 3
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 4
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 5
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 6
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 7
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 8
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 9
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 10
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 11
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 12
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 13
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 14
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 15
stop();
Symbol 1172 MovieClip [mc_levelBaker] Frame 16
stop();
Symbol 1174 MovieClip [mc_ripple] Frame 15
stop();
this.removeMovieClip();
Symbol 1175 MovieClip [mc_superDirector] Frame 1
#initclip 175
Object.registerClass("mc_superDirector", SuperDirector);
#endinitclip
Symbol 1176 MovieClip [mc_transitioner] Frame 30
stop();
_parent.onMidTransition();
Symbol 1176 MovieClip [mc_transitioner] Frame 59
stop();
_parent.onTransitionEnd();
this.removeMovieClip();
Symbol 1182 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1194 MovieClip [NumericStepper] Frame 1
#initclip 160
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 350 MovieClip [SimpleButton] in Symbol 1194 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 355 MovieClip [TextInput] in Symbol 1194 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 1200 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1204 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 1210 MovieClip [RadioButtonAssets] Frame 1
#initclip 161
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 1211 MovieClip [RadioButton] Frame 1
#initclip 162
Object.registerClass("RadioButton", mx.controls.RadioButton);
#endinitclip
stop();
Instance of Symbol 361 MovieClip [Button] "foo" in Symbol 1211 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 1221 MovieClip [mc_parrowww] Frame 1
#initclip 176
Object.registerClass("mc_parrowww", Arrow);
#endinitclip
Symbol 1223 MovieClip [mc_slider] Frame 1
#initclip 177
Object.registerClass("mc_slider", VolumeSlider);
#endinitclip
Symbol 1227 Button
on (release) {
_parent.master.gotoMenu();
}
Symbol 1228 Button
on (release) {
_parent.saveOptions(this);
_parent.master.gotoMenu();
}
Symbol 1230 Button
on (release) {
_parent.quitTheGame();
}
Symbol 1236 Button
on (release) {
_parent.restartTheGame();
}
Symbol 1242 Button
on (release) {
_parent.master.gotoMenu();
}
Symbol 1245 Button
on (release) {
tutorial.gotoAndStop(tutorial._currentframe - 1);
}
Symbol 1246 Button
on (release) {
tutorial.gotoAndStop(tutorial._currentframe + 1);
}
Symbol 1247 MovieClip [mc_menu] Frame 1
#initclip 178
Object.registerClass("mc_menu", MenuThingy);
#endinitclip
stop();
Instance of Symbol 1211 MovieClip [RadioButton] "r_normalCursor" in Symbol 1247 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 1211 MovieClip [RadioButton] "r_fancyCursor" in Symbol 1247 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 1211 MovieClip [RadioButton] "r_lowquality" in Symbol 1247 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 1211 MovieClip [RadioButton] "r_midquality" in Symbol 1247 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 1211 MovieClip [RadioButton] "r_highquality" in Symbol 1247 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 1247 MovieClip [mc_menu] Frame 2
stop();
Symbol 1255 MovieClip Frame 10
_parent._parent.onAttackHit();
Symbol 1256 MovieClip [mc_icon_edderkopp] Frame 1
#initclip 179
Object.registerClass("mc_icon_edderkopp", EnemyIcon);
#endinitclip
Symbol 1256 MovieClip [mc_icon_edderkopp] Frame 20
stop();
Symbol 1256 MovieClip [mc_icon_edderkopp] Frame 21
stop();
Symbol 1256 MovieClip [mc_icon_edderkopp] Frame 22
stop();
Symbol 1256 MovieClip [mc_icon_edderkopp] Frame 23
gotoAndStop ("default");
Symbol 1264 MovieClip Frame 1
stop();
Symbol 1264 MovieClip Frame 51
stop();
Symbol 1265 MovieClip Frame 1
stop();
Symbol 1265 MovieClip Frame 34
onUpgradedFinish();
Symbol 1273 MovieClip Frame 1
stop();
Symbol 1273 MovieClip Frame 16
stop();
Symbol 1275 MovieClip [mc_miniHpBar] Frame 1
#initclip 180
Object.registerClass("mc_miniHpBar", HpBar);
#endinitclip
Symbol 1279 MovieClip Frame 10
_parent._parent.onAttackHit();
Symbol 1280 MovieClip [mc_icon_edderkopp_up] Frame 1
#initclip 181
Object.registerClass("mc_icon_edderkopp_up", EnemyIcon);
#endinitclip
stop();
Symbol 1280 MovieClip [mc_icon_edderkopp_up] Frame 2
stop();
Symbol 1280 MovieClip [mc_icon_edderkopp_up] Frame 3
stop();
Symbol 1280 MovieClip [mc_icon_edderkopp_up] Frame 4
gotoAndStop ("default");
Symbol 1283 MovieClip Frame 10
_parent._parent.onAttackHit();
Symbol 1284 MovieClip [mc_icon_edderkopp_down] Frame 1
#initclip 182
Object.registerClass("mc_icon_edderkopp_down", EnemyIcon);
#endinitclip
stop();
Symbol 1284 MovieClip [mc_icon_edderkopp_down] Frame 2
stop();
Symbol 1284 MovieClip [mc_icon_edderkopp_down] Frame 3
stop();
Symbol 1284 MovieClip [mc_icon_edderkopp_down] Frame 4
gotoAndStop ("default");
Symbol 1285 MovieClip [mc_enemy_edderkopp] Frame 1
#initclip 183
Object.registerClass("mc_enemy_edderkopp", Edderkopp);
#endinitclip
stop();
Symbol 1285 MovieClip [mc_enemy_edderkopp] Frame 2
stop();
Symbol 1285 MovieClip [mc_enemy_edderkopp] Frame 3
stop();
Symbol 1285 MovieClip [mc_enemy_edderkopp] Frame 4
stop();
Symbol 1285 MovieClip [mc_enemy_edderkopp] Frame 5
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 1
#initclip 184
Object.registerClass("mc_buildIcon", BuildIcon);
#endinitclip
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 2
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 3
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 4
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 5
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 6
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 7
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 8
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 9
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 10
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 11
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 12
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 13
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 14
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 15
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 16
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 17
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 18
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 19
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 20
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 21
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 22
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 23
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 24
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 25
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 26
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 27
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 28
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 29
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 30
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 31
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 32
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 33
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 34
stop();
Symbol 1288 MovieClip [mc_buildIcon] Frame 35
stop();
Symbol 1298 MovieClip Frame 1
stop();
Symbol 1298 MovieClip Frame 73
stop();
Symbol 1298 MovieClip Frame 145
stop();
Symbol 1298 MovieClip Frame 217
stop();
Symbol 1298 MovieClip Frame 289
stop();
Symbol 1298 MovieClip Frame 361
stop();
Symbol 1298 MovieClip Frame 433
stop();
Symbol 1298 MovieClip Frame 440
stop();
Symbol 1298 MovieClip Frame 447
stop();
Symbol 1298 MovieClip Frame 519
stop();
Symbol 1298 MovieClip Frame 591
stop();
Symbol 1300 MovieClip [mc_building_factory] Frame 1
#initclip 185
Object.registerClass("mc_building_factory", Factory);
#endinitclip
stop();
Symbol 1300 MovieClip [mc_building_factory] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1301 MovieClip [mc_building_farm] Frame 1
#initclip 186
Object.registerClass("mc_building_farm", Farm);
#endinitclip
stop();
Symbol 1301 MovieClip [mc_building_farm] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1302 MovieClip [mc_building_FFPlant] Frame 1
#initclip 187
Object.registerClass("mc_building_FFPlant", FFPlant);
#endinitclip
stop();
Symbol 1302 MovieClip [mc_building_FFPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1306 MovieClip [mc_building_FloodLights] Frame 1
#initclip 188
Object.registerClass("mc_building_FloodLights", FloodLights);
#endinitclip
stop();
Symbol 1306 MovieClip [mc_building_FloodLights] Frame 4
playAttackSound();
Symbol 1306 MovieClip [mc_building_FloodLights] Frame 12
makeLightsHappen();
Symbol 1306 MovieClip [mc_building_FloodLights] Frame 46
onBounceEnd();
stop();
Symbol 1307 MovieClip [mc_building_fortress] Frame 1
#initclip 189
Object.registerClass("mc_building_fortress", Fortress);
#endinitclip
stop();
Symbol 1307 MovieClip [mc_building_fortress] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1308 MovieClip [mc_building_GasPlant] Frame 1
#initclip 190
Object.registerClass("mc_building_GasPlant", GasPlant);
#endinitclip
stop();
Symbol 1308 MovieClip [mc_building_GasPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1309 MovieClip [mc_building_GeoPlant] Frame 1
#initclip 191
Object.registerClass("mc_building_GeoPlant", GeoPlant);
#endinitclip
stop();
Symbol 1309 MovieClip [mc_building_GeoPlant] Frame 32
onBounceEnd();
Symbol 1315 MovieClip Frame 1
_parent.onBounceEnd();
stop();
Symbol 1315 MovieClip Frame 2
_parent.onBounceEnd();
Symbol 1315 MovieClip Frame 25
_parent.onBounceEnd();
Symbol 1316 MovieClip [mc_building_gunturret] Frame 1
#initclip 192
Object.registerClass("mc_building_gunturret", GunTurret);
#endinitclip
Symbol 1317 MovieClip [mc_building_lab] Frame 1
#initclip 193
Object.registerClass("mc_building_lab", Lab);
#endinitclip
stop();
Symbol 1317 MovieClip [mc_building_lab] Frame 32
onBounceEnd();
Symbol 1318 MovieClip Frame 1
stop();
Symbol 1318 MovieClip Frame 13
stop();
Symbol 1318 MovieClip Frame 25
stop();
Symbol 1319 MovieClip [mc_building_landfill] Frame 1
#initclip 194
Object.registerClass("mc_building_landfill", Landfill);
#endinitclip
stop();
Symbol 1319 MovieClip [mc_building_landfill] Frame 2
stop();
Symbol 1319 MovieClip [mc_building_landfill] Frame 3
stop();
Symbol 1319 MovieClip [mc_building_landfill] Frame 4
stop();
Symbol 1319 MovieClip [mc_building_landfill] Frame 5
stop();
Symbol 1320 MovieClip [mc_building_Mine] Frame 1
#initclip 195
Object.registerClass("mc_building_Mine", Mine);
#endinitclip
stop();
Symbol 1320 MovieClip [mc_building_Mine] Frame 32
onBounceEnd();
Symbol 1321 MovieClip [mc_building_nucleardump] Frame 1
#initclip 196
Object.registerClass("mc_building_nucleardump", NuclearDump);
#endinitclip
stop();
Symbol 1321 MovieClip [mc_building_nucleardump] Frame 2
stop();
Symbol 1321 MovieClip [mc_building_nucleardump] Frame 3
stop();
Symbol 1321 MovieClip [mc_building_nucleardump] Frame 4
stop();
Symbol 1321 MovieClip [mc_building_nucleardump] Frame 5
stop();
Symbol 1322 MovieClip [mc_building_NuclearPlant] Frame 1
#initclip 197
Object.registerClass("mc_building_NuclearPlant", NuclearPlant);
#endinitclip
stop();
Symbol 1322 MovieClip [mc_building_NuclearPlant] Frame 32
onBounceEnd();
gotoAndStop ("default");
Symbol 1323 MovieClip [mc_building_OilGasWell] Frame 1
#initclip 198
Object.registerClass("mc_building_OilGasWell", OilGasWell);
#endinitclip
stop();
Symbol 1323 MovieClip [mc_building_OilGasWell] Frame 32
onBounceEnd();
Symbol 1324 MovieClip [mc_building_SolarPlant] Frame 1
#initclip 199
Object.registerClass("mc_building_SolarPlant", SolarPlant);
#endinitclip
stop();
Symbol 1324 MovieClip [mc_building_SolarPlant] Frame 32
onBounceEnd();
Symbol 1325 MovieClip [mc_building_super_farm] Frame 1
#initclip 200
Object.registerClass("mc_building_super_farm", SuperFarm);
#endinitclip
stop();
Symbol 1325 MovieClip [mc_building_super_farm] Frame 32
onBounceEnd();
Symbol 1326 MovieClip [mc_building_super_GeoPlant] Frame 1
#initclip 201
Object.registerClass("mc_building_super_GeoPlant", SuperGeoPlant);
#endinitclip
stop();
Symbol 1326 MovieClip [mc_building_super_GeoPlant] Frame 32
onBounceEnd();
Symbol 1337 MovieClip [mc_building_teslaCoil] Frame 1
#initclip 202
Object.registerClass("mc_building_teslaCoil", TeslaCoil);
#endinitclip
stop();
Symbol 1337 MovieClip [mc_building_teslaCoil] Frame 12
playAttackSound();
Symbol 1337 MovieClip [mc_building_teslaCoil] Frame 36
onFire();
Symbol 1337 MovieClip [mc_building_teslaCoil] Frame 46
onBounceEnd();
Symbol 1338 MovieClip [mc_building_WindPlant] Frame 1
#initclip 203
Object.registerClass("mc_building_WindPlant", WindPlant);
#endinitclip
stop();
Symbol 1338 MovieClip [mc_building_WindPlant] Frame 32
onBounceEnd();
Symbol 1341 MovieClip [mc_ff] Frame 1
#initclip 204
Object.registerClass("mc_ff", FFResource);
#endinitclip
stop();
Symbol 1341 MovieClip [mc_ff] Frame 2
stop();
Symbol 1341 MovieClip [mc_ff] Frame 3
stop();
Symbol 1341 MovieClip [mc_ff] Frame 4
stop();
Symbol 1344 MovieClip [mc_gas] Frame 1
#initclip 205
Object.registerClass("mc_gas", GasResource);
#endinitclip
stop();
Symbol 1344 MovieClip [mc_gas] Frame 2
stop();
Symbol 1344 MovieClip [mc_gas] Frame 3
stop();
Symbol 1344 MovieClip [mc_gas] Frame 4
stop();
Symbol 1345 MovieClip [mc_metal] Frame 1
#initclip 206
Object.registerClass("mc_metal", MetalResource);
#endinitclip
stop();
Symbol 1345 MovieClip [mc_metal] Frame 2
stop();
Symbol 1345 MovieClip [mc_metal] Frame 3
stop();
Symbol 1345 MovieClip [mc_metal] Frame 4
stop();
Symbol 1346 MovieClip [mc_nwaste] Frame 1
#initclip 207
Object.registerClass("mc_nwaste", NuclearWaste);
#endinitclip
stop();
Symbol 1346 MovieClip [mc_nwaste] Frame 2
stop();
Symbol 1346 MovieClip [mc_nwaste] Frame 3
stop();
Symbol 1346 MovieClip [mc_nwaste] Frame 4
stop();
Symbol 1347 MovieClip [mc_smog] Frame 1
#initclip 208
Object.registerClass("mc_smog", Smog);
#endinitclip
Symbol 1347 MovieClip [mc_smog] Frame 46
stop();
timeToDie();
Symbol 1347 MovieClip [mc_smog] Frame 71
stop();
timeToDie();
Symbol 1347 MovieClip [mc_smog] Frame 105
stop();
timeToDie();
Symbol 1348 MovieClip [mc_smokeCloud] Frame 22
_parent.halfDemolishAnim();
Symbol 1348 MovieClip [mc_smokeCloud] Frame 40
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 1349 MovieClip [mc_explodeCloud] Frame 22
_parent.halfDestroyAnim();
Symbol 1349 MovieClip [mc_explodeCloud] Frame 40
_parent.onDestroyAnim();
this.removeMovieClip();
Symbol 1353 MovieClip [mc_inspect_button_toggle] Frame 1
#initclip 209
Object.registerClass("mc_inspect_button_toggle", ToggleButton);
#endinitclip
stop();
Symbol 1353 MovieClip [mc_inspect_button_toggle] Frame 2
stop();
Symbol 1357 MovieClip [mc_progressbar] Frame 1
#initclip 210
Object.registerClass("mc_progressbar", ProgressBar);
#endinitclip
Symbol 1361 MovieClip Frame 1
stop();
Symbol 1361 MovieClip Frame 6
stop();
Symbol 1361 MovieClip Frame 19
stop();
gotoAndStop ("default");
Symbol 1361 MovieClip Frame 32
stop();
gotoAndStop ("default");
Symbol 1361 MovieClip Frame 45
stop();
gotoAndStop ("default");
Symbol 1369 MovieClip Frame 1
stop();
Symbol 1369 MovieClip Frame 2
stop();
Symbol 1369 MovieClip Frame 3
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 1
#initclip 211
Object.registerClass("mc_r_energy", ResourceAmount);
#endinitclip
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 2
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 3
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 4
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 5
stop();
Symbol 1380 MovieClip [mc_r_energy] Frame 6
stop();
Symbol 1385 MovieClip [mc_r_FF] Frame 1
#initclip 212
Object.registerClass("mc_r_FF", ResourceAmount);
#endinitclip
stop();
Symbol 1385 MovieClip [mc_r_FF] Frame 2
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 1
#initclip 213
Object.registerClass("mc_r_food", ResourceAmount);
#endinitclip
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 2
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 3
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 4
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 5
stop();
Symbol 1394 MovieClip [mc_r_food] Frame 6
stop();
Symbol 1398 MovieClip [mc_r_gas] Frame 1
#initclip 214
Object.registerClass("mc_r_gas", ResourceAmount);
#endinitclip
stop();
Symbol 1398 MovieClip [mc_r_gas] Frame 2
stop();
Symbol 1402 MovieClip [mc_r_metal] Frame 1
#initclip 215
Object.registerClass("mc_r_metal", ResourceAmount);
#endinitclip
stop();
Symbol 1402 MovieClip [mc_r_metal] Frame 2
stop();
Symbol 1406 MovieClip [mc_r_research] Frame 1
#initclip 216
Object.registerClass("mc_r_research", ResourceAmount);
#endinitclip
stop();
Symbol 1406 MovieClip [mc_r_research] Frame 2
stop();
Symbol 1410 MovieClip Frame 1
stop();
Symbol 1410 MovieClip Frame 2
stop();
Symbol 1410 MovieClip Frame 3
stop();
Symbol 1410 MovieClip Frame 4
stop();
Symbol 1410 MovieClip Frame 5
stop();
Symbol 1410 MovieClip Frame 6
stop();
Symbol 1410 MovieClip Frame 7
stop();
Symbol 1410 MovieClip Frame 8
stop();
Symbol 1410 MovieClip Frame 9
stop();
Symbol 1410 MovieClip Frame 10
stop();
Symbol 1416 MovieClip [mc_r_smog] Frame 1
#initclip 217
Object.registerClass("mc_r_smog", ResourceAmount);
#endinitclip
stop();
Symbol 1416 MovieClip [mc_r_smog] Frame 2
stop();
Symbol 1416 MovieClip [mc_r_smog] Frame 3
stop();
Symbol 1416 MovieClip [mc_r_smog] Frame 4
stop();
Symbol 1428 MovieClip [mc_toggle_deploy] Frame 1
#initclip 218
Object.registerClass("mc_toggle_deploy", ToggleButton);
#endinitclip
stop();
Symbol 1428 MovieClip [mc_toggle_deploy] Frame 2
stop();
Symbol 1431 MovieClip [mc_zoomCircle] Frame 21
stop();
this.removeMovieClip();
Symbol 1432 MovieClip [mc_build_button_toggle] Frame 1
#initclip 219
Object.registerClass("mc_build_button_toggle", ToggleButton);
#endinitclip
stop();
Symbol 1432 MovieClip [mc_build_button_toggle] Frame 2
stop();
Symbol 1433 MovieClip [mc_terrain] Frame 1
#initclip 220
Object.registerClass("mc_terrain", Terrain);
#endinitclip
Symbol 1444 MovieClip [mc_terrainSquare] Frame 1
#initclip 221
Object.registerClass("mc_terrainSquare", TerrainSquare);
#endinitclip
stop();
Symbol 1444 MovieClip [mc_terrainSquare] Frame 2
stop();
Symbol 1444 MovieClip [mc_terrainSquare] Frame 3
stop();
Symbol 1444 MovieClip [mc_terrainSquare] Frame 4
stop();
Symbol 1444 MovieClip [mc_terrainSquare] Frame 5
stop();
Symbol 1454 MovieClip Frame 1
stop();
Symbol 1454 MovieClip Frame 2
stop();
Symbol 1454 MovieClip Frame 3
stop();
Symbol 1454 MovieClip Frame 4
stop();
Symbol 1454 MovieClip Frame 5
stop();
Symbol 1458 MovieClip [mc_unit_engineer] Frame 1
#initclip 222
Object.registerClass("mc_unit_engineer", Engineer);
#endinitclip
stop();
Symbol 1458 MovieClip [mc_unit_engineer] Frame 2
stop();
Symbol 1458 MovieClip [mc_unit_engineer] Frame 3
stop();
Symbol 1458 MovieClip [mc_unit_engineer] Frame 4
stop();
Symbol 1459 MovieClip Frame 1
stop();
Symbol 1459 MovieClip Frame 2
stop();
Symbol 1459 MovieClip Frame 3
stop();
Symbol 1460 MovieClip [mc_unit_garbageTruck] Frame 1
#initclip 223
Object.registerClass("mc_unit_garbageTruck", GarbageTruck);
#endinitclip
stop();
Symbol 1460 MovieClip [mc_unit_garbageTruck] Frame 2
stop();
Symbol 1460 MovieClip [mc_unit_garbageTruck] Frame 3
stop();
Symbol 1460 MovieClip [mc_unit_garbageTruck] Frame 4
stop();
Symbol 1461 MovieClip [mc_unit_humVee] Frame 1
#initclip 224
Object.registerClass("mc_unit_humVee", HumVee);
#endinitclip
Symbol 1462 MovieClip [mc_unit_tank] Frame 1
#initclip 225
Object.registerClass("mc_unit_tank", Tank);
#endinitclip
Symbol 1483 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 1489 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 1497 Button
on (release) {
gotoAndStop ("sandbox");
}
Symbol 1502 Button
on (release) {
gotoAndStop ("main");
}
Symbol 1515 Button
on (release) {
stopAllSounds();
if (theSuperDirector != undefined) {
theSuperDirector.removeMovieClip();
var d = theSuperDirector.getDepth();
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", d);
} else {
theSuperDirector = this.attachMovie("mc_superDirector", "theSuperDirector", getNextHighestDepth());
}
var back = this;
var n = new LevelNugget();
n.setR(r_e.value, r_f.value, r_s.value, r_r.value, r_m.value, r_g.value, r_ff.value);
n.setS(time_day.value, time_night.value, spawn_rate.value, spawn_time.value, increase_rate.value, increase_time.value, zombiesOn.value);
n.setW(!wasteland_n.isDown, !wasteland_s.isDown, !wasteland_w.isDown, !wasteland_e.isDown);
theSuperDirector.onLoad = function () {
this.setNugget(back.n);
this.setLevel(back.currentLevel);
this.startTheGame();
};
gotoAndStop ("game");
}
Symbol 1523 MovieClip Frame 1
stop();
Symbol 1523 MovieClip Frame 2
stop();
Symbol 1523 MovieClip Frame 3
stop();
Symbol 1523 MovieClip Frame 4
stop();
Symbol 1523 MovieClip Frame 5
stop();
Symbol 1523 MovieClip Frame 6
stop();
Symbol 1523 MovieClip Frame 7
stop();
Symbol 1523 MovieClip Frame 8
stop();
Symbol 1524 Button
on (release) {
levels.gotoAndStop(levels._currentframe - 1);
currentLevel = -levels._currentframe;
}
Symbol 1525 Button
on (release) {
levels.gotoAndStop(levels._currentframe + 1);
currentLevel = -levels._currentframe;
}