Frame 1
function __com_mochibot__(swfid, mc, lv) {
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=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
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__("5b9c16f4", this, 10301);
stop();
Stage.scaleMode = "noScale";
Frame 3
stop();
Symbol 7 MovieClip [FUIComponentSymbol] Frame 1
#initclip 4
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 20 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 44 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 45 MovieClip [UpArrow] Frame 1
stop();
Symbol 45 MovieClip [UpArrow] Frame 2
stop();
Symbol 45 MovieClip [UpArrow] Frame 3
stop();
Symbol 52 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 60 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 66 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 67 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 68 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 69 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 77 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 78 MovieClip [DownArrow] Frame 1
stop();
Symbol 78 MovieClip [DownArrow] Frame 2
stop();
Symbol 78 MovieClip [DownArrow] Frame 3
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 84 MovieClip [FLabelSymbol] Frame 1
#initclip 1
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 86 MovieClip [FPSMeter] Frame 1
#initclip 2
FPSMeterClass = function () {
this.listenersList = [];
this.init();
};
Object.registerClass("FPSMeter", FPSMeterClass);
FPSMeterClass.prototype.init = function () {
if (this._targetInstanceName.length > 0) {
this.FPSMeterTarget = (this.targetInstance = this._parent[this._targetInstanceName]);
if (this.FPSMeterTarget instanceof TextField) {
this._visible = false;
this.past = 0;
this.now = 0;
this.fps = 0;
this.pass = 0;
this.delta = 0;
this.population = new Array(this.populationSize);
} else {
trace("FPSMeter Component: no target TextField found!");
}
}
};
FPSMeterClass.prototype.onEnterFrame = function () {
this.now = getTimer();
this.delta = this.now - this.past;
if (this.modus) {
this.population[this.pass] = this.delta;
this.pass++;
if (this.pass >= this.populationSize) {
var sum = 0;
for (var measurement in this.population) {
sum = sum + this.population[measurement];
}
this.fps = int((1000 * this.populationSize) / sum);
this.sendFPSMeterEvent(this.fps);
this.pass = 0;
}
} else {
this.fps = int(1000 / this.delta);
this.sendFPSMeterEvent(this.fps);
}
this.past = this.now;
};
FPSMeterClass.prototype.getFPS = function () {
return(this.fps);
};
FPSMeterClass.prototype.addListener = function (ref) {
this.listenersList[ref] = ref;
};
FPSMeterClass.prototype.removeListener = function (ref) {
delete this.listenersList[ref];
};
FPSMeterClass.prototype.sendFPSMeterEvent = function (value) {
this.FPSMeterTarget.text = (this.prefix + value) + this.suffix;
for (var i in this.listenersList) {
this.listenersList[i].getFPS(value);
}
};
#endinitclip
Symbol 125 MovieClip Frame 10
stop();
Symbol 125 MovieClip Frame 28
this._parent._parent._parent.throwMode = false;
Symbol 126 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 127 MovieClip Frame 3
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 2
if (this._name == "pm") {
this.bar.gotoAndStop("power");
} else if (this._name == "bm") {
this.bar.gotoAndStop("build");
} else if (this._name == "life") {
this.bar.gotoAndStop("life");
this.bar._xscale = (100 * this._parent.lives) / this._parent.maxLife;
}
Symbol 164 MovieClip Frame 10
stop();
Symbol 164 MovieClip Frame 28
this._parent._parent._parent.throwMode = false;
Symbol 165 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
stop();
Symbol 166 MovieClip Frame 3
stop();
Symbol 167 MovieClip [computer] Frame 1
stop();
Symbol 216 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
this.snow.gotoAndStop(random(this.snow._totalframes) + 1);
Symbol 218 MovieClip [tile] Frame 1
stop();
this.test._visible = false;
Symbol 221 MovieClip [sb] Frame 1
stop();
Symbol 234 MovieClip Frame 90
this._parent.removeMovieClip();
Symbol 244 MovieClip Frame 90
this._parent.removeMovieClip();
Symbol 254 MovieClip Frame 90
this._parent.removeMovieClip();
Symbol 264 MovieClip Frame 90
this._parent.removeMovieClip();
Symbol 276 MovieClip Frame 10
stop();
this._parent.removeMovieClip();
Symbol 277 MovieClip [snowBurst] Frame 9
stop();
Symbol 280 MovieClip [rip] Frame 45
this.removeMovieClip();
Symbol 285 MovieClip [snowman] Frame 1
stop();
Symbol 288 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 289 MovieClip [FScrollBarSymbol] Frame 1
#initclip 5
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var tmp = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var wasEnabled = this.enable;
if (enabledFlag && (!wasEnabled)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (wasEnabled)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var delt = this.smallScroll;
if (inc != "one") {
delt = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var newPos = (this.getScrollPosition() + (mode * delt));
if (newPos > this.maxPos) {
newPos = this.maxPos;
} else if (newPos < this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var c = this.controller;
c.scrollPosition = Math.round(((c.maxPos - c.minPos) * (this._y - c.scrollTop)) / c.trackHeight) + c.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = (this.textField.bottomScroll - this.textField.scroll);
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 290 MovieClip [FListItemSymbol] Frame 1
#initclip 10
function FListItemClass() {
this.init();
}
FListItemClass.prototype = new FSelectableItemClass();
Object.registerClass("FListItemSymbol", FListItemClass);
#endinitclip
Symbol 291 MovieClip [DataProviderSymbol] Frame 1
#initclip 3
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
} else {
this.items[index].label = value;
}
this.items[index].__ID__ = this.uniqueID++;
var eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
DataProviderClass.prototype.removeAll = function () {
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpID = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = tmpID;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
#endinitclip
Symbol 292 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 7
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
if (this._name != "itemAsset") {
this.highlighted = false;
this.layoutContent(100);
}
};
FSelectableItemClass.prototype.drawItem = function (itmObj, selected) {
this.displayContent(itmObj, selected);
if ((this.highlighted != selected) || ((this.controller.focused != this.oldFocus) && (selected))) {
this.setHighlighted(selected);
}
this.oldFocus = this.controller.focused;
};
FSelectableItemClass.prototype.setSize = function (width, height) {
var LOWEST_DEPTH = -16384;
this.width = width;
this.layoutContent(width);
this.attachMovie("FHighlightSymbol", "highlight_mc", LOWEST_DEPTH);
this.highlight_mc._x = 0.5;
this.highlight_mc._width = width - 0.5;
this.highlight_mc._height = height;
this.highlight_mc.controller = this;
this.highlight_mc._alpha = 0;
this.highlight_mc.trackAsMenu = true;
this.highlight_mc.onPress = function () {
if (this.controller.enable) {
this.controller.controller.clickHandler(this.controller.itemNum);
}
};
this.highlight_mc.onDragOver = function () {
if (this.controller.controller.focused) {
this.onPress();
}
};
this.highlight_mc.useHandCursor = false;
this.highlight_mc.trackAsMenu = true;
};
FSelectableItemClass.prototype.setEnabled = function (enabledFlag) {
this.enable = enabledFlag;
this.fLabel_mc.setEnabled(enabledFlag);
this.highlight_mc.gotoAndStop((enabledFlag ? "unfocused" : "disabled"));
};
FSelectableItemClass.prototype.layoutContent = function (width) {
this.attachMovie("FLabelSymbol", "fLabel_mc", 2, {hostComponent:this.controller});
this.fLabel_mc._x = 2;
this.fLabel_mc._y = 0;
this.fLabel_mc.setSize(width - 2);
this.fLabel_mc.labelField.selectable = false;
};
FSelectableItemClass.prototype.displayContent = function (itmObj, selected) {
var tmpLabel = "";
if (itmObj.label != undefined) {
tmpLabel = itmObj.label;
} else if (typeof(itmObj) == "object") {
for (var i in itmObj) {
if (i != "__ID__") {
tmpLabel = (itmObj[i] + ", ") + tmpLabel;
}
}
tmpLabel = tmpLabel.substring(0, tmpLabel.length - 2);
} else {
tmpLabel = itmObj;
}
if (this.fLabel_mc.labelField.text != tmpLabel) {
this.fLabel_mc.setLabel(tmpLabel);
}
var clr = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (clr == undefined) {
clr = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(clr);
};
FSelectableItemClass.prototype.getItemIndex = function () {
return(this.controller.getScrollPosition() + this.itemNum);
};
FSelectableItemClass.prototype.getItemModel = function () {
return(this.controller.getItemAt(this.getItemIndex()));
};
FSelectableItemClass.prototype.getHostDataProvider = function () {
return(this.controller.dataProvider);
};
FSelectableItemClass.prototype.setHighlighted = function (flag) {
fade = this.controller.styleTable.fadeRate.value;
if (((fade == undefined) || (fade == 0)) || (!flag)) {
this.highlight_mc._alpha = (flag ? 100 : 0);
delete this.onEnterFrame;
} else {
this.fadeN = fade;
this.fadeX = 1;
this.highLight_mc._alpha = 20;
this.onEnterFrame = function () {
this.highLight_mc._alpha = (60 * Math.sqrt((this.fadeX++) / this.fadeN)) + 40;
if (this.fadeX > this.fadeN) {
delete this.onEnterFrame;
}
};
}
this.highlighted = flag;
};
#endinitclip
Symbol 293 MovieClip [FSelectableListSymbol] Frame 1
#initclip 6
function FSelectableListClass() {
this.init();
}
FSelectableListClass.prototype = new FUIComponentClass();
FSelectableListClass.prototype.init = function () {
super.init();
this.enable = true;
this.selected = new Array();
this.topDisplayed = (this.numDisplayed = 0);
this.lastSelected = 0;
this.tabChildren = false;
if (this._name != undefined) {
this.dataProvider = new DataProviderClass();
this.dataProvider.addView(this);
}
};
FSelectableListClass.prototype.addItemAt = function (index, label, data) {
if ((index < 0) || (!this.enable)) {
return(undefined);
}
this.dataProvider.addItemAt(index, {label:label, data:data});
};
FSelectableListClass.prototype.addItem = function (label, data) {
if (!this.enable) {
return(undefined);
}
this.dataProvider.addItem({label:label, data:data});
};
FSelectableListClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndex();
var item = this.getItemAt(index);
this.dataProvider.removeItemAt(index);
return(item);
};
FSelectableListClass.prototype.removeAll = function () {
this.dataProvider.removeAll();
};
FSelectableListClass.prototype.replaceItemAt = function (index, newLabel, newData) {
this.dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
};
FSelectableListClass.prototype.sortItemsBy = function (fieldName, order) {
this.lastSelID = this.dataProvider.getItemID(this.lastSelected);
this.dataProvider.sortItemsBy(fieldName, order);
};
FSelectableListClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FSelectableListClass.prototype.getSelectedIndex = function () {
for (var uniqueID in this.selected) {
var tmpInd = this.selected[uniqueID].sIndex;
if (tmpInd != undefined) {
return(tmpInd);
}
}
};
FSelectableListClass.prototype.getSelectedItem = function () {
return(this.getItemAt(this.getSelectedIndex()));
};
FSelectableListClass.prototype.getItemAt = function (index) {
return(this.dataProvider.getItemAt(index));
};
FSelectableListClass.prototype.getEnabled = function () {
return(this.enable);
};
FSelectableListClass.prototype.getValue = function () {
var item = this.getSelectedItem();
return(((item.data == undefined) ? (item.label) : (item.data)));
};
FSelectableListClass.prototype.setSelectedIndex = function (index, flag) {
if (((index >= 0) && (index < this.getLength())) && (this.enable)) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.invalidate("updateControl");
if (flag != false) {
this.executeCallBack();
}
}
};
FSelectableListClass.prototype.setDataProvider = function (obj) {
this.setScrollPosition(0);
this.clearSelected();
if (obj instanceof Array) {
this.dataProvider = new DataProviderClass();
var i = 0;
while (i < obj.length) {
var value = ((typeof(obj[i]) == "string") ? ({label:obj[i]}) : (obj[i]));
this.dataProvider.addItem(value);
i++;
}
} else {
this.dataProvider = obj;
}
this.dataProvider.addView(this);
};
FSelectableListClass.prototype.setItemSymbol = function (linkID) {
this.tmpPos = this.getScrollPosition();
this.itemSymbol = linkID;
this.invalidate("setSize");
this.setScrollPosition(this.tmpPos);
};
FSelectableListClass.prototype.setEnabled = function (enabledFlag) {
this.cleanUI();
super.setEnabled(enabledFlag);
this.enable = enabledFlag;
this.boundingBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
var limit = Math.min(this.numDisplayed, this.getLength());
var i = 0;
while (i < limit) {
this.container_mc[("fListItem" + i) + "_mc"].setEnabled(this.enable);
i++;
}
if (this.enable) {
this.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + i), this.isSelected(this.topDisplayed + i));
i++;
}
};
FSelectableListClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.boundingBox_mc._xscale = (this.boundingBox_mc._yscale = 100);
this.boundingBox_mc._xscale = (this.width * 100) / this.boundingBox_mc._width;
this.boundingBox_mc._yscale = (this.height * 100) / this.boundingBox_mc._height;
var i = 0;
while (i < this.numDisplayed) {
this.container_mc.attachMovie(this.itemSymbol, ("fListItem" + i) + "_mc", 10 + i, {controller:this, itemNum:i});
var item_mc = this.container_mc[("fListItem" + i) + "_mc"];
var offset = ((this.scrollOffset == undefined) ? 0 : (this.scrollOffset));
item_mc.setSize(this.width - offset, this.itmHgt);
item_mc._y = (this.itmHgt - 2) * i;
i++;
}
this.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var firstRow = eventObj.firstRow;
var lastRow = eventObj.lastRow;
var event = eventObj.event;
if (event == "addRows") {
for (var i in this.selected) {
if ((this.selected[i].sIndex != undefined) && (this.selected[i].sIndex >= firstRow)) {
this.selected[i].sIndex = this.selected[i].sIndex + ((lastRow - firstRow) + 1);
this.setSelectedIndex(this.selected[i].sIndex, false);
}
}
} else if (event == "deleteRows") {
if (firstRow == lastRow) {
var index = firstRow;
if (this.selectHolder == index) {
this.selectionDeleted = true;
}
if (((this.topDisplayed + this.numDisplayed) >= this.getLength()) && (this.topDisplayed > 0)) {
this.topDisplayed--;
if (this.selectionDeleted && ((index - 1) >= 0)) {
this.setSelectedIndex(index - 1, false);
}
} else if (this.selectionDeleted) {
var len = this.getLength();
if (((index == (len - 1)) && (len > 1)) || (index > (len / 2))) {
this.setSelectedIndex(index - 1, false);
} else {
this.setSelectedIndex(index, false);
}
}
for (var i in this.selected) {
if (this.selected[i].sIndex > firstRow) {
this.selected[i].sIndex--;
}
}
} else {
this.clearSelected();
this.topDisplayed = 0;
}
} else if (event == "sort") {
var len = this.getLength();
var i = 0;
while (i < len) {
if (this.isSelected(i)) {
var id = this.dataProvider.getItemID(i);
if (id == this.lastSelID) {
this.lastSelected = i;
}
this.selected[String(id)].sIndex = i;
}
i++;
}
}
this.invalidate("updateControl");
};
FSelectableListClass.prototype.measureItmHgt = function () {
this.attachMovie(this.itemSymbol, "tmpItem_mc", 0, {controller:this});
this.tmpItem_mc.drawItem({label:"Sizer: PjtTopg"}, false);
this.itmHgt = this.tmpItem_mc._height;
this.tmpItem_mc.removeMovieClip();
};
FSelectableListClass.prototype.selectItem = function (index, selectedFlag) {
if (selectedFlag && (!this.isSelected(index))) {
this.selected[String(this.dataProvider.getItemID(index))] = {sIndex:index};
} else if (!selectedFlag) {
delete this.selected[String(this.dataProvider.getItemID(index))];
}
};
FSelectableListClass.prototype.isSelected = function (index) {
return(this.selected[String(this.dataProvider.getItemID(index))].sIndex != undefined);
};
FSelectableListClass.prototype.clearSelected = function () {
for (var uniqueID in this.selected) {
var index = this.selected[uniqueID].sIndex;
if (((index != undefined) && (this.topDisplayed <= index)) && (index < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), false);
}
}
delete this.selected;
this.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var tmpInd = (this.topDisplayed + itemNum);
if (this.getItemAt(tmpInd == undefined)) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
this.clearSelected();
this.selectItem(tmpInd, true);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(tmpInd), this.isSelected(tmpInd));
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var itmNum = this.getSelectedIndex();
var newItm = (itmNum + incr);
newItm = Math.max(0, newItm);
newItm = Math.min(this.getLength() - 1, newItm);
if (newItm == itmNum) {
return(undefined);
}
if ((itmNum < this.topDisplayed) || (itmNum >= (this.topDisplayed + this.numDisplayed))) {
this.setScrollPosition(itmNum);
}
if ((newItm >= (this.topDisplayed + this.numDisplayed)) || (newItm < this.topDisplayed)) {
this.setScrollPosition(this.topDisplayed + incr);
}
this.selectionHandler(newItm - this.topDisplayed);
};
FSelectableListClass.prototype.clickHandler = function (itmNum) {
this.focusRect.removeMovieClip();
if (!this.focused) {
this.pressFocus();
}
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FSelectableListClass.prototype.releaseHandler = function () {
if (this.changeFlag) {
this.executeCallBack();
}
this.changeFlag = false;
this.onMouseUp = undefined;
};
FSelectableListClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("enabled");
i++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("unfocused");
i++;
}
};
#endinitclip
Instance of Symbol 291 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 293 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Instance of Symbol 292 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 293 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 294 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 8
function FScrollSelectListClass() {
this.init();
}
FScrollSelectListClass.prototype = new FSelectableListClass();
FScrollSelectListClass.prototype.getScrollPosition = function () {
return(this.topDisplayed);
};
FScrollSelectListClass.prototype.setScrollPosition = function (pos) {
if (this.enable) {
pos = Math.min(pos, this.getLength() - this.numDisplayed);
pos = Math.max(pos, 0);
this.scrollBar_mc.setScrollPosition(pos);
}
};
FScrollSelectListClass.prototype.setAutoHideScrollBar = function (flag) {
this.permaScrollBar = !flag;
this.setSize(this.width, this.height);
};
FScrollSelectListClass.prototype.setEnabled = function (enabledFlag) {
super.setEnabled(enabledFlag);
this.scrollBar_mc.setEnabled(this.enable);
};
FScrollSelectListClass.prototype.setSize = function (w, h) {
var pos = this.getScrollPosition();
super.setSize(w, h);
if (this.scrollBar_mc != undefined) {
this.removed = true;
}
this.scrollBar_mc = undefined;
this.initScrollBar();
this.setScrollPosition(pos);
};
FScrollSelectListClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
this.invalidate("initScrollBar");
};
FScrollSelectListClass.prototype.initScrollBar = function () {
if ((!this.permaScrollBar) && (this.getLength() <= this.numDisplayed)) {
if (this.removed) {
this.scrollBar_mc.removeMovieClip();
this.scrollBar_mc = undefined;
this.scrollOffset = undefined;
this.invalidate("setSize");
}
} else {
if (this.scrollBar_mc == undefined) {
this.container_mc.attachMovie("FScrollBarSymbol", "scrollBar_mc", 3000, {hostStyle:this.styleTable});
this.scrollBar_mc = this.container_mc.scrollBar_mc;
this.scrollBar_mc.setChangeHandler("scrollHandler", this);
this.scrollBar_mc.setSize(this.height);
this.scrollBar_mc._x = this.width - this.scrollBar_mc._width;
this.scrollBar_mc._y = 0;
this.scrollBar_mc.setLargeScroll(this.numDisplayed - 1);
this.scrollOffset = this.scrollBar_mc._width;
this.invalidate("setSize");
}
this.scrollBar_mc.setScrollProperties(this.numDisplayed, 0, this.getLength() - this.numDisplayed);
}
};
FScrollSelectListClass.prototype.scrollHandler = function (scrollBar) {
var pos = scrollBar.getScrollPosition();
this.topDisplayed = pos;
if (this.lastPosition != pos) {
this.updateControl();
}
this.lastPosition = pos;
};
FScrollSelectListClass.prototype.clickHandler = function (itmNum) {
super.clickHandler(itmNum);
if ((this.dragScrolling == undefined) && (this.scrollBar_mc != undefined)) {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.releaseHandler = function () {
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
super.releaseHandler();
};
FScrollSelectListClass.prototype.dragScroll = function () {
clearInterval(this.dragScrolling);
if (this.container_mc._ymouse < 0) {
this.setScrollPosition(this.getScrollPosition() - 1);
this.selectionHandler(0);
this.scrollInterval = Math.max(25, (-23.8 * (-this.container_mc._ymouse)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else if (this.container_mc._ymouse > ((this.itmHgt - 2) * this.numDisplayed)) {
this.setScrollPosition(this.getScrollPosition() + 1);
this.selectionHandler(this.numDisplayed - 1);
this.scrollInterval = Math.max(25, (-23.8 * Math.abs((this.container_mc._ymouse - ((this.itmHgt - 2) * this.numDisplayed)) - 2)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.myOnKeyDown = function () {
if (this.focused) {
this.keyCodes = new Array(40, 38, 34, 33, 36, 35);
this.keyIncrs = new Array(1, -1, this.numDisplayed - 1, -(this.numDisplayed - 1), -this.getLength(), this.getLength());
var i = 0;
while (i < this.keyCodes.length) {
if (Key.isDown(this.keyCodes[i])) {
this.moveSelBy(this.keyIncrs[i]);
return(undefined);
}
i++;
}
this.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var tmpCode = Key.getAscii();
if ((tmpCode >= 33) && (tmpCode <= 126)) {
this.findString(String.fromCharCode(tmpCode));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
return(undefined);
}
var itemNum = this.getSelectedIndex();
var jump = 0;
var i = (itemNum + 1);
while (i != itemNum) {
var itmStr = this.getItemAt(i).label.substring(0, str.length);
if ((str == itmStr) || (str.toUpperCase() == itmStr.toUpperCase())) {
var jump = (i - itemNum);
break;
}
if (i >= (this.getLength() - 1)) {
i = -1;
}
i++;
}
if (jump != 0) {
this.moveSelBy(jump);
}
};
#endinitclip
Instance of Symbol 289 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 294 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 293 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 294 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 298 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 298 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 301 MovieClip [FListBoxSymbol] Frame 1
#initclip 9
function FListBoxClass() {
this.itemSymbol = "FListItemSymbol";
this.init();
this.permaScrollBar = true;
var i = 0;
while (i < this.labels.length) {
this.addItem(this.labels[i], this.data[i]);
i++;
}
this.boundingBox_mc.gotoAndStop(1);
this.width = this._width;
this.height = this._height;
this._yscale = (this._xscale = 100);
this.setSize(this.width, this.height);
if (this.changeHandler.length > 0) {
this.setChangeHandler(this.changeHandler);
}
}
FListBoxClass.prototype = new FScrollSelectListClass();
Object.registerClass("FListBoxSymbol", FListBoxClass);
FListBoxClass.prototype.getSelectedIndices = function () {
var tmpArray = new Array();
for (var i in this.selected) {
tmpArray.push(this.selected[i].sIndex);
}
return(((tmpArray.length > 0) ? (tmpArray) : undefined));
};
FListBoxClass.prototype.getSelectedItems = function () {
var indices = this.getSelectedIndices();
var tmpArray = new Array();
var i = 0;
while (i < indices.length) {
tmpArray.push(this.getItemAt(indices[i]));
i++;
}
return(((tmpArray.length > 0) ? (tmpArray) : undefined));
};
FListBoxClass.prototype.getSelectMultiple = function () {
return(this.selectMultiple);
};
FListBoxClass.prototype.getRowCount = function () {
return(this.numDisplayed);
};
FListBoxClass.prototype.setSelectedIndices = function (indexArray) {
this.clearSelected();
var i = 0;
while (i < indexArray.length) {
this.selectItem(indexArray[i], true);
i++;
}
this.updateControl();
};
FListBoxClass.prototype.setSelectMultiple = function (flag) {
this.selectMultiple = flag;
};
FListBoxClass.prototype.setRowCount = function (count) {
var hgt = ((count * (this.itmHgt - 2)) + 2);
this.setSize(this.width, hgt);
};
FListBoxClass.prototype.setWidth = function (wdt) {
this.setSize(wdt, this.height);
};
FListBoxClass.prototype.setSize = function (w, h) {
if (!this.enable) {
return(undefined);
}
w = Math.max(w, 20);
h = Math.max(h, 40);
this.container_mc.removeMovieClip();
this.container_mc = this.createEmptyMovieClip("container", 3);
this.measureItmHgt();
this.numDisplayed = Math.floor(h / (this.itmHgt - 2));
this.height = (this.numDisplayed * (this.itmHgt - 2)) + 2;
super.setSize(w, this.height);
};
FListBoxClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndices();
return(super.removeItemAt(index));
};
FListBoxClass.prototype.selectionHandler = function (itemNum) {
if (this.clickFilter) {
var index = (this.topDisplayed + itemNum);
if (this.getItemAt(index) == undefined) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
if (((!this.selectMultiple) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(index), this.isSelected(index));
} else if (Key.isDown(16) && (this.selectMultiple)) {
if (this.lastSelected == -1) {
this.lastSelected = index;
}
var incr = ((this.lastSelected < index) ? 1 : -1);
this.clearSelected();
var i = this.lastSelected;
while (i != index) {
this.selectItem(i, true);
if ((i >= this.topDisplayed) && (i < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (i - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(i), this.isSelected(i));
}
i = i + incr;
}
this.selectItem(index, true);
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), this.isSelected(index));
} else if (key.isDown(17)) {
var selectedFlag = this.isSelected(index);
if (!this.selectMultiple) {
this.clearSelected();
}
if (!((!this.selectMultiple) && (selectedFlag))) {
this.selectItem(index, !selectedFlag);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + itemNum), this.isSelected(this.topDisplayed + itemNum));
}
this.lastSelected = index;
}
} else {
this.clickFilter = true;
}
};
FListBoxClass.prototype.moveSelBy = function (itemNum) {
super.moveSelBy(itemNum);
this.releaseHandler();
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 294 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 301 MovieClip [FListBoxSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 304 MovieClip Frame 1
this.snow.gotoAndStop(random(this.snow._totalframes) + 1);
Symbol 307 MovieClip Frame 1
stop();
Symbol 308 MovieClip [eTile] Frame 1
stop();
this.test._visible = false;
Symbol 323 MovieClip Frame 1
this.createEmptyMovieClip("handle", 30);
this.create = true;
this.sW = 640;
this.sH = 540;
this.mpx = this._xmouse;
this.mpy = this._ymouse;
this.gds = (this.gd = 100);
this.gdm = 1000;
this.globA = new Array();
this.genGlob = function (x, y) {
var t = this;
t.mask.attachMovie("glob", "g" + t.gd, t.gd);
var n = t.mask["g" + t.gd];
n._x = (x + random(100)) - 50;
n._y = (y + random(100)) - 50;
n._xscale = (n._yscale = random(350) + 350);
n.mx = (Math.random() * 8) + 12;
n.my = (Math.random() * 8) + 12;
var dir = random(2);
if (dir == 0) {
dir = -1;
}
n.mx = n.mx * dir;
var dir = random(2);
if (dir == 0) {
dir = -1;
}
n.my = n.my * dir;
if (t.gd < t.gdm) {
t.gd++;
} else {
t.gd = t.gds;
}
n.r = n._width / 2;
t.globA.push(n);
};
this.moveG = function () {
var t = this;
var i = (t.globA.length - 1);
while (i >= 0) {
var n = t.globA[i];
n._x = n._x + n.mx;
n._y = n._y + n.my;
if (n._x > (t.sW + n.r)) {
n.removeMovieClip();
t.globA.splice(i, 1);
} else if (n._x < (-n.r)) {
n.removeMovieClip();
t.globA.splice(i, 1);
}
if (n._y > (t.sH + n.r)) {
n.removeMovieClip();
t.globA.splice(i, 1);
} else if (n._y < (-n.r)) {
n.removeMovieClip();
t.globA.splice(i, 1);
}
i--;
}
};
this.handle.onEnterFrame = function () {
var p = this._parent;
p.moveG();
loading = p._parent.getBytesLoaded();
total = p._parent.getBytesTotal();
percent = percent - ((percent - ((loading / total) * 100)) * 0.25);
per = int(percent);
p.masked.percent = per;
if (percent > 99) {
percent = 100;
p._alpha = p._alpha - 4;
if (p._alpha < 0) {
p._parent.gotoAndStop("intro");
}
}
};
this.handle.onMouseMove = function () {
var p = this._parent;
var xm = p._xmouse;
var ym = p._ymouse;
var dx = (xm - p.mpx);
var dy = (ym - p.mpy);
var dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > 100) {
dist = 100;
}
p.masked._alpha = dist;
if (p.create == true) {
if (dist > 10) {
p.genGlob(xm, ym);
}
p.create = false;
} else {
p.create = true;
}
p.mpx = xm;
p.mpy = ym;
};
Symbol 361 MovieClip Frame 430
stop();
this._parent.play();
Symbol 365 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 113
stop();
this._parent.play();
Instance of Symbol 365 MovieClip in Symbol 424 MovieClip Frame 1
on (release) {
this._parent._parent.gotoAndStop("game");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 424 MovieClip Frame 12
stop();
Symbol 424 MovieClip Frame 37
stop();
Instance of Symbol 325 MovieClip in Symbol 424 MovieClip Frame 60
on (release) {
getURL ("http://goldsickle.deviantart.com/", "_blank");
}
Symbol 424 MovieClip Frame 177
stop();
this._parent.gotoAndStop("game");
Symbol 431 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 444 MovieClip Frame 1
stop();
Symbol 448 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip in Symbol 459 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.clearAll();
p._parent._parent.gameMode = "map";
p._parent._parent.generateMap("E");
p._parent._parent.toggleCMapBtns(true);
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 458 MovieClip in Symbol 459 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.toggleCMapBtns(true);
p._parent._parent.gameMode = "map";
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 460 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 2
stop();
Instance of Symbol 431 MovieClip "menuBtn" in Symbol 460 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
p.pause = true;
p.quit();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 444 MovieClip "previewBtn" in Symbol 460 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.genMapArray();
p.toggleCMapBtns(false);
p.gameMode = "";
p.cMapMC.gotoAndStop("show");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 448 MovieClip "saveBtn" in Symbol 460 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.genMapArray();
p.toggleCMapBtns(false);
if (p.editIndex == "") {
p.gameMode = "";
p.cMapMC.gotoAndStop("save");
} else {
trace(p.allMapNamesA[p.editIndex]);
p.updateCustomMap(p.allMapNamesA[p.editIndex], p.editIndex);
p.gameMode = "";
p.cMapMC.gotoAndPlay("notice");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 450 MovieClip "clearBtn" in Symbol 460 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.toggleCMapBtns(false);
p.gameMode = "";
this._parent.confirmClear.gotoAndStop("show");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 308 MovieClip [eTile] "t2" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 2;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t3" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 3;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t18" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 18;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t9" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 9;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t16" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 16;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t10" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 10;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t14" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 14;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t17" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 17;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t8" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 8;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t15" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 15;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t11" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 11;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t5" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 5;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t12" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 12;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t7" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 7;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t6" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 6;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t13" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 13;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t4" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 4;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t1" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 1;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Instance of Symbol 308 MovieClip [eTile] "t2" in Symbol 460 MovieClip Frame 3
onClipEvent (load) {
this.tileNum = 19;
this.graphic.gotoAndStop(this.tileNum);
}
on (release) {
var p = this._parent;
p.prevTile.over.gotoAndStop("blank");
p.prevTile = this;
this.over.gotoAndStop("over");
p._parent.mapTile = this.tileNum;
}
Symbol 465 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip in Symbol 475 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.updateCustomMap(p._parent.nameInst.text, p.ind);
p._parent._parent.toggleSaveMapBtns(true);
p._parent.gotoAndPlay("notice");
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 458 MovieClip in Symbol 475 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.toggleSaveMapBtns(true);
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 485 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 2
this.gotoAndPlay(random(80) + 1);
Symbol 494 MovieClip Frame 150
this.gotoAndPlay(random(80) + 1);
Symbol 494 MovieClip Frame 384
this.gotoAndPlay(random(80) + 1);
Symbol 502 MovieClip Frame 143
stop();
Symbol 503 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 2
this.array.html = true;
this.array.htmlText = "";
this.display = function () {
var t = this;
var r = 0;
while (r < 20) {
t.array.htmlText = t.array.htmlText + (("[" + t._parent.customMapA[r]) + "]");
if (r != 19) {
t.array.text = t.array.text + ",";
}
r++;
}
};
this.display();
this.backButton = function () {
var t = this;
var string = t.array.text;
var r = 0;
var c = 0;
var tempString = "";
var error = false;
var i = 0;
while (i < string.length) {
var val = string.charAt(i);
if ((val > -1) and (val < 19)) {
if ((r == 0) or (r == 19)) {
if (val != 0) {
val = 0;
}
}
}
if (val == ",") {
c++;
tempString = "";
} else if (val == "]") {
if (c == 19) {
r++;
} else {
error = true;
}
} else if (val == "[") {
c = 0;
} else if (val > -1) {
tempString = tempString.concat(val);
t._parent.customMapA[r][c] = tempString;
}
i++;
}
if (r != 20) {
error = true;
}
if (error == false) {
var p = t._parent;
p.gameMode = "map";
p.generateMap("load", p.customMapA);
p.toggleCMapBtns(true);
t.errorText = "";
t.gotoAndStop("blank");
} else {
t.errorText = "Array Error!";
}
};
Instance of Symbol 465 MovieClip in Symbol 506 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
this._parent.backButton();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 506 MovieClip Frame 3
this.nameInst.text = "Name your map";
this.nameInst.onSetFocus = function (oldFocus) {
if (this.text == "Name your map") {
this.text = "";
}
this._parent._parent.typing = true;
};
this.nameInst.onKillFocus = function () {
this._parent._parent.typing = false;
};
Instance of Symbol 471 MovieClip "saveBtn" in Symbol 506 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
if ((this._parent.nameInst.text != "") and (this._parent.nameInst.text != "Name your map")) {
var i = (p.allMapNamesA.length - 1);
while (i >= 0) {
if (this._parent.nameInst.text == p.allMapNamesA[i]) {
var repeat = true;
var ind = i;
break;
}
i--;
}
if (repeat != true) {
p.updateCustomMap(this._parent.nameInst.text);
this._parent.gotoAndPlay("notice");
} else {
p.toggleSaveMapBtns(false);
this._parent.promptOverWrite.ind = i;
this._parent.promptOverWrite.gotoAndStop("show");
}
repeat = false;
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 465 MovieClip "backBtn" in Symbol 506 MovieClip Frame 3
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
on (release) {
var p = this._parent._parent;
p.gameMode = "map";
p.toggleCMapBtns(true);
this._parent.gotoAndStop("blank");
}
Symbol 506 MovieClip Frame 4
this.ref.mouth.gotoAndPlay(80);
Symbol 506 MovieClip Frame 74
this._parent.gameMode = "map";
this._parent.toggleCMapBtns(true);
this.gotoAndStop("blank");
Symbol 520 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 2
play();
Symbol 527 MovieClip Frame 60
this._parent.gamePlay = true;
_quality = this._parent.inGameQuality;
Symbol 527 MovieClip Frame 93
this.gotoAndStop("blank");
Symbol 527 MovieClip Frame 94
this._parent.gamePlay = false;
Symbol 527 MovieClip Frame 121
_quality = "high";
this.win.gotoAndStop(this._parent.winner);
Symbol 527 MovieClip Frame 210
stop();
Instance of Symbol 524 MovieClip in Symbol 527 MovieClip Frame 210
on (release) {
var p = this._parent._parent;
if (p.mapSet == "default") {
p.changeLevel(p.currentMap);
} else if (p.mapSet == "custom") {
p.changeLevel(p.custCurrentMap);
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 526 MovieClip in Symbol 527 MovieClip Frame 210
on (release) {
var p = this._parent._parent;
p.quit();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 550 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 2
_quality = "high";
this._parent.gamePlay = true;
this._parent.updateHelped();
this._parent.controlMode = "absolute";
this.createEmptyMovieClip("helpListener", 1);
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
}
};
Key.addListener(helpListener);
this.ref.arm.gotoAndStop(3);
this.ref.mouth.gotoAndPlay(10);
Symbol 550 MovieClip Frame 3
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(80);
Symbol 550 MovieClip Frame 4
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(20);
Symbol 550 MovieClip Frame 5
this._parent.controlMode = "relative";
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(2);
this.ref.mouth.gotoAndPlay(35);
Symbol 550 MovieClip Frame 6
this._parent.controlMode = "absolute";
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(3);
this.ref.mouth.gotoAndPlay(90);
Symbol 550 MovieClip Frame 7
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(69)) {
this._parent._parent.controlMode = "absolute";
this._parent._parent.updateControl();
this._parent.nextFrame();
} else if (Key.isDown(82)) {
this._parent._parent.controlMode = "relative";
this._parent._parent.updateControl();
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
delete helpListener.onMouseUp;
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(90);
Symbol 550 MovieClip Frame 8
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this._parent.numSB = 1;
this._parent.char.numsb = 1;
this._parent.gameDisplay.sbcounter.gotoAndStop(2);
helpListener.onMouseUp = function () {
if (this._parent._parent.pause == false) {
this._parent.nextFrame();
}
};
this.ref.arm.gotoAndStop(2);
this.ref.mouth.gotoAndPlay(15);
Symbol 550 MovieClip Frame 9
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
delete helpListener.onMouseUp;
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(25);
Symbol 550 MovieClip Frame 10
if (this._parent.enemyA.length > 0) {
this._parent.enemyA[0].removeMovieClip();
this._parent.enemyA.splice(0, 1);
}
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(20);
Symbol 550 MovieClip Frame 11
this.beforeGen1 = true;
if (this._parent.enemyA.length > 0) {
this._parent.enemyA[0].removeMovieClip();
this._parent.enemyA.splice(0, 1);
}
this._parent.difficulty = "dummy";
this._parent.cComp(10 * this._parent.tileW, 16 * this._parent.tileW, "enemy");
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(2);
this.ref.mouth.gotoAndPlay("talk");
Symbol 550 MovieClip Frame 12
if (this.beforeGen1 == false) {
this._parent.resetVars();
this._parent.clearAll();
this._parent.generateMap("h1");
}
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(3);
this.ref.mouth.gotoAndPlay("talk");
Symbol 550 MovieClip Frame 13
this.beforeGen1 = false;
this._parent.resetVars();
this._parent.clearAll();
this._parent.setChar(2, 2);
this._parent.generateMap("h2");
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent.nextFrame();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(1);
this.ref.mouth.gotoAndPlay(10);
Symbol 550 MovieClip Frame 14
helpListener.onKeyDown = function () {
if (this._parent._parent.pause == false) {
if (Key.isDown(67)) {
this._parent._parent.gameMode = "custom";
this._parent._parent.quit();
}
if (Key.isDown(66)) {
this._parent.prevFrame();
}
}
};
this.ref.arm.gotoAndStop(3);
this.ref.mouth.gotoAndPlay(80);
this.ref.eyes.gotoAndPlay("wink");
Symbol 555 MovieClip Frame 1
stop();
Symbol 558 MovieClip Frame 1
stop();
Symbol 561 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 1
this.base._visible = false;
this.sH2 = 270;
this.sW2 = 320;
this.sfA = new Array();
this.d = 1;
this.setMove = function (n) {
var t = this;
var p = t._parent._parent;
n._xscale = (n._yscale = random(30) + 30);
n._alpha = random(30) + 50;
n.h2 = n._height / 2;
n._x = random(640) - t.sW2;
n._y = (-t.sH2) - n.h2;
n.mx = (Math.random() * 8) - 4;
n.my = (Math.random() * 1.5) + 1;
n.mr = (Math.random() * 1) + 0.9;
var dir = random(2);
if (dir == 0) {
dir = -1;
}
n.mr = n.mr * dir;
};
this.createSnowFlake = function () {
var t = this;
var num = 15;
while (num > 0) {
t.base.duplicateMovieClip("sf" + t.d, t.d);
var n = t["sf" + t.d];
t.setMove(n);
n._y = ((-t.sH2) - n.h2) + random(150);
t.d++;
t.sfA.push(n);
num--;
}
};
this.createSnowFlake();
this.onEnterFrame = function () {
var t = this;
var i = (t.sfA.length - 1);
while (i >= 0) {
var n = t.sfA[i];
n._x = n._x + n.mx;
n._y = n._y + n.my;
n._rotation = n._rotation + n.mr;
if (((n._y > (100 + n.h2)) or (n._x < ((-t.sW2) - n.h2))) or (n._x > (t.sW2 + n.h2))) {
t.setMove(n);
}
i--;
}
};
Symbol 577 MovieClip Frame 1
stop();
Symbol 580 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 1
stop();
Symbol 590 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 2
this.ref.eyes.gotoAndPlay("wink");
this.ref.mouth.gotoAndPlay(30);
Instance of Symbol 588 MovieClip in Symbol 591 MovieClip Frame 2
on (release) {
var p = this._parent._parent._parent;
p.gameMode = "help";
p.numSB = 0;
p.numE = 0;
p.numT = 0;
p.toggleGameSetUpBtns(true);
p.changeLevel("h1");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 590 MovieClip in Symbol 591 MovieClip Frame 2
on (release) {
var p = this._parent._parent._parent;
p.toggleGameSetUpBtns(true);
p.updateHelped();
this._parent.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 602 MovieClip Frame 1
stop();
Symbol 606 MovieClip Frame 1
stop();
Instance of Symbol 555 MovieClip "playBtn" in Symbol 606 MovieClip Frame 1
on (release) {
this.gotoAndStop(1);
this._parent.gotoAndStop("setUp");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 558 MovieClip "settingsBtn" in Symbol 606 MovieClip Frame 1
on (release) {
this.gotoAndStop(1);
this._parent.gotoAndStop("settings");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 561 MovieClip "helpBtn" in Symbol 606 MovieClip Frame 1
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.gameMode = "help";
p.numSB = 0;
p.numE = 0;
p.numT = 0;
p.changeLevel("h1");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 319 MovieClip in Symbol 606 MovieClip Frame 1
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 606 MovieClip Frame 2
stop();
if (_root.mySo.data.helped == undefined) {
this._parent._parent.toggleGameSetUpBtns(false);
this.offerHelp.gotoAndStop("show");
} else {
this.offerHelp.gotoAndStop("blank");
}
Instance of Symbol 577 MovieClip "customBtn" in Symbol 606 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
this._parent._parent.gameOptions.gotoAndStop("custom");
this._parent._parent.toggleGameSetUpBtns(false);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 580 MovieClip "menuBtn" in Symbol 606 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
this._parent.gotoAndStop("title");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 582 MovieClip "mapBtn" in Symbol 606 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.editIndex = "";
p.gameMode = "map";
p.mapSet = "custom";
p.updateMapSet();
p.numSB = 0;
p.numE = 0;
p.numT = 0;
p.resetVars();
p.clearAll();
p.generateMap("E");
p.winner = "";
p.gameDisplay.gotoAndStop("map");
p.pauseDisplay.gotoAndStop("blank");
p.gameOptions.gotoAndStop("blank");
_quality = "high";
p.mouseP.gotoAndStop("aim");
Mouse.show();
p.mainDisplay.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 606 MovieClip Frame 3
stop();
this.cm = this._parent.controlMode;
this.qu = this._parent.inGameQuality;
Instance of Symbol 465 MovieClip in Symbol 606 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.gamePlay == false) {
this._parent.gotoAndStop("title");
} else {
p.pauseDisplay.gotoAndStop("pause");
this._parent.gotoAndStop("blank");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 602 MovieClip in Symbol 606 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.controlMode == "relative") {
p.controlMode = "absolute";
} else {
p.controlMode = "relative";
}
this._parent.cm = p.controlMode;
p.updateControl();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 602 MovieClip in Symbol 606 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.controlMode == "relative") {
p.controlMode = "absolute";
} else {
p.controlMode = "relative";
}
this._parent.cm = p.controlMode;
p.updateControl();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 602 MovieClip in Symbol 606 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.inGameQuality == "low") {
p.inGameQuality = "medium";
} else if (p.inGameQuality == "medium") {
p.inGameQuality = "high";
}
this._parent.qu = p.inGameQuality;
p.updateQuality();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 602 MovieClip in Symbol 606 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.inGameQuality == "high") {
p.inGameQuality = "medium";
} else if (p.inGameQuality == "medium") {
p.inGameQuality = "low";
}
this._parent.qu = p.inGameQuality;
p.updateQuality();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 648 MovieClip Frame 1
stop();
Symbol 651 MovieClip Frame 1
stop();
Symbol 654 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 1
stop();
Symbol 660 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 1
stop();
Symbol 666 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip in Symbol 678 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.allCustomMapsA.splice(p.ind, 1);
p._parent._parent.allMapNamesA.splice(p.ind, 1);
p._parent._parent.updateCustomMap();
p._parent.updateListBox();
p._parent._parent.toggleGOBtns(true);
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 458 MovieClip in Symbol 678 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent._parent.toggleGOBtns(true);
p.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 681 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 2
stop();
if (this._parent.mapSet == "custom") {
this.gotoAndStop("customMap");
}
this._parent.getGameVar();
if (this._parent.numE == 0) {
this._parent.numE = 1;
}
if (this._parent.difficulty == "dummy") {
this._parent.difficulty = "medium";
}
this.maps.gotoAndStop(this._parent.currentMap);
this.numEne = this._parent.numE;
this.numTeam = this._parent.numT;
this.diff = this._parent.difficulty;
this.col = this._parent.playerColor;
Instance of Symbol 602 MovieClip "nextMapBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent.maps;
if (p._currentframe < p._totalframes) {
p.nextFrame();
} else {
p.gotoAndStop(1);
}
this._parent._parent.currentMap = p._currentframe;
this._parent._parent.updateGame();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 602 MovieClip "prevMapBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent.maps;
if (p._currentframe > 1) {
p.prevFrame();
} else {
p.gotoAndStop(p._totalframes);
}
this._parent._parent.currentMap = p._currentframe;
this._parent._parent.updateGame();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "lessEneBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.numE > 1) {
p.numE--;
}
this._parent.numEne = p.numE;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreEneBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.numE < p.maxE) {
p.numE++;
}
this._parent.numEne = p.numE;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "lessTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.numT > 0) {
p.numT--;
}
this._parent.numTeam = p.numT;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.numT < p.maxT) {
p.numT++;
}
this._parent.numTeam = p.numT;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "lessTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.difficulty == "hard") {
p.difficulty = "medium";
} else if (p.difficulty == "medium") {
p.difficulty = "easy";
}
this._parent.diff = p.difficulty;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.difficulty == "easy") {
p.difficulty = "medium";
} else if (p.difficulty == "medium") {
p.difficulty = "hard";
}
this._parent.diff = p.difficulty;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "lessTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.playerColor == "blue") {
p.playerColor = "red";
} else {
p.playerColor = "blue";
}
this._parent.col = p.playerColor;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreTeamBtn" in Symbol 682 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.playerColor == "blue") {
p.playerColor = "red";
} else {
p.playerColor = "blue";
}
this._parent.col = p.playerColor;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 654 MovieClip "playBtn" in Symbol 682 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.updateGame();
p.gameMode = "custom";
p.numSB = p.numE;
p.changeLevel(p.currentMap);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 657 MovieClip "randomBtn" in Symbol 682 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent.maps;
p.gotoAndStop(random(p._totalframes) + 1);
this._parent._parent.currentMap = p._currentframe;
this._parent._parent.updateGame();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 660 MovieClip "cancelBtn" in Symbol 682 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.toggleGameSetUpBtns(true);
this._parent.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 663 MovieClip "customBtn" in Symbol 682 MovieClip Frame 2
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent.mapSet = "custom";
p._parent.updateMapSet();
p.gotoAndStop("customMap");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 682 MovieClip Frame 3
stop();
this._parent.getGameVar();
if (this._parent.numE == 0) {
this._parent.numE = 1;
}
if (this._parent.difficulty == "dummy") {
this._parent.difficulty = "medium";
}
this.maps.gotoAndStop(this._parent.currentMap);
this.numEne = this._parent.numE;
this.numTeam = this._parent.numT;
this.diff = this._parent.difficulty;
this.col = this._parent.playerColor;
this.cMaps.setAutoHideScrollBar(true);
this.updateListBox = function () {
var t = this;
var p = t._parent;
t.cMaps.removeAll();
var i = 0;
while (i < _root.mySO.data.maps.length) {
t.cMaps.addItem(_root.mySO.data.mapNames[i], i);
i++;
}
t.cMaps.setSelectedIndex(0);
};
this.updateListBox();
this.cMaps.setStyleProperty("textColor", 84063);
this.cMaps.setStyleProperty("selection", 175275);
Instance of Symbol 301 MovieClip [FListBoxSymbol] "cMaps" in Symbol 682 MovieClip Frame 3
//component parameters
onClipEvent (initialize) {
selectMultiple = false;
changeHandler = "";
}
Instance of Symbol 651 MovieClip "lessDiffBtn" in Symbol 682 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.difficulty == "hard") {
p.difficulty = "medium";
} else if (p.difficulty == "medium") {
p.difficulty = "easy";
}
this._parent.diff = p.difficulty;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreDiffBtn" in Symbol 682 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.difficulty == "easy") {
p.difficulty = "medium";
} else if (p.difficulty == "medium") {
p.difficulty = "hard";
}
this._parent.diff = p.difficulty;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "lessColBtn" in Symbol 682 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.playerColor == "blue") {
p.playerColor = "red";
} else {
p.playerColor = "blue";
}
this._parent.col = p.playerColor;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 651 MovieClip "moreColBtn" in Symbol 682 MovieClip Frame 3
on (release) {
var p = this._parent._parent;
if (p.playerColor == "blue") {
p.playerColor = "red";
} else {
p.playerColor = "blue";
}
this._parent.col = p.playerColor;
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 654 MovieClip "playBtn" in Symbol 682 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
if (this._parent.cMaps.getSelectedItem().data != undefined) {
p.gameMode = "custom";
p.numSB = p.numE;
p.updateGame();
p.custCurrentMap = this._parent.cMaps.getSelectedItem().data;
p.changeLevel(p.custCurrentMap);
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 666 MovieClip "defaultBtn" in Symbol 682 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent;
p._parent.mapSet = "default";
p._parent.updateMapSet();
p.gotoAndStop("custom");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 673 MovieClip "deleteBtn" in Symbol 682 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent;
if (p.cMaps.getSelectedItem().data != undefined) {
p.confirm.gotoAndStop("show");
p.confirm.ind = p.cMaps.getSelectedItem().data;
p._parent.toggleGOBtns(false);
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 676 MovieClip in Symbol 682 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
p.gameMode = "map";
p.numSB = 0;
p.numE = 0;
p.numT = 0;
p.resetVars();
p.clearAll();
p.generateMap("E");
p.winner = "";
p.gameDisplay.gotoAndStop("map");
_quality = "high";
p.mouseP.gotoAndStop("aim");
Mouse.show();
p.mainDisplay.gotoAndStop("blank");
p.pauseDisplay.gotoAndStop("blank");
p.gameOptions.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 681 MovieClip "editBtn" in Symbol 682 MovieClip Frame 3
on (release) {
this.gotoAndStop(1);
var p = this._parent._parent;
if (this._parent.cMaps.getSelectedItem().data != undefined) {
p.resetVars();
p.clearAll();
p.editIndex = this._parent.cMaps.getSelectedItem().data;
p.gameMode = "map";
p.numSB = 0;
p.numE = 0;
p.numT = 0;
p.generateMap(this._parent.cMaps.getSelectedItem().data);
p.winner = "";
p.gameDisplay.gotoAndStop("map");
_quality = "high";
p.mouseP.gotoAndStop("aim");
Mouse.show();
p.mainDisplay.gotoAndStop("blank");
p.pauseDisplay.gotoAndStop("blank");
p.gameOptions.gotoAndStop("blank");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 686 MovieClip Frame 1
stop();
Symbol 688 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 1
stop();
Instance of Symbol 686 MovieClip in Symbol 689 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
_quality = p.inGameQuality;
p.pause = false;
if (p.globalsoundcontrol == "play") {
p.fade = "in";
}
p.pauseDisplay.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 688 MovieClip in Symbol 689 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
p.mainDisplay.gotoAndStop("settings");
p.pauseDisplay.gotoAndStop("blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 524 MovieClip in Symbol 689 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.globalsoundcontrol == "play") {
p.fade = "in";
}
if (p.mapSet == "default") {
p.changeLevel(p.currentMap);
} else if (p.mapSet == "custom") {
p.changeLevel(p.custCurrentMap);
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 526 MovieClip in Symbol 689 MovieClip Frame 2
on (release) {
var p = this._parent._parent;
if (p.globalsoundcontrol == "play") {
p.fade = "in";
}
p.quit();
}
on (rollOver) {
this.gotoAndStop(2);
}
on (releaseOutside, rollOut) {
this.gotoAndStop(1);
}
Symbol 695 MovieClip Frame 1
stop();
Symbol 724 MovieClip Frame 7
stop();
Symbol 724 MovieClip Frame 25
this._parent._parent.throwMode = false;
Symbol 725 MovieClip Frame 1
stop();
Symbol 754 MovieClip Frame 7
stop();
Symbol 754 MovieClip Frame 25
this._parent._parent.throwMode = false;
Symbol 755 MovieClip Frame 1
stop();
Symbol 756 MovieClip Frame 1
stop();
Symbol 757 MovieClip Frame 1
_root.mySO = sharedobject.getLocal("snowBallFightCookie");
this.updateControl = function () {
_root.mySO.data.control = this.controlMode;
_root.mySO.flush();
};
this.updateQuality = function () {
_root.mySO.data.quality = this.inGameQuality;
_root.mySO.flush();
};
this.updateHelped = function () {
_root.mySO.data.helped = true;
_root.mySO.flush();
};
this.updateMapSet = function () {
_root.mySO.data.mapSet = this.mapSet;
_root.mySO.flush();
};
this.updateGame = function () {
_root.mySO.data.game = [this.currentMap, this.numE, this.numT, this.difficulty, this.playerColor];
_root.mySO.flush();
};
this.updateCustomMap = function (name, overWrite) {
if (name != undefined) {
if (overWrite == undefined) {
this.allMapNamesA.push(name);
this.allCustomMapsA.push(this.customMapA);
} else {
this.allCustomMapsA[overWrite] = this.customMapA;
}
}
_root.mySO.data.mapNames = this.allMapNamesA;
_root.mySO.data.maps = this.allCustomMapsA;
_root.mySO.flush();
};
this.getMapArrays = function () {
if (_root.mySO.data.maps == undefined) {
this.allMapNamesA = new Array();
this.allCustomMapsA = new Array();
} else {
this.allMapNamesA = _root.mySO.data.mapNames;
this.allCustomMapsA = _root.mySO.data.maps;
}
};
this.getMapArrays();
this.clearSO = function () {
_root.mySO.data.control = undefined;
_root.mySO.data.quality = undefined;
_root.mySO.data.helped = undefined;
_root.mySO.data.game = undefined;
_root.mySO.data.maps = undefined;
_root.mySO.data.mapNames = undefined;
_root.mySO.data.mapSet = undefined;
_root.mySO.flush();
};
_quality = "high";
if (_root.mySO.data.quality == undefined) {
this.inGameQuality = "low";
} else {
this.inGameQuality = _root.mySO.data.quality;
}
Mouse.hide();
this.stageW = 500;
this.stageH = 500;
this.pi = Math.PI;
this.rc = this.pi / 180;
this.f = 0.75;
this.gamePlay = false;
this.pause = false;
this.typing = false;
this.getGameVar = function () {
if (_root.mySO.data.game == undefined) {
this.currentMap = 1;
this.numE = 3;
this.numT = 2;
this.difficulty = "medium";
this.playerColor = "red";
} else {
this.currentMap = _root.mySO.data.game[0];
this.numE = _root.mySO.data.game[1];
this.numT = _root.mySO.data.game[2];
this.difficulty = _root.mySO.data.game[3];
this.playerColor = _root.mySO.data.game[4];
}
};
this.getGameVar();
this.gameMode = "";
if (_root.mySO.data.mapSet == undefined) {
this.mapSet = "default";
} else {
this.mapSet = _root.mySO.data.mapSet;
}
this.maxE = 12;
this.maxT = 12;
this.numSB = this.numE;
this.winner = "";
if (_root.mySO.data.control == undefined) {
this.controlMode = "absolute";
} else {
this.controlMode = _root.mySO.data.control;
}
this.mapTile = 1;
this.mouseIsDown = false;
this.editIndex = "";
this.td = 10;
this.tds = 10;
this.tdm = 600;
this.ripd = 100;
this.ripds = 100;
this.ripdm = 200;
this.kod = 510;
this.kods = 510;
this.kodm = 540;
this.ed = 550;
this.eds = 550;
this.edm = 600;
this.sbd = 1100;
this.sbds = 1100;
this.sbdm = 1500;
this.treed = 1600;
this.treeds = 1600;
this.treedm = 2100;
this.mouseP.swapDepths(1000100);
this.bord.swapDepths(1000050);
this.cMapMC.swapDepths(1000020);
this.pauseDisplay.swapDepths(1000015);
this.gameOptions.swapDepths(1000010);
this.mainDisplay.swapDepths(1000005);
this.help.swapDepths(1000000);
this.ready.swapDepths(999990);
this.char.swapDepths(1000);
this.gameDisplay.swapDepths(500);
this.addD = function (q) {
var t = this;
t[q + "d"]++;
if (t[q + "d"] > t[q + "dm"]) {
t[q + "d"] = t[q + "ds"];
}
};
this.resetVars = function () {
var t = this;
var c = t.char;
t.td = t.tds;
t.ed = t.eds;
t.sbd = t.sbds;
t.treed = t.treeds;
t.mapTile = 1;
t.mouseIsDown = false;
t.editIndex = "";
};
this.resetVars();
this.lkey = 65;
this.rkey = 68;
this.ukey = 87;
this.dkey = 83;
this.lkey2 = 37;
this.rkey2 = 39;
this.ukey2 = 38;
this.dkey2 = 40;
this.pkey = 32;
this.mkey = 77;
this.toggleGameSetUpBtns = function (what) {
var p = this.mainDisplay;
p.trainingBtn.enabled = what;
p.customBtn.enabled = what;
p.mapBtn.enabled = what;
p.menuBtn.enabled = what;
};
this.toggleCMapBtns = function (what) {
var p = this.gameDisplay;
p.clearBtn.enabled = what;
p.previewBtn.enabled = what;
p.saveBtn.enabled = what;
p.menuBtn.enabled = what;
};
this.toggleGOBtns = function (what) {
var p = this.gameOptions;
p.defaultBtn.enabled = what;
p.deleteBtn.enabled = what;
p.editBtn.enabled = what;
p.lessEneBtn.enabled = what;
p.moreEneBtn.enabled = what;
p.lessTeamBtn.enabled = what;
p.moreTeamBtn.enabled = what;
p.lessDiffBtn.enabled = what;
p.moreDiffBtn.enabled = what;
p.lessColBtn.enabled = what;
p.moreColBtn.enabled = what;
p.cancelBtn.enabled = what;
p.playBtn.enabled = what;
};
this.toggleSaveMapBtns = function (what) {
var p = this.cMapMC;
p.saveBtn.enabled = what;
p.backBtn.enabled = what;
p.nameInst.selectable = what;
};
this.maph1 = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 15, 15, 15, 15, 9, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 17, 17, 17, 17, 16, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 17, 17, 17, 17, 16, 0, 0, 0, 0], [0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 13, 17, 17, 17, 17, 16, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 17, 17, 17, 17, 16, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 7, 14, 14, 14, 14, 10, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
this.genMapArray = function () {
var t = this;
t.customMapA = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0,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 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 18, 8, 15, 9, 18, 0, 0], [0, 1, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 13, 18, 16, 0, 0, 0], [0, 18, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 7, 14, 10, 18, 0, 0], [0, 0, 18, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 18, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
this.map11 = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 18, 0, 5, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 5, 0, 18, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 12, 0, 0, 0], [0, 0, 0, 12, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 11, 12, 0, 0, 0], [0, 0, 0, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0], [0, 0, 0, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0], [0, 0, 0, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0], [0, 0, 0, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0], [0, 0, 0, 12, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0], [0, 0, 0, 12, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 11, 12, 0, 0, 0], [0, 0, 0, 12, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0], [0, 18, 0, 3, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 3, 0, 18, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
this.tileW = 25;
this.tileH = 25;
trace("TileW = " + this.tileW);
trace("TileH = " + this.tileH);
this.obstacleA = new Array();
this.Tile0 = function () {
};
this.Tile0.prototype.solid = false;
this.Tile0.prototype.through = true;
this.Tile0.prototype.t = "snow";
this.Tile0.prototype.frame = "t1";
this.Tile1 = function () {
};
this.Tile1.prototype.solid = true;
this.Tile1.prototype.through = false;
this.Tile1.prototype.t = "tree";
this.Tile1.prototype.frame = "t2";
this.Tile2 = function () {
};
this.Tile2.prototype.solid = true;
this.Tile2.prototype.through = true;
this.Tile2.prototype.t = "ice";
this.Tile2.prototype.frame = "t3";
this.Tile3 = function () {
};
this.Tile3.prototype.solid = true;
this.Tile3.prototype.through = true;
this.Tile3.prototype.t = "ice";
this.Tile3.prototype.frame = "t4";
this.Tile4 = function () {
};
this.Tile4.prototype.solid = true;
this.Tile4.prototype.through = true;
this.Tile4.prototype.t = "ice";
this.Tile4.prototype.frame = "t5";
this.Tile5 = function () {
};
this.Tile5.prototype.solid = true;
this.Tile5.prototype.through = true;
this.Tile5.prototype.t = "ice";
this.Tile5.prototype.frame = "t6";
this.Tile6 = function () {
};
this.Tile6.prototype.solid = true;
this.Tile6.prototype.through = true;
this.Tile6.prototype.t = "ice";
this.Tile6.prototype.frame = "t7";
this.Tile7 = function () {
};
this.Tile7.prototype.solid = true;
this.Tile7.prototype.through = true;
this.Tile7.prototype.t = "ice";
this.Tile7.prototype.frame = "t8";
this.Tile8 = function () {
};
this.Tile8.prototype.solid = true;
this.Tile8.prototype.through = true;
this.Tile8.prototype.t = "ice";
this.Tile8.prototype.frame = "t9";
this.Tile9 = function () {
};
this.Tile9.prototype.solid = true;
this.Tile9.prototype.through = true;
this.Tile9.prototype.t = "ice";
this.Tile9.prototype.frame = "t10";
this.Tile10 = function () {
};
this.Tile10.prototype.solid = true;
this.Tile10.prototype.through = true;
this.Tile10.prototype.t = "ice";
this.Tile10.prototype.frame = "t11";
this.Tile11 = function () {
};
this.Tile11.prototype.solid = true;
this.Tile11.prototype.through = true;
this.Tile11.prototype.t = "ice";
this.Tile11.prototype.frame = "t12";
this.Tile12 = function () {
};
this.Tile12.prototype.solid = true;
this.Tile12.prototype.through = true;
this.Tile12.prototype.t = "ice";
this.Tile12.prototype.frame = "t13";
this.Tile13 = function () {
};
this.Tile13.prototype.solid = true;
this.Tile13.prototype.through = true;
this.Tile13.prototype.t = "ice";
this.Tile13.prototype.frame = "t14";
this.Tile14 = function () {
};
this.Tile14.prototype.solid = true;
this.Tile14.prototype.through = true;
this.Tile14.prototype.t = "ice";
this.Tile14.prototype.frame = "t15";
this.Tile15 = function () {
};
this.Tile15.prototype.solid = true;
this.Tile15.prototype.through = true;
this.Tile15.prototype.t = "ice";
this.Tile15.prototype.frame = "t16";
this.Tile16 = function () {
};
this.Tile16.prototype.solid = true;
this.Tile16.prototype.through = true;
this.Tile16.prototype.t = "ice";
this.Tile16.prototype.frame = "t17";
this.Tile17 = function () {
};
this.Tile17.prototype.solid = true;
this.Tile17.prototype.through = true;
this.Tile17.prototype.t = "ice";
this.Tile17.prototype.frame = "t18";
this.Tile18 = function () {
};
this.Tile18.prototype.solid = true;
this.Tile18.prototype.through = false;
this.Tile18.prototype.t = "sm";
this.Tile18.prototype.frame = "t19";
this.getB = function (obj) {
var t = this;
obj.xMin = obj._x;
obj.xMax = obj._x + t.tileW;
obj.yMin = obj._y;
obj.yMax = obj._y + t.tileH;
obj.cx = obj._x + (t.tileW / 2);
obj.cy = obj._y + (t.tileH / 2);
};
this.generateMap = function (n, m) {
var t = this;
if (n != "load") {
if ((((t.mapSet == "default") or (n == "h1")) or (n == "h2")) or (n == "E")) {
var m = t["map" + n];
} else if (t.mapSet == "custom") {
var m = _root.mySO.data.maps[n];
}
}
this.createEmptyMovieClip("tiles", 400);
var r = (m.length - 1);
while (r >= 0) {
var c = (m[r].length - 1);
while (c >= 0) {
var v = m[r][c];
var a = ((("t_" + r) + "_") + c);
t[a] = new eval ("Tile" + v)();
if (t.gameMode != "map") {
t.tiles.attachMovie("tile", a, t.td);
t.tiles[a]._x = c * t.tileW;
t.tiles[a]._y = r * t.tileH;
t.tiles[a].r = r;
t.tiles[a].c = c;
t.tiles[a].graphic.gotoAndStop(t[a].frame);
t.getB(t.tiles[a]);
if (v == 1) {
t.attachMovie("tree", "t" + t.treed, t.treed);
var n = t["t" + t.treed];
n._x = t.tiles[a].cx;
n._y = t.tiles[a].cy;
n._rotation = random(20) - 10;
t.obstacleA.push(n);
t.addD("tree");
} else if (v == 18) {
t.attachMovie("snowman", "sm" + t.treed, t.treed);
var n = t["sm" + t.treed];
n._x = t.tiles[a].cx;
n._y = t.tiles[a].cy;
n._rotation = random(360);
t.obstacleA.push(n);
t.addD("tree");
t[a].sm = n;
}
} else {
t.tiles.attachMovie("eTile", a, t.td);
t.tiles[a]._x = c * t.tileW;
t.tiles[a]._y = r * t.tileH;
t.tiles[a].r = r;
t.tiles[a].c = c;
t.tiles[a].graphic.gotoAndStop(t[a].frame);
t.getB(t.tiles[a]);
}
t.addD("t");
c--;
}
r--;
}
};
this.getTile = function (n) {
var t = this;
n.r = Math.floor(n._y / t.tileH);
n.c = Math.floor(n._x / t.tileW);
tile = (("t_" + n.r) + "_") + n.c;
return(tile);
};
this.sbA = new Array();
this.frameConst = 1.8;
this.createSB = function (n, ang, who) {
var t = this;
if (n._name == "char") {
n.char.anim.gotoAndPlay("throw");
} else {
n.enemy.char.anim.play();
}
t.attachMovie("sb", "sb" + t.sbd, t.sbd);
var sb = t["sb" + t.sbd];
sb._x = n._x;
sb._y = n._y;
sb.w2 = sb.hit._width / 2;
sb.h2 = sb.hit._height / 2;
sb.dx = sb.w2 + (t.tileW / 2);
sb.dy = sb.h2 + (t.tileH / 2);
if (n == t.char) {
sb.mx = (n.power * Math.cos(ang)) + n.mx;
sb.my = (n.power * Math.sin(ang)) + n.my;
} else {
sb.mx = n.power * Math.cos(ang);
sb.my = n.power * Math.sin(ang);
}
sb._rotation = -15;
sb.ang = ang / t.rc;
sb.cf = 0;
sb.tf = Math.ceil(t.frameConst * n.power);
sb.amp = n.power * 3;
sb.D = t.pi / sb.tf;
sb.who = who;
t.addD("sb");
t.sbA.push(sb);
n.numsb--;
};
this.sbM = function () {
var t = this;
var i = (t.sbA.length - 1);
while (i >= 0) {
var n = t.sbA[i];
if (n.remove == true) {
t.cSBurst(n._x, n._y, n);
n.removeMovieClip();
t.sbA.splice(i, 1);
continue;
}
n._x = n._x + n.mx;
n._y = n._y + n.my;
var tile = t.getTile(n);
n.tile = tile;
if (t[n.tile].through == false) {
n.remove = true;
if (t[n.tile].t == "sm") {
t.tiles[n.tile].graphic.shad.nextFrame();
t[n.tile].sm.nextFrame();
if (t.globalsoundcontrol == "play") {
t.snowMan.stop();
t.snowMan.start();
}
if (t.tiles[n.tile].graphic.shad._currentframe == 4) {
t[n.tile].through = true;
t[n.tile].solid = false;
}
} else if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
}
if (n._x < t.tiles[n.tile].cx) {
var c2 = (n.c - 1);
} else {
var c2 = (n.c + 1);
}
var tile2 = ((("t_" + n.r) + "_") + c2);
if (t[tile2].through == false) {
t.sbTestHit(n, n._x, n._y, n.r, c2);
}
if (n._y < t.tiles[n.tile].cy) {
var r2 = (n.r - 1);
} else {
var r2 = (n.r + 1);
}
var tile2 = ((("t_" + r2) + "_") + n.c);
if (t[tile2].through == false) {
t.sbTestHit(n, n._x, n._y, r2, n.c);
}
n.cf++;
if (n.cf == n.tf) {
n.remove = true;
}
n.shad._y = n.amp * Math.sin(n.D * n.cf);
if (n._x < n.w2) {
n._x = n.w2;
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
} else if (n._x > (t.stageW + n.w2)) {
n._x = t.stageW + n.w2;
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
}
if (n._y < n.h2) {
n._y = n.h2;
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
} else if (n._y > (t.stageH + n.h2)) {
n._y = t.stageH + n.h2;
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
}
if (n.who == "team") {
var j = (t.enemyA.length - 1);
while (j >= 0) {
var ene = t.enemyA[j];
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
var sep = (n.w2 + ene.w2);
if (dist < (sep * sep)) {
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.hitS.start();
}
ene.lives = ene.lives - n.tf;
if (ene.lives <= 0) {
ene.lives = 0;
if (t.playerColor == "red") {
var col = "blue";
} else {
var col = "red";
}
t.cKO(ene, "base", col);
ene.removeMovieClip();
t.enemyA.splice(j, 1);
if (t.enemyA.length == 0) {
if (t.gameMode != "help") {
t.ready.gotoAndPlay("verdict");
t.winner = t.playerColor;
}
}
}
ene.life.gotoAndPlay("charge");
}
j--;
}
} else if (n.who == "enemy") {
var j = (t.teamA.length - 1);
while (j >= 0) {
var ene = t.teamA[j];
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
var sep = (n.w2 + ene.w2);
if (dist < (sep * sep)) {
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.hitS.start();
}
ene.lives = ene.lives - n.tf;
if (ene.lives <= 0) {
ene.lives = 0;
t.cKO(ene, "base", t.playerColor);
ene.removeMovieClip();
t.teamA.splice(j, 1);
}
ene.life.gotoAndPlay("charge");
}
j--;
}
var ene = t.char;
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
var sep = (n.w2 + ene.w2);
if (dist < (sep * sep)) {
n.remove = true;
if (t.globalsoundcontrol == "play") {
t.hitS.start();
}
ene.lives = ene.lives - n.tf;
if (ene.lives <= 0) {
ene.lives = 0;
t.cKO(ene, "leader", t.playerColor);
ene._x = -100;
t.youDead = true;
}
t.gameDisplay.lives._xscale = (100 * ene.lives) / ene.maxLife;
ene.life.gotoAndPlay("charge");
}
}
i--;
}
};
this.cSBurst = function (x, y, sb) {
var t = this;
var r = Math.floor(y / t.tileH);
var c = Math.floor(x / t.tileW);
var tile = ((("t_" + r) + "_") + c);
if (t[tile].t != "ice") {
var n = t["sb" + t.sbd];
t.addD("sb");
if (t[tile].t == "tree") {
if (t.globalsoundcontrol == "play") {
t.thunk.stop();
t.thunk.start();
}
} else if (t[tile].t == "sm") {
if (t.globalsoundcontrol == "play") {
t.snowMan.stop();
t.snowMan.start();
}
}
t.attachMovie("snowBurst", "sb" + t.sbd, t.sbd);
var n = t["sb" + t.sbd];
t.addD("sb");
} else {
if (t.globalsoundcontrol == "play") {
t.splash.stop();
t.splash.start();
}
t.attachMovie("rip", "r" + t.ripd, t.ripd);
var n = t["r" + t.ripd];
t.addD("rip");
}
n._rotation = sb.ang;
n._x = x;
n._y = y;
};
this.sbTestHit = function (n, x, y, r, c) {
var t = this;
var a = ((("t_" + r) + "_") + c);
var tile = t.tiles[(("t_" + r) + "_") + c];
var dx = (x - tile.cx);
var dy = (y - tile.cy);
var adx = Math.abs(x - tile.cx);
var ady = Math.abs(y - tile.cy);
var px = (n.dx - adx);
var py = (n.dy - ady);
if (adx < n.dx) {
if (ady < n.dy) {
if (t[a].t == "sm") {
tile.graphic.shad.nextFrame();
t[a].sm.nextFrame();
if (tile.graphic.shad._currentframe == 4) {
t[a].through = true;
t[a].solid = false;
}
}
n.remove = true;
}
}
};
this.teamA = new Array();
this.char.w2 = this.char.hit._width / 2;
this.char.h2 = this.char.hit._height / 2;
this.char.dx = this.char.w2 + (this.tileW / 2);
this.char.dy = this.char.h2 + (this.tileH / 2);
this.char.adjS = 6;
this.char.acc = 0.7;
this.char.mmx = 3;
this.char.mmy = 3;
this.char.mbuild = 50;
this.char.chargeS = 0.23;
this.char.mpower = 11;
this.char.range = this.char.mpower * Math.ceil(this.frameConst * this.char.mpower);
this.setChar = function (r, col) {
var t = this;
var c = t.char;
t.youDead = false;
c.maxLife = (c.lives = 50);
t.gameDisplay.lives._xscale = 100;
c.pm.gotoAndStop("blank");
c.bm.gotoAndStop("blank");
trace("player color = " + t.playerColor);
c.gotoAndStop(t.playerColor);
c.char.gotoAndStop("stand");
c.mx = 0;
c.my = 0;
c._x = (col * t.tileW) - (t.tileW / 2);
c._y = (r * t.tileH) - (t.tileH / 2);
c.build = false;
c.cbuild = 0;
c.numsb = t.numSB;
t.gameDisplay.sbcounter.gotoAndStop(c.numsb + 1);
c.power = 0;
c.charge = false;
c.launch = false;
c.snowD = 20;
c.snowT = 0;
c.throwMode = false;
};
this.charM = function () {
var t = this;
var n = t.char;
var dx = (this._xmouse - n._x);
var dy = (this._ymouse - n._y);
var ang = Math.atan2(dy, dx);
n._rotation = ang / t.rc;
t.moveObj(n);
if (n.build == true) {
if (n.cbuild < n.mbuild) {
n.cbuild++;
n.bm.bar._xscale = (n.cbuild / n.mbuild) * 100;
} else {
n.cbuild = 0;
n.numsb++;
t.gameDisplay.sbcounter.gotoAndStop(n.numsb + 1);
}
}
if (n.charge == true) {
if (n.power < n.mpower) {
n.power = n.power + n.chargeS;
if (n.power > n.mpower) {
n.power = n.mpower;
}
n.pm.bar._xscale = (n.power / n.mpower) * 100;
}
}
if (n.launch == true) {
t.createSB(n, ang, "team");
t.gameDisplay.sbcounter.gotoAndStop(n.numsb + 1);
n.power = 0;
n.charge = false;
n.launch = false;
n.pm.gotoAndStop("blank");
}
};
this.enemyA = new Array();
this.enemySepF = 0.8;
this.initEnemy = function (num) {
var t = this;
var i = num;
while (i > 0) {
t.cComp(((20 - i) * t.tileW) - (t.tileW / 2), (20 * t.tileW) - (t.tileW / 2), "enemy");
i--;
}
};
this.initTeam = function (num) {
var t = this;
var i = num;
while (i > 0) {
t.cComp(((1 + i) * t.tileW) - (t.tileW / 2), t.tileH - (t.tileH / 2), "team");
i--;
}
};
this.cComp = function (x, y, typ) {
var t = this;
t.attachMovie("computer", "c" + t.ed, t.ed);
var n = t["c" + t.ed];
n._x = x;
n._y = y;
n.w2 = n.hit._width / 2;
n.h2 = n.hit._height / 2;
n.dx = n.w2 + (this.tileW / 2);
n.dy = n.h2 + (this.tileH / 2);
if (t.difficulty == "easy") {
n.acc = 0.3;
} else if (t.difficulty == "medium") {
n.acc = 0.45;
} else if (t.difficulty == "hard") {
n.acc = 0.6;
} else if (t.difficulty == "dummy") {
n.acc = 0;
}
n.mx = 0;
n.my = 0;
n.mmx = 2;
n.mmy = 2;
n.rs = 4;
n.ptar = undefined;
n.randMove = false;
n.randMoveT = 0;
n.randMoveD = 20;
if (t.difficulty == "easy") {
n.losD = 45;
} else if (t.difficulty == "medium") {
n.losD = 35;
} else if (t.difficulty == "hard") {
n.losD = 25;
} else if (t.difficulty == "dummy") {
n.losD = 25;
}
n.losT = n.losD;
n.cSb = false;
n.cbuild = 0;
n.mbuild = 70;
n.numsb = 0;
n.chargeS = 0.23;
n.power = 0;
n.mpower = 11;
n.range = n.mpower * Math.ceil(t.frameConst * n.mpower);
n.throwMode = false;
n.snowD = 20;
n.snowT = 0;
n.maxLife = (n.lives = 50);
n.dist = 1000000 /* 0x0F4240 */;
n.xd = 1;
n.yd = -1;
n.changeDirT = 0;
n.changeDirD = random(30) + 20;
n.t = typ;
if (typ == "enemy") {
trace("player color = " + t.playerColor);
if (t.playerColor == "red") {
n.gotoAndStop("blue");
} else {
n.gotoAndStop("red");
}
} else {
n.gotoAndStop(t.playerColor);
}
t.addD("e");
t[typ + "A"].push(n);
};
this.compM = function (typ) {
var t = this;
var i = (t[typ + "A"].length - 1);
while (i >= 0) {
var n = t[typ + "A"][i];
if (t.difficulty == "dummy") {
var noTarget = true;
}
if (t.winner == "") {
var e = (t.enemyA.length - 1);
if (e == -1) {
var noTarget = true;
n.throwMode = false;
n.bm.gotoAndStop("blank");
n.pm.gotoAndStop("blank");
t.ready.gotoAndPlay("verdict");
t.winner = t.playerColor;
}
var e2 = (t.teamA.length - 1);
if ((e2 == -1) and (t.youDead == true)) {
var noTarget = true;
n.throwMode = false;
n.bm.gotoAndStop("blank");
n.pm.gotoAndStop("blank");
t.ready.gotoAndPlay("verdict");
if (t.playerColor == "red") {
t.winner = "blue";
} else {
t.winner = "red";
}
}
} else {
var noTarget = true;
}
if ((n.losT == n.losD) or (n.tar eq undefined)) {
n.tar = "";
if (n.t == "team") {
while (e >= 0) {
var ene = t.enemyA[e];
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
if (dist < n.dist) {
n.sight = t.los(n, ene);
n.ptar = ene;
if (n.sight == true) {
n.dist = dist;
n.tar = ene;
}
}
e--;
}
if (n.tar == "") {
if (n.ptar != undefined) {
n.tar = n.ptar;
n.sight = false;
n.ptar = undefined;
} else {
var randTar = random(t.enemyA.length);
n.tar = t.enemyA[randTar];
n.sight = false;
}
}
} else {
while (e2 >= 0) {
var ene = t.teamA[e2];
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
if (dist < n.dist) {
n.sight = t.los(n, ene);
n.ptar = ene;
if (n.sight == true) {
n.dist = dist;
n.tar = ene;
}
}
e2--;
}
if (t.youDead == false) {
var ene = t.char;
var dx = (ene._x - n._x);
var dy = (ene._y - n._y);
var dist = ((dx * dx) + (dy * dy));
if (dist < n.dist) {
n.sight = t.los(n, ene);
n.ptar = ene;
if (n.sight == true) {
n.dist = dist;
n.tar = ene;
}
}
}
if (n.tar == "") {
if (n.ptar != undefined) {
n.tar = n.ptar;
n.sight = false;
n.ptar = undefined;
} else {
n.tar = t.char;
n.sight = false;
}
}
}
n.dist = 1000000 /* 0x0F4240 */;
n.losT = 0;
} else {
n.losT++;
}
if (n.t == "team") {
trace(n.tar);
}
if (n.cSb == true) {
if (n.cbuild < n.mbuild) {
n.cbuild++;
n.bm.bar._xscale = (n.cbuild / n.mbuild) * 100;
} else {
n.cbuild = 0;
n.numsb++;
n.bm.gotoAndStop("blank");
n.cSb = false;
}
}
if (noTarget != true) {
var dx = (n.tar._x - n._x);
var dy = (n.tar._y - n._y);
var dist = Math.sqrt((dx * dx) + (dy * dy));
var ang = Math.atan2(dy, dx);
var deg = (ang / t.rc);
if ((dx > 0) && (dy > 0)) {
var quad = 4;
}
if ((dx <= 0) && (dy >= 0)) {
var quad = 1;
}
if ((dx < 0) && (dy < 0)) {
var quad = 2;
}
if ((dx > 0) && (dy < 0)) {
var quad = 3;
}
var abs_x = Math.abs(dx);
var abs_y = Math.abs(dy);
var tg = (abs_y / abs_x);
var maths = (Math.atan(tg) / t.rc);
if (quad == 1) {
var angle = (180 - maths);
} else if (quad == 2) {
var angle = (180 + maths);
} else if (quad == 3) {
var angle = (360 - maths);
} else if (quad == 4) {
var angle = maths;
}
if (angle <= 180) {
if (n._rotation <= 0) {
if ((n._rotation + 180) >= angle) {
n._rotation = n._rotation - ((-(angle - n._rotation)) / n.rs);
} else {
n._rotation = n._rotation - (((360 - (-n._rotation)) - angle) / n.rs);
}
} else {
n._rotation = n._rotation - ((-(angle - n._rotation)) / n.rs);
}
} else if (angle > 180) {
if (n._rotation >= 0) {
if ((n._rotation - -180) >= angle) {
n._rotation = n._rotation - ((-(angle - n._rotation)) / n.rs);
} else {
n._rotation = n._rotation - (((360 - (-n._rotation)) - angle) / n.rs);
}
} else {
n._rotation = n._rotation - ((-((angle - 360) - n._rotation)) / n.rs);
}
}
if (dist > n.range) {
var inRange = false;
} else if (n.power == n.mpower) {
var inRange = true;
} else if (dist < (n.range - 40)) {
var inRange = true;
} else {
var inRange = false;
}
if (n.numsb == 1) {
if (n.power < n.mpower) {
if (n.power == 0) {
n.pm.gotoAndStop("charge");
}
n.throwMode = true;
n.power = n.power + n.chargeS;
if (n.power > n.mpower) {
n.power = n.mpower;
}
n.range = n.power * Math.ceil(t.frameConst * n.power);
n.pm.bar._xscale = (n.power / n.mpower) * 100;
}
if ((inRange == false) or (n.sight == false)) {
t.chaseTarget(n, n.tar);
} else {
t.combat(n, n.tar, n._rotation * t.rc);
if (t.difficulty != "easy") {
t.dodge(n, ang);
}
}
} else {
if (n.cSb == false) {
n.cSb = true;
n.bm.gotoAndStop("charge");
}
if (t.difficulty != "easy") {
t.dodge(n, ang);
}
if (dist < n.tar.range) {
t.retreat(n, ang);
}
}
}
var j = (i - 1);
while (j >= 0) {
var n2 = t[typ + "A"][j];
var dx = (n._x - n2._x);
var dy = (n._y - n2._y);
var sep = ((n2.w2 + n.w2) + 30);
if (Math.abs(dx) < sep) {
if (Math.abs(dy) < sep) {
if (dx < 0) {
n.mx = n.mx - t.enemySepF;
n2.mx = n2.mx + t.enemySepF;
} else {
n.mx = n.mx + t.enemySepF;
n2.mx = n2.mx - t.enemySepF;
}
if (dy < 0) {
n.my = n.my - t.enemySepF;
n2.my = n2.my + t.enemySepF;
} else {
n.my = n.my + t.enemySepF;
n2.my = n2.my - t.enemySepF;
}
}
}
j--;
}
if (n.t == "team") {
var n2 = t.char;
var dx = (n._x - n2._x);
var dy = (n._y - n2._y);
var sep = ((n2.w2 + n.w2) + 30);
if (Math.abs(dx) < sep) {
if (Math.abs(dy) < sep) {
if (dx < 0) {
n.mx = n.mx - t.enemySepF;
} else {
n.mx = n.mx + t.enemySepF;
}
if (dy < 0) {
n.my = n.my - t.enemySepF;
} else {
n.my = n.my + t.enemySepF;
}
}
}
}
t.moveObj(n);
i--;
}
};
this.los = function (n, c) {
var t = this;
var sight = true;
var dc = (c.c - n.c);
var dr = (c.r - n.r);
if (dc != 0) {
var adc = Math.abs(dc);
var cdir = (dc / adc);
}
if (dr != 0) {
var adr = Math.abs(dr);
var rdir = (dr / adr);
}
if (adc >= adr) {
var domDir = "c";
var recDir = "r";
var mag = adc;
var m = (adr / adc);
} else {
var domDir = "r";
var recDir = "c";
var mag = adr;
var m = (adc / adr);
}
var i = 0;
while (i < mag) {
if (domDir == "c") {
var c = (n.c + (cdir * i));
var r = (n.r + (rdir * Math.floor(i * m)));
} else {
var r = (n.r + (rdir * i));
var c = (n.c + (cdir * Math.floor(i * m)));
}
if (t[(("t_" + r) + "_") + c].through == false) {
var sight = false;
break;
}
i++;
}
return(sight);
};
this.combat = function (n, tar, ang) {
var t = this;
if (t.difficulty == "hard") {
if (ang < 0) {
ang = ang + (2 * t.pi);
}
trace("ang = " + (ang / t.rc));
var dx = tar.mx;
var dy = tar.my;
var tarAng = Math.atan2(dy, dx);
if (tarAng < 0) {
tarAng = tarAng + (2 * t.pi);
}
trace("tarAng = " + (tarAng / t.rc));
var initDiff = Math.abs(ang - tarAng);
if (initDiff > t.pi) {
if (ang < tarAng) {
tarAng = tarAng - (2 * t.pi);
} else {
ang = ang - (2 * t.pi);
}
initDiff = Math.abs(ang - tarAng);
}
if (initDiff > (t.pi / 2)) {
if (tarAng < ang) {
var newTarAng = (tarAng + t.pi);
} else {
var newTarAng = (tarAng - t.pi);
}
var flipDir = -1;
} else {
var newTarAng = tarAng;
var flipDir = 1;
}
var diffAng = ((newTarAng - ang) * flipDir);
trace("diff ang = " + (diffAng / t.rc));
var ratio = (diffAng / (t.pi / 2));
trace("ratio = " + ratio);
ang = ang + ((Math.random() * 0.62) * ratio);
}
t.createSB(n, ang, n.t);
n.range = 0;
n.power = 0;
n.power = 0;
n.pm.gotoAndStop("blank");
};
this.dodge = function (n, ang) {
var t = this;
var newAng = ((ang + (Math.random() * 0.698)) + 1.459);
n.changeDirT++;
if (n.changeDirT == n.changeDirD) {
n.xd = random(2);
if (n.xd == 0) {
n.xd = -1;
}
n.yd = random(2);
if (n.yd == 0) {
n.yd = -1;
}
n.changeDirT = 0;
n.changeDirD = random(40) + 25;
}
n.mx = n.mx + ((n.xd * n.acc) * Math.cos(newAng));
n.my = n.my + ((n.yd * n.acc) * Math.sin(newAng));
};
this.retreat = function (n, ang) {
var t = this;
n.mx = n.mx - (n.acc * Math.cos(ang));
n.my = n.my - (n.acc * Math.sin(ang));
};
this.chaseTarget = function (n, tar) {
var t = this;
if (n.randMove != true) {
var dc = (tar.c - n.c);
var dr = (tar.r - n.r);
var adc = Math.abs(dc);
var adr = Math.abs(dr);
if (adc != 0) {
var cdir = (dc / adc);
} else {
var cdir = 0;
}
if (adr != 0) {
var rdir = (dr / adr);
} else {
var rdir = 0;
}
var cf = (n.c + cdir);
var cb = (n.c - cdir);
var rf = (n.r + rdir);
var rb = (n.r - rdir);
var tilecf = ((("t_" + n.r) + "_") + cf);
var tilecb = ((("t_" + n.r) + "_") + cb);
var tilerf = ((("t_" + rf) + "_") + n.c);
var tilerb = ((("t_" + rb) + "_") + n.c);
if (cdir == 0) {
if (t[tilerf].solid == true) {
var tileL = ((("t_" + n.r) + "_") + (n.c - 1));
if ((t[tileL].solid == false) and (n.ptile != tileL)) {
cdir = -1;
cf = n.c + cdir;
tilecf = (("t_" + n.r) + "_") + cf;
} else {
var tileR = ((("t_" + n.r) + "_") + (n.c + 1));
if ((t[tileR].solid == false) and (n.ptile != tileR)) {
cdir = 1;
cf = n.c + cdir;
tilecf = (("t_" + n.r) + "_") + cf;
}
}
}
}
if (rdir == 0) {
if (t[tilecf].solid == true) {
var tileU = ((("t_" + (n.r - 1)) + "_") + n.c);
if ((t[tileU].solid == false) and (n.ptile != tileU)) {
rdir = -1;
rf = n.r + rdir;
tilerf = (("t_" + rf) + "_") + n.c;
} else {
var tileD = ((("t_" + (n.r + 1)) + "_") + n.c);
if ((t[tileD].solid == false) and (n.ptile != tileD)) {
rdir = 1;
rf = n.r + rdir;
tilerf = (("t_" + rf) + "_") + n.c;
}
}
}
}
if (cdir != 0) {
if ((t[tilecf].solid == false) and (n.ptile != tilecf)) {
var mc = true;
n.lastMove = "c";
} else if ((t[tilecb].solid == false) and (n.ptile != tilecb)) {
var recC = true;
}
}
if (rdir != 0) {
if ((t[tilerf].solid == false) and (n.ptile != tilerf)) {
var mr = true;
n.lastMove = "r";
} else if ((t[tilerb].solid == false) and (n.ptile != tilerb)) {
var recR = true;
}
}
if ((recC == true) and (recR == true)) {
if (n.lastMove == "c") {
var mc = true;
cdir = cdir * -1;
} else {
var mr = true;
rdir = rdir * -1;
}
} else if (recC == true) {
var mc = true;
cdir = cdir * -1;
n.lastMove = "c";
} else if (recR == true) {
var mr = true;
rdir = rdir * -1;
n.lastMove = "r";
}
if ((mr != true) and (mc != true)) {
var dr = (t.tiles[n.ptile].r - n.r);
if (dr != 0) {
var mr = true;
var rdir = dr;
n.lastMove = "r";
} else {
var dc = (t.tiles[n.ptile].c - n.c);
if (dc != 0) {
var mc = true;
var cdir = dc;
n.lastMove = "c";
}
}
}
var rand = random(110);
if (rand == 0) {
var dir = random(2);
if (dir == 0) {
dir = -1;
}
n.cdir = dir;
var dir = random(2);
if (dir == 0) {
dir = -1;
}
n.rdir = dir;
n.randMove = true;
}
} else {
mc = true;
mr = true;
cdir = n.cdir;
rdir = n.rdir;
n.randMoveT++;
if (n.randMoveT == n.randMoveD) {
n.randMove = false;
n.randMoveT = 0;
}
}
if (mc == true) {
n.mx = n.mx + (cdir * n.acc);
}
if (mr == true) {
n.my = n.my + (rdir * n.acc);
}
};
this.cKO = function (n, who, col) {
var t = this;
t.attachMovie("ko", "ko" + t.kod, t.kod);
var k = t["ko" + t.kod];
var frame = (col + who);
k.gotoAndStop(frame);
k._x = n._x;
k._y = n._y;
k._rotation = n._rotation;
t.addD("ko");
if (t.globalsoundcontrol == "play") {
t.snowD.stop();
t.snowD.start();
}
};
this.moveObj = function (n) {
var t = this;
if (Math.abs(n.mx) > n.mmx) {
if (n.mx > 0) {
n.mx = n.mmx;
} else {
n.mx = -n.mmx;
}
}
if (Math.abs(n.my) > n.mmy) {
if (n.my > 0) {
n.my = n.mmy;
} else {
n.my = -n.mmy;
}
}
n._x = n._x + n.mx;
n._y = n._y + n.my;
n.mx = n.mx * t.f;
n.my = n.my * t.f;
if (t.globalsoundcontrol == "play") {
if ((n.mx != 0) or (n.my != 0)) {
n.snowT++;
if (n.snowT == n.snowD) {
n.snowT = 0;
var pick = (random(2) + 1);
t["snow" + pick].stop();
t["snow" + pick].start();
n.snowD = random(10) + 10;
}
} else {
n.snowT = 0;
}
}
n.shad._rotation = -n._rotation;
if (Math.abs(n.mx) < 0.05) {
n.mx = 0;
}
if (Math.abs(n.my) < 0.05) {
n.my = 0;
}
if (n._name == "char") {
var ch = n.char;
} else {
var ch = n.enemy.char;
}
if (n.throwMode == false) {
if ((n.mx != 0) or (n.my != 0)) {
ch.gotoAndStop("walk");
} else {
ch.gotoAndStop("stand");
}
} else {
ch.gotoAndStop("charge");
}
if ((n._x - n.w2) < 0) {
n._x = n.w2;
n.mx = 0;
} else if ((n._x + n.w2) > t.stageW) {
n._x = t.stageW - n.w2;
n.mx = 0;
}
if ((n._y - n.h2) < 0) {
n._y = n.h2;
n.my = 0;
} else if ((n._y + n.h2) > t.stageH) {
n._y = t.stageH - n.h2;
n.my = 0;
}
var tile = t.getTile(n);
if (tile != n.tile) {
n.ptile = n.tile;
}
n.tile = tile;
if (t[n.tile].solid == true) {
t.testHit(n, n._x, n._y, n.r, n.c);
}
if (n._x < t.tiles[n.tile].cx) {
var c2 = (n.c - 1);
} else {
var c2 = (n.c + 1);
}
var tile2 = ((("t_" + n.r) + "_") + c2);
if (t[tile2].solid == true) {
t.testHit(n, n._x, n._y, n.r, c2);
}
if (n._y < t.tiles[n.tile].cy) {
var r2 = (n.r - 1);
} else {
var r2 = (n.r + 1);
}
var tile2 = ((("t_" + r2) + "_") + n.c);
if (t[tile2].solid == true) {
t.testHit(n, n._x, n._y, r2, n.c);
}
n.hit = false;
};
this.testHit = function (n, x, y, r, c) {
var t = this;
var tile = t.tiles[(("t_" + r) + "_") + c];
var dx = (x - tile.cx);
var dy = (y - tile.cy);
var adx = Math.abs(x - tile.cx);
var ady = Math.abs(y - tile.cy);
var px = (n.dx - adx);
var py = (n.dy - ady);
if (adx < n.dx) {
if (ady < n.dy) {
if (px < py) {
var axis = "x";
if (dx > 0) {
var c2 = (c + 1);
var tile2 = t[(("t_" + r) + "_") + c2];
if (tile2.solid == true) {
var axis = "y";
}
} else {
var c2 = (c - 1);
var tile2 = t[(("t_" + r) + "_") + c2];
if (tile2.solid == true) {
var axis = "y";
}
}
} else {
var axis = "y";
if (dy > 0) {
var r2 = (r + 1);
var tile2 = t[(("t_" + r2) + "_") + c];
if (tile2.solid == true) {
var axis = "x";
}
} else {
var r2 = (r - 1);
var tile2 = t[(("t_" + r2) + "_") + c];
if (tile2.solid == true) {
var axis = "x";
}
}
}
if (axis == "x") {
if (x < tile.cx) {
n._x = x - px;
n.mx = 0;
} else {
n._x = x + px;
n.mx = 0;
}
} else if (y < tile.cy) {
n._y = y - py;
n.my = 0;
} else {
n._y = y + py;
n.my = 0;
}
n.hit = true;
}
}
};
this.createEmptyMovieClip("loop", 10000000);
this.loop = new Sound(loop);
this.loop.attachSound("loop");
this.loop.start();
this.loop.onSoundComplete = function () {
this.start();
};
this.initLoopVolume = (this.loopvolume = 60);
this.loop.setVolume(this.initLoopVolume);
this.createEmptyMovieClip("snowD", 10000001);
this.snowD = new Sound(snowD);
this.snowD.attachSound("snow1");
this.snowD.setVolume(70);
this.createEmptyMovieClip("snow1", 10000002);
this.snow1 = new Sound(snow1);
this.snow1.attachSound("snow1");
this.snow1.setVolume(17);
this.createEmptyMovieClip("snowMan", 10000003);
this.snowMan = new Sound(snowMan);
this.snowMan.attachSound("snow1");
this.snowMan.setVolume(70);
this.createEmptyMovieClip("snow2", 10000004);
this.snow2 = new Sound(snow2);
this.snow2.attachSound("snow2");
this.snow2.setVolume(16);
this.createEmptyMovieClip("splash", 10000005);
this.splash = new Sound(splash);
this.splash.attachSound("splash");
this.splash.setVolume(80);
this.createEmptyMovieClip("hitS", 10000006);
this.hitS = new Sound(hitS);
this.hitS.attachSound("hitS");
this.hitS.setVolume(70);
this.createEmptyMovieClip("thunk", 10000007);
this.thunk = new Sound(thunk);
this.thunk.attachSound("thunk");
this.thunk.setVolume(40);
this.globalsoundcontrol = "play";
this.fade = "in";
this.clearAll = function () {
var t = this;
t.tiles.removeMovieClip();
var i = (t.enemyA.length - 1);
while (i >= 0) {
var n = t.enemyA[i];
n.removeMovieClip();
t.enemyA.splice(i, 1);
i--;
}
var i = (t.teamA.length - 1);
while (i >= 0) {
var n = t.teamA[i];
n.removeMovieClip();
t.teamA.splice(i, 1);
i--;
}
var i = (t.sbA.length - 1);
while (i >= 0) {
var n = t.sbA[i];
n.removeMovieClip();
t.sbA.splice(i, 1);
i--;
}
var i = (t.obstacleA.length - 1);
while (i >= 0) {
var n = t.obstacleA[i];
n.removeMovieClip();
t.obstacleA.splice(i, 1);
i--;
}
};
this.createEmptyMovieClip("actions", 1);
Key.addListener(this.actions);
this.actions.onKeyDown = function () {
var p = this._parent;
if (Key.isDown(76) and Key.isDown(73)) {
if (p.typing == false) {
p.clearSO();
}
}
if (Key.isDown(p.pkey)) {
if (p.gamePlay == true) {
if (p.gameMode != "help") {
if (p.pause == false) {
_quality = "high";
p.pause = true;
p.fade = "out";
p.pauseDisplay.gotoAndStop("pause");
} else {
_quality = p.inGameQuality;
p.pause = false;
if (p.globalsoundcontrol == "play") {
p.fade = "in";
}
p.pauseDisplay.gotoAndStop("blank");
}
}
}
}
if (Key.isDown(p.mkey)) {
if (p.typing == false) {
if (p.globalsoundcontrol == "play") {
p.globalsoundcontrol = "stop";
p.fade = "out";
} else if (p.globalsoundcontrol == "stop") {
p.globalsoundcontrol = "play";
p.fade = "in";
}
}
}
};
Mouse.addListener(this.actions);
this.actions.onMouseDown = function () {
var p = this._parent;
p.mouseIsDown = true;
if ((p.gamePlay == true) and (p.pause == false)) {
if (p.youDead == false) {
var c = p.char;
if (c.numsb > 0) {
c.charge = true;
c.throwMode = true;
c.char.gotoAndStop("charge");
c.char.anim.gotoAndPlay(1);
c.pm.gotoAndStop("charge");
}
}
}
if (p.gameMode == "map") {
var r = Math.floor(p._ymouse / p.tileH);
var col = Math.floor(p._xmouse / p.tileW);
if ((r != 0) and (r != 19)) {
var tile = ((("t_" + r) + "_") + col);
p.tiles[tile].graphic.gotoAndStop(p.mapTile);
}
}
};
this.actions.onMouseUp = function () {
var p = this._parent;
p.mouseIsDown = false;
if ((p.gamePlay == true) and (p.pause == false)) {
if (p.youDead == false) {
var c = p.char;
if (c.charge == true) {
c.launch = true;
}
}
}
};
this.actions.onMouseMove = function () {
var p = this._parent;
if (p.mouseIsDown == true) {
if (p.gameMode == "map") {
var r = Math.floor(p._ymouse / p.tileH);
var col = Math.floor(p._xmouse / p.tileW);
if ((r != 0) and (r != 19)) {
var tile = ((("t_" + r) + "_") + col);
p.tiles[tile].graphic.gotoAndStop(p.mapTile);
}
}
}
};
this.actions.onEnterFrame = function () {
var p = this._parent;
p.mouseP._x = p._xmouse;
p.mouseP._y = p._ymouse;
if (p.fade == "in") {
if (p.loopvolume < p.initLoopVolume) {
p.loopvolume = p.loopvolume + 5;
p.loop.setVolume(p.loopvolume);
} else if (p.loopvolume > p.initLoopVolume) {
p.loopvolume = p.initLoopVolume;
p.loop.setVolume(p.loopvolume);
}
} else if (p.fade == "out") {
if (p.loopvolume > 0) {
p.loopvolume = p.loopvolume - 5;
p.loop.setVolume(p.loopvolume);
} else if (p.loopvolume < 0) {
p.loopvolume = 0;
p.loop.setVolume(p.loopvolume);
}
}
if ((p.gamePlay == true) and (p.pause == false)) {
if (p.youDead == false) {
var c = p.char;
if (Key.isDown(p.lkey) or Key.isDown(p.lkey2)) {
if (p.controlMode == "absolute") {
c.mx = c.mx - c.acc;
} else {
var ang = ((c._rotation - 90) * p.rc);
c.mx = c.mx + (c.acc * Math.cos(ang));
c.my = c.my + (c.acc * Math.sin(ang));
}
} else if (Key.isDown(p.rkey) or Key.isDown(p.rkey2)) {
if (p.controlMode == "absolute") {
c.mx = c.mx + c.acc;
} else {
var ang = ((c._rotation + 90) * p.rc);
c.mx = c.mx + (c.acc * Math.cos(ang));
c.my = c.my + (c.acc * Math.sin(ang));
}
}
if (Key.isDown(p.ukey) or Key.isDown(p.ukey2)) {
if (p.controlMode == "absolute") {
c.my = c.my - c.acc;
} else {
var ang = (c._rotation * p.rc);
c.mx = c.mx + (c.acc * Math.cos(ang));
c.my = c.my + (c.acc * Math.sin(ang));
}
} else if (Key.isDown(p.dkey) or Key.isDown(p.dkey2)) {
if (p.controlMode == "absolute") {
c.my = c.my + c.acc;
} else {
var ang = ((c._rotation + 180) * p.rc);
c.mx = c.mx + (c.acc * Math.cos(ang));
c.my = c.my + (c.acc * Math.sin(ang));
}
}
if ((c.charge != true) and (c.numsb < p.numSB)) {
c.build = true;
c.bm.gotoAndStop("charge");
} else if (c.build == true) {
c.build = false;
c.bm.gotoAndStop("blank");
}
p.charM();
}
p.sbM();
p.compM("team");
p.compM("enemy");
}
};
this.quit = function () {
var t = this;
t.char._x = -100;
_quality = "high";
t.mouseP.gotoAndStop("mitten");
Mouse.hide();
t.gameDisplay.gotoAndStop("blank");
t.help.gotoAndStop("blank");
t.ready.gotoAndStop("blank");
t.pauseDisplay.gotoAndStop("blank");
if ((t.gameMode == "custom") or (t.gameMode == "map")) {
t.mainDisplay.gotoAndStop("setUp");
} else if (t.gameMode == "help") {
t.mainDisplay.gotoAndStop("title");
}
if ((t.pause == true) or (t.editIndex != "")) {
t.gameOptions.gotoAndStop("custom");
this.toggleGameSetUpBtns(false);
}
t.gamePlay = false;
t.pause = false;
t.gameMode = "";
t.resetVars();
t.clearAll();
};
this.changeLevel = function (map) {
var t = this;
t.resetVars();
t.clearAll();
t.generateMap(map);
t.setChar(1, 1);
t.initEnemy(t.numE);
t.initTeam(t.numT);
t.gamePlay = false;
t.pause = false;
t.winner = "";
t.gameDisplay.gotoAndStop("show");
t.gameDisplay.lives.gotoAndStop(t.char.lives + 1);
t.gameDisplay.sbcounter.gotoAndStop(t.char.numsb + 1);
if (t.gameMode == "custom") {
t.ready.gotoAndPlay("start");
} else if (t.gameMode == "help") {
t.help.gotoAndStop("start");
}
t.pauseDisplay.gotoAndStop("blank");
t.gameOptions.gotoAndStop("blank");
t.mainDisplay.gotoAndStop("blank");
_quality = "high";
t.snow2.stop();
t.mouseP.gotoAndStop("aim");
Mouse.show();
};
Symbol 758 MovieClip Frame 41
stop();