Frame 1
var strAdCode;
var battleonurl;
var downloadurl;
strAdCode = "c4a733314aed7eb75d04281596c1c6304";
battleonurl = "http://www.battleon.com/default.asp?" + strAdCode;
downloadurl = "http://www.battleon.com/downloads/default.asp?" + strAdCode;
Stage.scaleMode = "noScale";
var contextMenu = new ContextMenu();
contextMenu.builtInItems.play = false;
contextMenu.builtInItems.loop = false;
contextMenu.builtInItems.rewind = false;
contextMenu.builtInItems.forward_back = false;
_root.menu = contextMenu;
var engine = new NinjaEngine();
_quality = "HIGH";
Instance of Symbol 185 MovieClip in Frame 1
//component parameters
onClipEvent (construct) {
strTitle = "Ninja Assault";
strSubTitle = "Silent but Deadly";
strFrame = "Intro";
}
Frame 9
stop();
Frame 16
txtTerms.html = true;
txtTerms.htmlText = "By clicking Play, I agree to the <b>Terms & Conditions.</b>";
Frame 20
stopAllSounds();
playSound("holy");
stop();
Frame 21
stop();
Frame 28
stop();
Frame 37
stop();
Frame 46
_root.engine.setScore();
stop();
Frame 56
stop();
Frame 64
stop();
Frame 73
stop();
Symbol 1 MovieClip [FUIComponentSymbol] Frame 1
#initclip 2
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 _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
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 _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
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, _local4);
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 _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((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 || (!_local16)) {
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 _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
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 _local4 = new Color(skinMCRef);
_local4.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 _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 14 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 24 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, "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 34 MovieClip [UpArrow] Frame 1
stop();
Symbol 34 MovieClip [UpArrow] Frame 2
stop();
Symbol 34 MovieClip [UpArrow] Frame 3
stop();
Symbol 41 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 48 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 53 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 54 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 62 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 70 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 78 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 79 MovieClip [DownArrow] Frame 1
stop();
Symbol 79 MovieClip [DownArrow] Frame 2
stop();
Symbol 79 MovieClip [DownArrow] Frame 3
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 90 MovieClip [HolySpell] Frame 15
stop();
this.removeMovieClip();
Symbol 105 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 50
stop();
Symbol 118 MovieClip Frame 2
gotoAndPlay ("Walk");
Symbol 118 MovieClip Frame 24
monsterAttackCheck();
Symbol 118 MovieClip Frame 25
gotoAndPlay ("Walk");
Symbol 118 MovieClip Frame 42
monsterAttack();
Symbol 118 MovieClip Frame 43
monsterAttack();
Symbol 118 MovieClip Frame 44
monsterAttack();
Symbol 118 MovieClip Frame 52
gotoAndPlay ("Walk");
Symbol 118 MovieClip Frame 107
_root.engine.resetEnemy(this);
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 18
gotoAndPlay ("Walk");
Symbol 131 MovieClip Frame 48
gotoAndPlay ("Walk");
Symbol 131 MovieClip Frame 110
_root.engine.resetEnemy(this);
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 12
stop();
Symbol 163 MovieClip Frame 37
monsterAttackCheck();
Symbol 163 MovieClip Frame 39
gotoAndPlay ("Walk");
Symbol 163 MovieClip Frame 48
monsterAttack();
Symbol 163 MovieClip Frame 59
gotoAndPlay ("Walk");
Symbol 163 MovieClip Frame 67
gotoAndPlay ("Walk");
Symbol 163 MovieClip Frame 78
_root.playSound("bomb");
Symbol 163 MovieClip Frame 79
monsterAttack();
Symbol 163 MovieClip Frame 85
_root.engine.resetEnemy(this);
stop();
Symbol 163 MovieClip Frame 145
_root.engine.resetEnemy(this);
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 9
monsterAttackCheck();
Symbol 172 MovieClip Frame 47
gotoAndPlay ("Walk");
Symbol 172 MovieClip Frame 48
gotoAndPlay ("Walk");
Symbol 172 MovieClip Frame 90
monsterAttack();
Symbol 172 MovieClip Frame 95
gotoAndPlay ("Walk");
Symbol 172 MovieClip Frame 130
stop();
Symbol 172 MovieClip Frame 148
die();
Symbol 173 MovieClip [mcEnemies] Frame 1
stop();
Symbol 173 MovieClip [mcEnemies] Frame 2
stop();
Symbol 173 MovieClip [mcEnemies] Frame 3
stop();
Symbol 173 MovieClip [mcEnemies] Frame 4
stop();
Symbol 173 MovieClip [mcEnemies] Frame 5
stop();
Symbol 176 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 177 MovieClip [FScrollBarSymbol] Frame 1
#initclip 3
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 _local2 = 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;
_local2 = Math.min(_local2, this.maxPos);
this.setScrollPosition(Math.max(_local2, 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 _local3 = this.enable;
if (enabledFlag && (!_local3)) {
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) && (_local3)) {
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 _local3 = this.smallScroll;
if (inc != "one") {
_local3 = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var _local2 = this.getScrollPosition() + (mode * _local3);
if (_local2 > this.maxPos) {
_local2 = this.maxPos;
} else if (_local2 < this.minPos) {
_local2 = this.minPos;
}
this.setScrollPosition(_local2);
};
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 _local2 = this.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (this._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.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 _local3 = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxhscroll));
} else {
var _local3 = this.textField.scroll;
var _local2 = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(_local2, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(_local3, 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 179 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 15
gotoAndPlay (1);
Symbol 185 MovieClip Frame 1
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_parent.loaded = true;
_parent.status = "Ready";
_parent.gotoAndStop(strFrame);
} else {
strLoad.text = ("Loading " + String(Math.ceil((_root.getBytesLoaded() * 100) / _root.getBytesTotal()))) + "%";
}
Symbol 185 MovieClip Frame 2
gotoAndPlay (1);
Symbol 489 MovieClip [__Packages.NinjaEngine] Frame 0
class NinjaEngine
{
var _intHighScoreLevel, _arrHighScore, _strShurikenTarget, _intWalkSpeed, _intSpeed, _intMonsterSpeed, _intMonster, _intLevel, _intHP, _intMaxHP, _intGold, _aEnemies, _flagDracolich, _intHealthPotions, _intBlastPotions, _intGoldBonus, _intExpBonus, _intWeaponFrame, _intMaxMonsterAllowed, _bitUnvulnerable, _bitGameActive, _bitGameOver, _intExp, _intMaxExp, _intMonsterCount, _intMonsterTimer, _intStopGameTimer, _intEndGameTimer, _intMissTimer;
function NinjaEngine () {
_intHighScoreLevel = 0;
var _local7 = new Object();
Key.addListener(_local7);
_local7.onKeyDown = function () {
if ((_root.engine.bitGameActive && (Key.isDown(32))) && (!_root.game.mcPlayer.isLocked)) {
_root.engine.onClick("Attack3");
}
};
var _local5 = Array("Artix Krieger", "Zhoom", "Twilly", "Jergal", "Warlic", "Cysero", "Safiria", "Galanoth", "J", "Zorbak");
_arrHighScore = new Array();
var _local6 = _local5.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local4 = roll(0, _local5.length - 1);
_arrHighScore[_local3] = new Object();
_arrHighScore[_local3].name = _local5.splice(_local4, 1)[0];
_arrHighScore[_local3].level = Math.floor(_local3 * 1.5);
_local3++;
}
resetGame();
}
function resetGame() {
_strShurikenTarget = null;
_intWalkSpeed = 48;
_intSpeed = 2;
_intMonsterSpeed = 1;
_intMonster = 0;
_intLevel = 0;
_intHP = 100;
_intMaxHP = 100;
_intGold = 0;
_aEnemies = new Array();
_flagDracolich = false;
_intHealthPotions = 0;
_intBlastPotions = 0;
_intGoldBonus = 1;
_intExpBonus = 1;
_intWeaponFrame = 1;
_intMaxMonsterAllowed = 5;
_bitUnvulnerable = false;
_bitGameActive = false;
_bitGameOver = false;
levelUp();
}
function get strShurikenTarget() {
return(_strShurikenTarget);
}
function get bitGameActive() {
return(_bitGameActive);
}
function get intSpeed() {
return(_intSpeed);
}
function get intLevel() {
return(_intLevel);
}
function get intGold() {
return(_intGold);
}
function get intExp() {
return(_intExp);
}
function get intMaxExp() {
return(_intMaxExp);
}
function get intWeaponFrame() {
return(_intWeaponFrame);
}
function decrementMonsterCount() {
_intMonsterCount--;
}
function set strShurikenTarget(strName) {
_strShurikenTarget = strName;
//return(strShurikenTarget);
}
function addGold(intX) {
_intGold = _intGold + intX;
}
function buyHealthPotion(intGold) {
if (_intHealthPotions < 2) {
_root.playSound("coins");
_intHealthPotions++;
_intGold = _intGold - intGold;
}
}
function buyBlastPotion(intGold) {
if (_intBlastPotions < 2) {
_root.playSound("coins");
_intBlastPotions++;
_intGold = _intGold - intGold;
}
}
function buyWeapon(intFrame, intGold) {
_intWeaponFrame = intFrame;
_intGold = _intGold - intGold;
_root.game.mcPlayer.mcSword.gotoAndStop(intFrame);
}
function setBonus(intGoldBonus, intExpBonus) {
_intGoldBonus = intGoldBonus;
_intExpBonus = intExpBonus;
}
function addEnemy(str) {
_aEnemies.push(str);
}
function dieDracolich() {
_flagDracolich = false;
}
function useHealthPotion() {
if (_root.engine.bitGameActive && (_intHealthPotions > 0)) {
_root.playSound("holy");
_intHealthPotions--;
_intHP = _intMaxHP;
refreshHPBar();
checkPotions();
}
}
function useBlastPotion() {
if (_root.engine.bitGameActive && (_intBlastPotions > 0)) {
_intBlastPotions--;
var _local4 = new Object();
_local4._x = 100;
_local4._y = 200;
var _local5 = _root.game.attachMovie("HolySpell", "HolySpell", _root.game.getNextHighestDepth(), _local4);
for (var _local3 in _root.game.mcMonsters) {
if (_root.game.mcMonsters[_local3].mcChild.isMonster) {
_root.game.mcMonsters[_local3].mcChild.monsterHit();
}
}
_intMonsterCount = 0;
checkPotions();
}
}
function hitPlayer(intX) {
if (!_bitUnvulnerable) {
_root.playSound("hit");
_root.game.mcPlayer.isLocked = true;
_root.game.mcPlayer.bitPlayOverride = true;
_intHP = _intHP - intX;
if (_intHP <= 0) {
_intHP = 0;
_root.playSound("death", "music");
_root.game.mcPlayer.gotoAndPlay("Death");
endGame();
} else {
_root.game.mcPlayer.gotoAndPlay("Hit");
}
refreshHPBar();
}
}
function startGame() {
_root.game.btnScene.enabled = false;
_root.game.mcPlayer.bitPlayOverride = false;
_root.game.mcGoldExp._visible = false;
_root.game.mcHighScore._visible = false;
_root.game.mcLevel.gotoAndPlay("Ready");
_root.game.mcLevel._visible = true;
}
function levelUp() {
switch (++_intLevel) {
case 1 :
_intMaxExp = 100;
_root.game.txtTip.text = "Tip: Click on the monster to attack, and push <Spacebar> to Jump Attack.";
break;
case 2 :
_intMaxExp = 200;
_root.game.txtTip.text = "Tip: Do not use jump attacks on Sumo Pandas... they will explode!";
break;
case 3 :
_intMaxExp = 500;
_root.game.txtTip.text = "Tip: Dragons like eating humans... not really a tip... sucks to be you.";
break;
case 4 :
_intMaxExp = 800;
_root.game.txtTip.text = "Tip: Only a good jump attack in the face can repel those annoying dragons!";
break;
default :
_intMaxExp = 1000;
_root.game.txtTip.text = "";
if ((_intLevel % 2) != 1) {
break;
}
_intMaxMonsterAllowed++;
}
_intMonsterCount = 0;
_intExp = 0;
_flagDracolich = false;
}
function continueGame() {
_quality = "MEDIUM";
_root.game.mcLevel._visible = false;
_root.game.mcHPBar.txtLevel.text = _intLevel.toString();
updateGoldExp();
checkPotions();
_root.playSound("music", "music");
_root.game.mcPlayer.isLocked = false;
_root.game.mcPlayer.gotoAndPlay("Walk");
_bitGameActive = true;
startScrolling();
initMonsters();
attachMonster();
}
function stopGame() {
_bitGameActive = false;
clearInterval(_intMonsterTimer);
disappearMonsters();
_intStopGameTimer = setInterval(this, "gotoShop", 2000);
}
function gotoShop() {
if (!_bitGameOver) {
_root.playSound("holy", "music");
stopScrolling();
_root.game.mcPlayer.bitPlayOverride = true;
_root.game.mcPlayer.gotoAndStop("Idle");
levelUp();
if (_intLevel > 15) {
_root.game.mcLevel.gotoAndStop("Level15");
} else {
_root.game.mcLevel.gotoAndStop("Level");
}
_root.game.mcLevel._visible = true;
_quality = "HIGH";
updateAfterEvent();
}
clearInterval(_intStopGameTimer);
}
function disappearMonsters() {
for (var _local2 in _root.game.mcMonsters) {
if (_root.game.mcMonsters[_local2].mcChild.isMonster) {
_root.engine.disappear(_root.game.mcMonsters[_local2].mcChild, 8);
}
}
}
function endGame() {
_bitGameOver = true;
_bitGameActive = false;
_bitUnvulnerable = true;
clearInterval(_intStopGameTimer);
clearInterval(_intMonsterTimer);
disappearMonsters();
_intEndGameTimer = setInterval(this, "askName", 3333.33333333333);
}
function askName() {
clearInterval(_intEndGameTimer);
stopScrolling();
_quality = "HIGH";
_root.playSound("holy", "music");
if (_intLevel > _intHighScoreLevel) {
_intHighScoreLevel = _intLevel;
_root.game.mcLevel.gotoAndPlay("HighScore");
_root.game.mcLevel._visible = true;
} else {
gotoHighScore();
}
updateAfterEvent();
}
function gotoHighScore(strName) {
if ((typeof(strName) == "string") && (strName != "")) {
var _local2 = getIndexToInsert();
if (_arrHighScore[_local2].name != strName) {
insertAt(_local2, strName, _intLevel);
}
}
gotoAndPlay ("HighScores");
resetGame();
}
function getIndexToInsert() {
var _local2 = 0;
while (_local2 < _arrHighScore.length) {
if (_arrHighScore[_local2].level > _intLevel) {
return(_local2);
}
_local2++;
}
return(-1);
}
function insertAt(intIndex, strName, intLevel) {
var _local2 = new Object();
_local2.name = strName;
_local2.level = intLevel;
if (intIndex == -1) {
_arrHighScore.push(_local2);
} else {
_arrHighScore.splice(intIndex, 0, _local2);
}
}
function setScore() {
_root.txtName.htmlText = "";
_root.txtLevel.htmlText = "";
var _local3 = _arrHighScore.length - 1;
var _local4 = 0;
while (_local4 < 10) {
_root.txtName.htmlText = _root.txtName.htmlText + (_arrHighScore[_local3].name + "<br>");
_root.txtLevel.htmlText = _root.txtLevel.htmlText + (_arrHighScore[_local3].level + "<br>");
_local3--;
_local4++;
}
}
function attack(strType) {
var _local4 = false;
var _local3;
for (var _local6 in _root.game.mcMonsters) {
_local3 = _root.game.mcMonsters[_local6].mcChild;
if (_local3.isDead == false) {
if (_root.game.mcPlayer.mcSwoosh.hitTest(_local3)) {
_local3.monsterHit(strType);
_local4 = true;
}
}
}
if (!_local4) {
_root.playSound("miss");
if (strType == "bottom") {
_root.game.mcPlayer.bitPlayOverride = true;
_root.game.mcPlayer.gotoAndPlay("Miss");
_intMissTimer = setInterval(this, "doneMiss", 333.333333333333);
}
}
}
function doneMiss() {
clearInterval(_intMissTimer);
_root.game.mcPlayer.gotoAndPlay("Walk");
}
function showGoldExp(intG, intE) {
_intExp = _intExp + intE;
_intGold = _intGold + intG;
_root.game.mcGoldExp.mcGoldExpText.strGold.text = ("+ " + intG.toString(10)) + " Gold";
_root.game.mcGoldExp.mcGoldExpText.strExp.text = ("+ " + intE.toString(10)) + " Exp";
_root.game.mcGoldExp.mcGoldExpText.strExp2.text = ("+ " + intE.toString(10)) + " Exp";
_root.game.mcGoldExp._visible = true;
_root.game.mcGoldExp.gotoAndPlay(1);
}
function getPos(mcSource, mcNew) {
var _local1 = new Object();
_local1.x = mcSource._x;
_local1.y = mcSource._y;
mcSource._parent.localToGlobal(_local1);
if (mcNew != undefined) {
mcNew.globalToLocal(_local1);
}
return(_local1);
}
function startScrolling() {
_root.game.btnScene.enabled = false;
_root.game.mcBack1.onEnterFrame = function () {
this._x = this._x - _root.engine.intSpeed;
var _local3 = _root.engine.getPos(this);
if (_local3.x <= 0) {
this._x = 891.5;
}
};
_root.game.mcBack2.onEnterFrame = function () {
this._x = this._x - (_root.engine.intSpeed / 4);
var _local3 = _root.engine.getPos(this);
if (_local3.x <= 0) {
this._x = 894;
}
};
}
function stopScrolling() {
delete _root.game.mcBack1.onEnterFrame;
delete _root.game.mcBack2.onEnterFrame;
}
function roll(intMin, intMax) {
return(Number(Math.round(Math.random() * (intMax - intMin)) + intMin));
}
function setColor(mcTarget, intPercent) {
var _local2 = new Color(mcTarget);
var _local1 = new Object();
_local1.ra = intPercent;
_local1.rb = 0;
_local1.ga = intPercent;
_local1.gb = 0;
_local1.ba = 100;
_local1.bb = 0;
_local1.aa = 100;
_local1.ab = 0;
_local2.setTransform(_local1);
return(mcTarget);
}
function refreshHPBar() {
_root.game.mcHPBar.movHP.base._xscale = (_intHP / _intMaxHP) * 100;
}
function updateGoldExp() {
_root.game.mcHPBar.txtGold.text = _intGold.toString();
_root.game.mcHPBar.txtExp.text = (_intExp.toString() + "/") + _intMaxExp.toString();
}
function checkPotions() {
_root.game.btnHealthPotion._visible = _intHealthPotions > 0;
_root.game.btnBlastPotion._visible = _intBlastPotions > 0;
}
function initMonsters(Void) {
_aEnemies = new Array();
var _local5 = new Object();
_local5._x = 0;
_local5._y = 0;
var _local4;
var _local3 = 0;
while (_local3 <= (_intMaxMonsterAllowed + 2)) {
_local4 = _root.game.mcMonsters.attachMovie("mcEnemies", "mcEnemy" + _local3, _root.game.mcMonsters.getNextHighestDepth(), _local5);
_local4.gotoAndStop(1);
addEnemy(_local4._name);
_local3++;
}
}
function resetEnemy(mc) {
if (((mc.nXStep <= mc.nDuration) || (mc.nYStep <= mc.nDuration)) && (mc.onMove)) {
addEnemy(mc._parent._name);
stopWalking(mc);
mc._parent.gotoAndStop(1);
}
}
function destructEnemies(Void) {
for (var _local2 in _root.game.mcMonsters) {
if ((typeof(_root.game.mcMonsters[_local2]) == "movieclip") && (_local2 != "mcMonPlaceHolder")) {
_root.game.mcMonsters[_local2].removeMovieClip();
}
}
}
function walkTo(mc, xEnd, yEnd) {
mc.xDep = mc._x;
mc.yDep = mc._y;
var _local4;
if (mc._name.indexOf("mcStar") == 0) {
_local4 = Math.round((xEnd - mc.xDep) / 100);
} else if (!mc.isDead) {
_local4 = mc.intSpeed;
} else {
_local4 = _intWalkSpeed;
}
mc.xTar = xEnd;
mc.yTar = yEnd;
mc.nDuration = Math.round((Math.sqrt(Math.pow(xEnd - mc._x, 2) + Math.pow(yEnd - mc._y, 2)) * _local4) / 100);
mc.nXStep = 0;
mc.nYStep = 0;
if (!mc.onMove) {
mc.onMove = true;
mc.gotoAndPlay("Walk");
}
mc.onEnterFrame = function () {
if (((this.nXStep <= this.nDuration) || (this.nYStep <= this.nDuration)) && (this.onMove)) {
var _local4 = this._x;
var _local3 = this._y;
this._x = (((this.xTar - this.xDep) * this.nXStep) / this.nDuration) + this.xDep;
this._y = (((this.yTar - this.yDep) * this.nYStep) / this.nDuration) + this.yDep;
if (this.nXStep <= this.nDuration) {
this.nXStep++;
}
if (this.nYStep <= this.nDuration) {
this.nYStep++;
}
} else {
delete this.onEnterFrame;
this.onMove = false;
if (this._name.indexOf("mcStar") == -1) {
if (!this.isDead) {
_root.engine.decrementMonsterCount();
}
if (!this.removeOverride) {
_root.engine.addEnemy(this._parent._name);
this._parent.gotoAndStop(1);
}
} else {
_root.engine.shurikenDmg();
this.gotoAndStop(1);
this._x = -100;
this._visible = false;
this._rotation = 0;
}
}
if (this.onEnterFrameDisappear != undefined) {
this.onEnterFrameDisappear();
}
};
}
function stopWalking(mc) {
if (mc.onMove) {
delete mc.onEnterFrame;
mc.onMove = false;
mc.gotoAndPlay("Idle");
}
}
function scaleIt(mc, nScale) {
mc._xscale = nScale;
mc._yscale = nScale;
}
function disappear(mc, intSpeed) {
mc.onEnterFrameDisappear = function () {
if (this._alpha > -1) {
this._alpha = this._alpha - intSpeed;
} else {
delete this.onEnterFrameDisappear;
this._parent.gotoAndStop(1);
_root.engine.destructEnemies();
}
};
}
function attachMonster() {
if (_intMonsterCount <= _intMaxMonsterAllowed) {
var _local3;
var _local4 = roll(0, 100);
if (_local4 <= 25) {
_local3 = attachUndeadKnight();
} else if (_local4 <= 50) {
_local3 = attachUndeadEyeball();
} else if ((_local4 <= 75) && (_intLevel >= 2)) {
_local3 = attachUndeadSlime();
} else if ((!_flagDracolich) && (_intLevel >= 3)) {
_local3 = attachUndeadDracolich();
}
_local3.mcChild._alpha = 100;
_local3.mcChild.isDead = false;
_local3.mcChild.isMonster = true;
_local3.mcChild.isDoneAttacking = false;
_local3.swapDepths(_root.game.mcMonsters.getNextHighestDepth());
}
var _local5 = (roll(10, 25) * 1000) / 12;
_intMonsterTimer = setInterval(this, "timeToAttachAnotherMonster", _local5);
}
function timeToAttachAnotherMonster() {
clearInterval(_intMonsterTimer);
attachMonster();
}
function attachUndeadKnight(Void) {
_intMonsterCount++;
var _local3 = _root.game.mcMonsters[_aEnemies[0]];
_aEnemies.shift();
_local3.gotoAndStop(2);
_local3.mcChild._x = _root.game.mcMonsters.mcMonPlaceHolder._x;
_local3.mcChild._y = _root.game.mcMonsters.mcMonPlaceHolder._y;
_local3.mcChild.intExp = Math.ceil(5 * _intExpBonus);
_local3.mcChild.intGold = Math.ceil(roll(1, 20) * _intGoldBonus);
scaleIt(_local3.mcChild, 60);
_local3.mcChild.intSpeed = 16;
_local3.mcChild.intAttackRange = 345;
_local3.mcChild.btn.enabled = true;
_local3.mcChild.btn.onRollOver = function (Void) {
_root.engine.setColor(this._parent, 130);
};
_local3.mcChild.btn.onRollOut = function (Void) {
_root.engine.setColor(this._parent, 100);
};
_local3.mcChild.btn.onPress = function (Void) {
if (_root.engine.bitGameActive && (!_root.game.mcPlayer.isLocked)) {
_root.engine.onClick("Attack1");
}
};
_local3.mcChild.monsterAttackCheck = function () {
if ((!this.isDoneAttacking) && (this._x <= this.intAttackRange)) {
this.gotoAndPlay("Attack");
}
};
_local3.mcChild.monsterAttack = function () {
if (this.mcSwoosh.hitTest(_root.game.mcPlayer)) {
_root.engine.hitPlayer(20);
this.isDoneAttacking = true;
}
};
_local3.mcChild.monsterHit = function (strType) {
_root.engine.decrementMonsterCount();
_root.engine.showGoldExp(this.intGold, this.intExp);
_root.engine.updateGoldExp();
_root.game.mcPlayer.isLocked = false;
if (_root.engine.intExp >= _root.engine.intMaxExp) {
_root.engine.stopGame();
}
delete this.btn.onRollOver;
delete this.btn.onRollOut;
delete this.btn.onPress;
this.btn.enabled = false;
_root.engine.setColor(this, 100);
_root.playSound("hit");
this.isDead = true;
_root.engine.stopWalking(this);
_root.engine.walkTo(this, -60, 320);
this.gotoAndPlay("Death");
};
walkTo(_local3.mcChild, -60, 320);
return(_local3);
}
function attachUndeadSlime(Void) {
_intMonsterCount++;
var _local3 = _root.game.mcMonsters[_aEnemies[0]];
_aEnemies.shift();
_local3.gotoAndStop(4);
_local3.mcChild._x = _root.game.mcMonsters.mcMonPlaceHolder._x;
_local3.mcChild._y = _root.game.mcMonsters.mcMonPlaceHolder._y;
_local3.mcChild.intExp = Math.ceil(7 * _intExpBonus);
_local3.mcChild.intGold = Math.ceil(roll(1, 20) * _intGoldBonus);
scaleIt(_local3.mcChild, 35);
_local3.mcChild.intSpeed = 16;
_local3.mcChild.intAttackRange = 345;
_local3.mcChild.onRollOver = function (Void) {
_root.engine.setColor(this, 130);
};
_local3.mcChild.onRollOut = function (Void) {
_root.engine.setColor(this, 100);
};
_local3.mcChild.onPress = function (Void) {
if (_root.engine.bitGameActive && (!_root.game.mcPlayer.isLocked)) {
_root.engine.onClick("Attack2");
}
};
_local3.mcChild.monsterAttackCheck = function () {
if ((!this.isDoneAttacking) && (this._x <= this.intAttackRange)) {
this.gotoAndPlay("Attack");
}
};
_local3.mcChild.monsterAttack = function () {
if (this.hitTest(_root.game.mcPlayer)) {
_root.engine.hitPlayer(20);
this.isDoneAttacking = true;
}
};
_local3.mcChild.monsterHit = function (strType) {
_root.engine.decrementMonsterCount();
_root.engine.showGoldExp(this.intGold, this.intExp);
_root.engine.updateGoldExp();
_root.game.mcPlayer.isLocked = false;
if (_root.engine.intExp >= _root.engine.intMaxExp) {
_root.engine.stopGame();
}
delete this.onRollOver;
delete this.onRollOut;
delete this.onPress;
_root.engine.setColor(this, 100);
_root.playSound("hit");
this.isDead = true;
_root.engine.stopWalking(this);
_root.engine.walkTo(this, -60, 320);
if (strType == "top") {
this.gotoAndPlay("Asplode");
} else {
this.gotoAndPlay("Death");
}
};
walkTo(_local3.mcChild, -60, 320);
return(_local3);
}
function attachUndeadEyeball(obj) {
_intMonsterCount++;
var _local3 = _root.game.mcMonsters[_aEnemies[0]];
_aEnemies.shift();
_local3.gotoAndStop(3);
_local3.mcChild._x = _root.game.mcMonsters.mcMonPlaceHolder._x;
_local3.mcChild._y = 320;
_local3.mcChild.intExp = Math.ceil(10 * _intExpBonus);
_local3.mcChild.intGold = Math.ceil(roll(10, 40) * _intGoldBonus);
scaleIt(_local3.mcChild, 70);
_local3.mcChild.intSpeed = 16;
_local3.mcChild.intAttackRange = 500;
_local3.mcChild.onRollOver = function (Void) {
_root.engine.setColor(this, 130);
};
_local3.mcChild.onRollOut = function (Void) {
_root.engine.setColor(this, 100);
};
_local3.mcChild.onPress = function (Void) {
if (_root.engine.bitGameActive && (!_root.game.mcPlayer.isLocked)) {
_root.engine.strShurikenTarget = this._parent._name;
_root.engine.onClick("Throw");
}
};
_local3.mcChild.monsterHit = function (strType) {
if (strType == "shuriken") {
_root.engine.decrementMonsterCount();
_root.engine.showGoldExp(this.intGold, this.intExp);
_root.engine.updateGoldExp();
_root.game.mcPlayer.isLocked = false;
if (_root.engine.intExp >= _root.engine.intMaxExp) {
_root.engine.stopGame();
}
delete this.onRollOver;
delete this.onRollOut;
delete this.onPress;
_root.engine.setColor(this, 100);
_root.playSound("hit");
this.isDead = true;
_root.engine.stopWalking(this);
_root.engine.walkTo(this, -60, 320);
this.gotoAndPlay("Death");
}
};
walkTo(_local3.mcChild, -60, 320);
return(_local3);
}
function attachUndeadDracolich(obj) {
_intMonsterCount++;
var _local3 = _root.game.mcMonsters[_aEnemies[0]];
_aEnemies.shift();
_local3.gotoAndStop(5);
_local3.mcChild._x = 700;
_local3.mcChild._y = 370;
_local3.mcChild.intExp = Math.ceil(15 * _intExpBonus);
_local3.mcChild.intGold = Math.ceil(roll(1, 40) * _intGoldBonus);
scaleIt(_local3.mcChild, 90);
_local3.mcChild.intSpeed = 24;
_local3.mcChild.intAttackRange = 480;
_local3.mcChild.removeOverride = true;
_local3.mcChild.monsterAttackCheck = function () {
if ((this._x <= this.intAttackRange) && (this.bitAlt)) {
this.gotoAndPlay("Attack");
this.bitAlt = false;
} else {
this.bitAlt = true;
}
};
_local3.mcChild.monsterAttack = function () {
if (this.hitTest(_root.game.mcPlayer)) {
_root.engine.hitPlayer(50);
this.isDoneAttacking = true;
}
};
_local3.mcChild.monsterHit = function (strType) {
if (strType == "top") {
_root.engine.decrementMonsterCount();
_root.engine.showGoldExp(this.intGold, this.intExp);
_root.engine.updateGoldExp();
_root.game.mcPlayer.isLocked = false;
if (_root.engine.intExp >= _root.engine.intMaxExp) {
_root.engine.stopGame();
}
_root.playSound("hit");
this.isDead = true;
this.gotoAndPlay("Death");
}
};
_local3.mcChild.die = function () {
_root.engine.dieDracolich();
_root.engine.addEnemy(this._parent._name);
this._parent.gotoAndStop(1);
};
walkTo(_local3.mcChild, 450, 370);
_flagDracolich = true;
return(_local3);
}
function onClick(strAttack) {
if (strAttack == undefined) {
strAttack = "Attack2";
}
_root.game.mcPlayer.bitPlayOverride = true;
_root.game.mcPlayer.gotoAndPlay(strAttack);
_root.game.mcPlayer.isLocked = true;
}
function throwShuriken(Void) {
placeShuriken(_root.game.mcStar2);
}
function placeShuriken(mcShuri) {
mcShuri._visible = true;
var _local3 = getPos(_root.game.mcPlayer.mcStar1, _root.game);
mcShuri._x = _local3.x;
mcShuri._y = _local3.y;
var _local5 = _root.game.mcMonsters[_strShurikenTarget].mcChild;
_local3 = getPos(_local5, _root.game);
var _local6 = _local3.y - (_local5._y * (_local5._yscale / 100));
mcShuri._rotation = (Math.atan2(_local6 - mcShuri._y, _local3.x - mcShuri._x) * 180) / Math.PI;
walkTo(mcShuri, _local3.x - _local5._width, _local6);
}
function shurikenDmg(Void) {
var _local2 = _root.game.mcMonsters[_root.engine.strShurikenTarget].mcChild;
_root.engine.strShurikenTarget = null;
_local2.monsterHit("shuriken");
}
}
Symbol 188 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 7
gotoAndPlay ("Walk");
Symbol 256 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Instance of Symbol 232 MovieClip in Symbol 265 MovieClip Frame 1
/* no clip actions */
Symbol 265 MovieClip Frame 2
_root.playSound("music", "music");
Symbol 265 MovieClip Frame 184
_root.playSound("miss");
Symbol 265 MovieClip Frame 202
_root.playSound("firecalm");
Symbol 265 MovieClip Frame 274
_root.playSound("miss");
Symbol 265 MovieClip Frame 284
var sndFadeOut = new Sound(_root.soundFX);
var intMainVol = sndFadeOut.getVolume();
var intVol = intMainVol;
this.onEnterFrame = function (Void) {
this.intVol = sndFadeOut.getVolume();
if (this.intVol >= 5) {
sndFadeOut.setVolume(this.intVol - 5);
} else {
delete this.onEnterFrame;
}
};
Symbol 265 MovieClip Frame 297
_root.playSound("bomb");
Symbol 265 MovieClip Frame 310
delete this.onEnterFrame;
stopAllSounds();
sndFadeOut.setVolume(intMainVol);
_parent.gotoAndPlay("Title");
Symbol 265 MovieClip Frame 311
stop();
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 1
this._visible = false;
_root.objSoundOptions = new Object();
_root.objSoundOptions.bitSoundOn = true;
_root.objSoundOptions.bitMusicOn = true;
_root.objSoundOptions.strSoundTrack = "";
_root.objSoundOptions.strMusic = "wind";
_root.playSound = function (strNoiseName, strType) {
if ((strType == undefined) || (strType.toLowerCase() == "sound")) {
bitPlay = _root.objSoundOptions.bitSoundOn;
} else if (strType.toLowerCase() == "music") {
bitPlay = _root.objSoundOptions.bitMusicOn;
_root.objSoundOptions.strSoundTrack = strNoiseName;
stopAllSounds();
}
if (bitPlay) {
_root.soundFX.gotoAndPlay(strNoiseName.toLowerCase());
}
};
stop();
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 5
stop();
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 11
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 16
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 20
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 26
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 31
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 37
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 42
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 47
gotoAndStop ("Wait");
Symbol 278 MovieClip [TMPg4uypypwhm] Frame 52
gotoAndStop ("Wait");
Symbol 280 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 1
stop();
Symbol 286 Button
on (press) {
playSound("click");
gotoAndPlay ("HowPlay");
}
Symbol 288 Button
on (press) {
playSound("click");
gotoAndPlay ("Options");
}
Symbol 290 Button
on (press) {
playSound("click");
gotoAndPlay ("HighScores");
}
Symbol 292 Button
on (press) {
playSound("click");
gotoAndPlay ("Credits");
}
Symbol 294 Button
on (press) {
playSound("click");
gotoAndStop ("Game");
}
Symbol 298 Button
on (release) {
playSound("click");
gotoAndStop ("Terms");
}
Symbol 303 Button
on (press) {
playSound("click");
gotoAndPlay ("MoreGames");
}
Symbol 307 Button
on (press) {
playSound("click");
gotoAndPlay ("Title");
}
Symbol 314 MovieClip Frame 1
stop();
Instance of Symbol 177 MovieClip [FScrollBarSymbol] in Symbol 314 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "scroller";
horizontal = false;
}
Symbol 315 Button
on (press) {
playSound("click");
getURL (_root.battleonurl, "_blank");
}
Symbol 325 MovieClip Frame 1
stop();
Symbol 326 Button
on (release) {
gotoAndPlay (2);
bitValue = false;
perform();
}
Symbol 328 Button
on (release) {
gotoAndPlay (2);
bitValue = true;
perform();
}
Symbol 329 MovieClip Frame 1
stop();
Symbol 329 MovieClip Frame 2
stop();
Symbol 332 Button
on (press) {
intVolume = intVolume - 10;
if (intVolume <= 0) {
intVolume = 0;
}
fxsound.setVolume(intVolume);
_root.playSound("click");
}
Symbol 334 Button
on (press) {
intVolume = intVolume + 10;
if (intVolume >= 300) {
intVolume = 300;
}
fxsound.setVolume(intVolume);
_root.playSound("click");
}
Symbol 336 MovieClip Frame 1
fxsound = new Sound(_root.SoundFX);
intVolume = fxsound.getVolume();
stop();
Symbol 337 MovieClip Frame 1
stop();
Instance of Symbol 329 MovieClip in Symbol 337 MovieClip Frame 1
onClipEvent (load) {
if (_root.objSoundOptions.bitSoundOn == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
perform = function () {
_root.objSoundOptions.bitSoundOn = bitValue;
if (bitValue == false) {
stopAllSounds();
if ((_root.objSoundOptions.strSoundTrack != null) && (_root.objSoundOptions.bitMusicOn == true)) {
_root.playSound(_root.objSoundOptions.strSoundTrack, "music");
}
}
_root.playSound("click");
};
}
Instance of Symbol 329 MovieClip in Symbol 337 MovieClip Frame 1
onClipEvent (load) {
if (_root.objSoundOptions.bitMusicOn == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
perform = function () {
_root.objSoundOptions.bitMusicOn = bitValue;
if (bitValue == false) {
stopAllSounds();
} else if (_root.objSoundOptions.strSoundTrack != null) {
_root.playSound(_root.objSoundOptions.strSoundTrack, "music");
}
_root.playSound("click");
};
}
Symbol 340 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 9
gotoAndPlay (1);
Symbol 347 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 1
var v = _root.engine.intWeaponFrame;
if (isNan(v) || (v == undefined)) {
v = 1;
}
if (v == 1) {
stop();
} else {
gotoAndStop(v);
}
Symbol 350 MovieClip Frame 2
stop();
Symbol 350 MovieClip Frame 3
stop();
Symbol 350 MovieClip Frame 4
stop();
Symbol 350 MovieClip Frame 5
stop();
Symbol 350 MovieClip Frame 6
stop();
Symbol 368 Button
on (press) {
playSound("click");
getURL (_root.battleonurl, "_blank");
}
Symbol 370 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 89
gotoAndPlay (1);
Symbol 380 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 388 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 1
stop();
Symbol 393 MovieClip Frame 9
gotoAndPlay ("Idle");
Symbol 393 MovieClip Frame 10
isLocked = false;
this.bitPlayOverride = false;
Symbol 393 MovieClip Frame 54
if (!this.bitPlayOverride) {
gotoAndPlay ("Walk");
}
Symbol 393 MovieClip Frame 64
_root.engine.attack("bottom");
Symbol 393 MovieClip Frame 70
gotoAndPlay ("Walk");
Symbol 393 MovieClip Frame 81
gotoAndPlay ("Miss");
Symbol 393 MovieClip Frame 88
_root.engine.attack("kick");
Symbol 393 MovieClip Frame 104
gotoAndPlay ("Walk");
Symbol 393 MovieClip Frame 122
_root.engine.attack("top");
Symbol 393 MovieClip Frame 142
gotoAndPlay ("Walk");
Symbol 393 MovieClip Frame 177
gotoAndPlay ("Walk");
Symbol 393 MovieClip Frame 183
_root.engine.throwShuriken();
Symbol 393 MovieClip Frame 190
gotoAndPlay ("Walk");
Symbol 393 MovieClip Frame 204
_root.engine.stopScrolling();
Symbol 393 MovieClip Frame 215
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 1
stop();
Instance of Symbol 397 MovieClip "movHP" in Symbol 405 MovieClip Frame 1
onClipEvent (load) {
hexColor = "0xFF0000";
}
Symbol 409 Button
on (press) {
_root.engine.useHealthPotion();
}
Symbol 411 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 417 Button
on (press) {
_root.engine.useBlastPotion();
}
Symbol 420 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 30
this._visible = false;
Symbol 421 MovieClip Frame 31
stop();
Symbol 427 Button
on (press) {
_root.playSound("click");
_root.engine.continueGame();
}
Symbol 433 MovieClip Frame 15
stop();
Symbol 434 Button
on (press) {
_root.playSound("click");
gotoAndStop ("Shop");
}
Symbol 440 Button
on (press) {
_root.playSound("click");
gotoAndStop ("HighScore");
}
Symbol 447 Button
on (press) {
playSound("click");
_parent.gotoAndPlay("MoreGames");
}
Symbol 450 Button
on (press) {
playSound("click");
_root.engine.gotoHighScore(txtName.text);
}
Symbol 453 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 462 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 1
stop();
Symbol 467 Button
on (press) {
if (_root.engine.intGold >= 500) {
_root.playSound("coins");
_root.engine.buyWeapon(3, 500);
_root.engine.setBonus(1.5, 1);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Ancient Katana";
strWeaponDesc.text = "Gives 50% more Gold!";
strCost.text = "Cost: 500";
}
on (rollOut) {
clearText();
}
Symbol 468 Button
on (press) {
if (_root.engine.intGold >= 3000) {
_root.playSound("coins");
_root.engine.buyWeapon(4, 3000);
_root.engine.setBonus(1, 2.5);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Itsiju Short-Sword";
strWeaponDesc.text = "+ 150% Exp";
strCost.text = "Cost: 3000";
}
on (rollOut) {
clearText();
}
Symbol 469 Button
on (press) {
if (_root.engine.intGold >= 3000) {
_root.playSound("coins");
_root.engine.buyWeapon(5, 3000);
_root.engine.setBonus(2.5, 1);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Emperor Sabre";
strWeaponDesc.text = "+ 150% Gold";
strCost.text = "Cost: 3000";
}
on (rollOut) {
clearText();
}
Symbol 470 Button
on (press) {
if (_root.engine.intGold >= 5000) {
_root.playSound("coins");
_root.engine.buyWeapon(6, 5000);
_root.engine.setBonus(2.5, 2.5);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Boken";
strWeaponDesc.text = "+ 200% Exp & + 200% Gold!";
strCost.text = "Cost: 5000";
}
on (rollOut) {
clearText();
}
Symbol 471 Button
on (press) {
_root.playSound("click");
gotoAndStop ("Ready");
}
Symbol 474 Button
on (press) {
if (_root.engine.intGold >= 500) {
_root.engine.buyHealthPotion(500);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Health Potion";
strWeaponDesc.text = "Looks like a Health Potion";
strCost.text = "Cost: 500";
}
on (rollOut) {
clearText();
}
Symbol 476 Button
on (press) {
if (_root.engine.intGold >= 500) {
_root.engine.buyBlastPotion(500);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Blast Potion";
strWeaponDesc.text = "One Shot.. Blast All Monsters";
strCost.text = "Cost: 500";
}
on (rollOut) {
clearText();
}
Symbol 481 Button
on (press) {
if (_root.engine.intGold >= 500) {
_root.playSound("coins");
_root.engine.buyWeapon(2, 500);
_root.engine.setBonus(1, 1.5);
strGold.text = "Gold: " + _root.engine.intGold.toString();
}
}
on (rollOver) {
strWeaponName.text = "Nunchaku";
strWeaponDesc.text = "Gives 50% more exp!";
strCost.text = "Cost: 500";
}
on (rollOut) {
clearText();
}
Symbol 487 MovieClip Frame 1
this.btnBackground.enabled = false;
stop();
strJoke = "Prepare for battle! Gain gold and experience to get a higher level and beat the high scores. Every time you level you can visit Elizabeth's shop to get new weapons!";
Symbol 487 MovieClip Frame 9
this.btnBackground.enabled = false;
strLink = "<a href='http://www.battleon.com/downloads/'>Download this <b><u>FREE Game</u></b></a> for your Website";
stop();
Symbol 487 MovieClip Frame 17
this.btnBackground.enabled = false;
strLink = "<a href='http://www.battleon.com/downloads/'>Download this <b><u>FREE Game</u></b></a> for your Website";
stop();
Symbol 487 MovieClip Frame 24
this.btnBackground.enabled = false;
this.txtName.text = "";
stop();
Symbol 487 MovieClip Frame 32
function clearText() {
strWeaponName.text = "";
strWeaponDesc.text = "";
strCost.text = "";
}
this.btnBackground.enabled = false;
strGold.text = "Gold: " + _root.engine.intGold.toString();
clearText();
stop();
Symbol 488 MovieClip Frame 1
_root.engine.startGame();
stop();
Instance of Symbol 240 MovieClip "mcStar2" in Symbol 488 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}