Frame 1
function clear() {
game_over._visible = false;
tasemed._visible = false;
abi._visible = false;
}
var game;
game.onGameOver = function () {
tasemed._visible = false;
game_over._visible = true;
game_over.prevFrame();
game_over.nextFrame();
};
game.onLevelChange = function () {
level_anim.t.text = "Level " + game.level;
level_anim.play();
};
game.onEludChange = function () {
var _local1 = 0;
while (_local1 < 6) {
if (game.__get__elud() < _local1) {
if (elud["e" + _local1]._currentframe == 1) {
elud["e" + _local1].gotoAndPlay(2);
}
} else {
elud["e" + _local1].gotoAndStop(1);
}
_local1++;
}
};
game.onStartGame = function () {
clear();
stopAllSounds();
};
game.onSkoorChange = function () {
score.text = game.skoor;
};
clear();
tasemed._visible = true;
Symbol 1 MovieClip [FUIComponentSymbol] Frame 1
#initclip 16
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 98 MovieClip [neeger] Frame 1
#initclip 9
Object.registerClass("neeger", com.tembu.Neeger);
#endinitclip
stop();
Symbol 103 MovieClip [hunnik] Frame 1
#initclip 10
Object.registerClass("hunnik", com.tembu.Hunnik);
#endinitclip
Symbol 116 MovieClip [pähkel] Frame 1
#initclip 11
Object.registerClass("p\u00E4hkel", com.tembu.P\u00E4hkel);
#endinitclip
stop();
Symbol 116 MovieClip [pähkel] Frame 50
this.removeMovieClip();
Symbol 126 MovieClip Frame 36
_parent.enabled = true;
Symbol 130 MovieClip Frame 14
_parent.enabled = true;
Symbol 136 MovieClip Frame 30
_parent.enabled = true;
Symbol 138 MovieClip [Ahv] Frame 1
#initclip 12
Object.registerClass("Ahv", com.tembu.Ahv);
#endinitclip
stop();
Symbol 157 MovieClip [papagoi] Frame 1
#initclip 13
Object.registerClass("papagoi", com.tembu.Papagoi);
#endinitclip
stop();
Symbol 162 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 163 MovieClip [FScrollBarSymbol] Frame 1
#initclip 17
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 166 MovieClip [highscore_Symbol] Frame 1
#initclip 14
highscore_class = function () {
this.init();
};
pr = highscore_class.prototype;
pr.init = function () {
this.scoreXML = new XML();
this.scoreXML._parent = this;
this.scoreXML.onLoad = function () {
this._parent.XMLonLoad();
};
this.scroll._visible = 0;
if (this.autoload) {
this.loadScores(this.url);
}
};
pr.onLoad = function () {
this.setSize(this._width, this._height);
this._xscale = (this._yscale = 100);
};
pr.setSize = function (w, h) {
this.txt._width = w;
this.txt._height = h;
this.scroll._x = int(w);
this.scroll.setSize(h);
};
pr.loadScores = function () {
this.scoreXML.load((((this.url + "?game=") + this.game) + "&r") + random(9999));
};
pr.saveScore = function (score, name) {
if (score < 1) {
return(undefined);
}
var _local2 = (score * name.charCodeAt(0)) - 13;
var _local3 = (((((this.url + "?score=") + _local2) + "&name=") + name) + "&game=") + this.game;
this.scoreXML.sendAndLoad(_local3, this.scoreXML);
};
pr.XMLonLoad = function () {
var _local9 = new TextFormat();
_local9.tabStops = [30, this.txt._width - 60];
this.txt.setNewTextFormat(_local9);
var _local8 = this.scoreXML.firstChild;
if (_local8.nodeName != "highscore") {
return(undefined);
}
this.txt.text = "";
_local8.ignoreWhite = true;
var _local7 = _local8.childNodes;
var _local3 = 0;
while (_local3 < _local7.length) {
var _local2 = _local7[_local3];
if (_local2.nodeName != "score") {
} else {
var _local4 = _local2.attributes.nr;
var _local6 = _local2.attributes.score;
var _local5 = _local2.attributes.name;
this.addScore(_local4, _local6, _local5);
}
_local3++;
}
this.scroll._visible = this.txt.maxscroll > 1;
var _local10 = new FStyleFormat();
_local10.addListener(this.scroll);
_local10.setColor(15249174);
};
pr.addScore = function (nr, score, name) {
this.txt.text = this.txt.text + ((((((" " + nr) + ". \t") + name) + "\t") + score) + newline);
};
Object.registerClass("highscore_Symbol", highscore_class);
#endinitclip
Instance of Symbol 163 MovieClip [FScrollBarSymbol] "scroll" in Symbol 166 MovieClip [highscore_Symbol] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "txt";
horizontal = false;
}
Symbol 169 MovieClip [Mäng] Frame 1
#initclip 15
Object.registerClass("M\u00E4ng", com.tembu.Mang);
#endinitclip
Symbol 172 Button
on (press) {
tasemed._visible = true;
game_over._visible = false;
}
Symbol 173 Button
on (press) {
game.gameOver();
}
Symbol 174 Button
on (press) {
game.enabled = false;
abi._visible = true;
}
Symbol 188 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 32
stop();
Symbol 192 MovieClip Frame 1
stop();
Symbol 203 Button
on (press) {
HS.saveScore(skoor_txt.text, nimi_txt.text);
nextFrame();
}
Symbol 205 Button
on (press) {
_root.tasemed._visible = true;
this._parent._visible = false;
}
Symbol 206 MovieClip Frame 1
var s = int(_root.game.skoor);
_root.game.skoor = "";
if (s > 0) {
skoor_txt.text = s;
} else {
nextFrame();
}
_parent.skoor = 0;
Selection.setFocus(nimi_txt);
stop();
Instance of Symbol 166 MovieClip [highscore_Symbol] "HS" in Symbol 206 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
autoload = true;
game = "tembu";
url = "score.php";
}
Symbol 206 MovieClip Frame 2
HS.setSize(HS._width, 250);
Symbol 207 MovieClip Frame 1
stop();
Symbol 210 Button
on (release) {
_parent.game.start(3);
_visible = false;
}
Symbol 212 Button
on (release) {
_parent.game.start(2);
_visible = false;
}
Symbol 214 Button
on (press) {
_parent.game.start(1);
_visible = false;
}
Symbol 219 Button
on (press) {
_visible = false;
_root.game.enabled = true;
}
Symbol 223 MovieClip Frame 1
BG.onPress = function () {
};
BG.useHandCursor = false;
_root.game.enabled = false;
Symbol 225 MovieClip [__Packages.com.tembu.Mang] Frame 0
class com.tembu.Mang extends MovieClip
{
var abikast, attachMovie, hunnik, ahv, tase, onStartGame, level, n_from_last, onLevelChange, banaan, neeger, _elud, onEludChange, _skoor, onSkoorChange, banaan_power, banaan_kiirus, papagoi, onGameOver;
function Mang () {
super();
mx.events.EventDispatcher.initialize(this);
}
function onLoad() {
abikast._visible = false;
_root.tabEnabled = false;
attachMovie("hunnik", "hunnik", 50000);
hunnik._x = 50;
hunnik._y = 420;
attachMovie("ahv", "ahv", 50001);
ahv._xscale = (ahv._yscale = 35);
ahv._y = ground_y;
ahv._x = 300;
}
function start(tase) {
this.tase = tase;
skoor = (0);
elud = (5);
while (palmid.length) {
palmid.pop().removeMovieClip();
}
startLevel(1);
onStartGame();
}
function startLevel(level) {
this.level = level;
enabled = true;
n_from_last = 0;
clear();
hunnik.clear();
hunnik.target_count = 10;
ahvi_kiirus = 9 + tase;
gravity = ((tase * tase) * 2) / 100;
make_palms();
if (elud < 5) {
elud = ((elud+1));
}
onLevelChange();
}
function stop() {
enabled = false;
}
function clear() {
while (p\u00E4hklid.length) {
p\u00E4hklid.pop().removeMovieClip();
}
banaan.removeMovieClip();
neeger.removeMovieClip();
}
function onEnterFrame() {
if (!enabled) {
return(undefined);
}
ahv_nav_check();
var _local4 = (80 - (tase * level)) - tase;
if ((++n_from_last) > _local4) {
n_from_last = 0;
make_p\u00E4hkel();
}
var _local3 = 0;
while (_local3 < p\u00E4hklid.length) {
var _local2 = p\u00E4hklid[_local3];
_local2.animate(gravity, ground_y);
if (!_local2.enabled) {
} else if (ahv.hitTest(_local2._x, _local2._y, false)) {
_local2.dissapear();
if (ahv.catching && (ahv.enabled)) {
ahv.p\u00FC\u00FCdis();
p\u00E4hkel_k\u00E4es();
} else {
ahv.uimane();
}
}
_local3++;
}
if ((((!neeger) && (hunnik.count >= 3)) && (level > 2)) && (n_from_last == 6)) {
make_neeger();
}
if (hunnik.count >= hunnik.target_count) {
startLevel(++level);
}
if (banaan._y < ground_y) {
banaan._y = banaan._y + (2 * (1 + (tase / 2)));
} else if (ahv.hitTest(banaan)) {
onBanaanil();
}
}
function pähkel_käes() {
hunnik.addItem();
skoor = skoor + (tase * level);
}
function pähkel_katki() {
elud = ((elud-1));
}
function get elud() {
return(_elud);
}
function set elud(e) {
_elud = e;
onEludChange();
if (e <= 0) {
gameOver();
}
//return(elud);
}
function get skoor() {
return(_skoor);
}
function set skoor(e) {
_skoor = e;
onSkoorChange();
//return(skoor);
}
function ahv_nav_check() {
if (ahv.enabled == false) {
return(undefined);
}
if (Key.isDown(32)) {
ahv.hirmutab();
if ((neeger.jookseb == false) && (((ahv._x < neeger._x) && (ahv._xscale > 0)) || ((ahv._x > neeger._x) && (ahv._xscale < 0)))) {
neeger.p\u00F5gene();
skoor = skoor + ((tase * level) * 5);
}
} else {
if (Key.isDown(38)) {
ahv.jooksep\u00FC\u00FCa();
} else {
ahv.jookseb();
}
banaan_power = banaan_power - 2;
var _local2 = 0;
if (Key.isDown(39)) {
_local2 = ahvi_kiirus;
ahv.vaataParemale();
} else if (Key.isDown(37)) {
_local2 = -ahvi_kiirus;
ahv.vaataVasakule();
} else if (Key.isDown(38)) {
ahv.p\u00FC\u00FCa();
} else {
ahv.seisab();
}
if (banaan_power > 0) {
_local2 = ((banaan_power / 100) * banaan_kiirus) + (((100 - banaan_power) / 100) * _local2);
}
ahv._x = ahv._x + _local2;
if (ahv._x < 40) {
ahv._x = 40;
}
if (ahv._x > 680) {
ahv._x = 680;
}
}
}
function make_palms() {
var _local4 = Math.floor(2 + (level / 3));
var _local2 = 0;
while (_local2 <= _local4) {
var _local3 = attachMovie("palm", "palm" + _local2, _local2);
_local3._x = (180 + ((400 / _local4) * _local2)) + (random(100) - 50);
_local3._xscale = ((random(2) * 2) - 1) * 100;
_local3._y = 60 + (_local2 * 10);
palmid.push(_local3);
_local2++;
}
attachMovie("papagoi", "papagoi", 50053);
papagoi.puud = palmid;
papagoi._x = 750;
papagoi._y = palmid[0]._y;
papagoi.onFly = mx.utils.Delegate.create(this, make_banaan);
}
function make_banaan() {
if (banaan) {
return(undefined);
}
attachMovie("banaan", "banaan", 50066);
banaan._x = papagoi._x;
banaan._y = papagoi._y;
}
function make_pähkel() {
var _local3 = p\u00E4hklid.length;
attachMovie("p\u00E4hkel", "p\u00E4hkel" + _local3, 200 + _local3);
var _local2 = this["p\u00E4hkel" + _local3];
var _local4 = palmid[random(palmid.length)];
var _local6 = Math.random();
var _local5 = Math.random();
_local2.xspd = (((_local6 * 2) - 1) * tase) / 5;
_local2.yspd = ((gravity * tase) * 2) + (_local5 / 2);
_local2._x = (_local4._x + (_local6 * 30)) - 15;
_local2._y = (_local4._y + (_local5 * 30)) - 15;
_local2["p\u00E4hkel_katki"] = mx.utils.Delegate.create(this, p\u00E4hkel_katki);
p\u00E4hklid.push(_local2);
}
function make_neeger() {
attachMovie("neeger", "neeger", 50004);
neeger._xscale = (neeger._yscale = 50);
neeger._y = ground_y + 10;
neeger._x = 800;
neeger.target_x = hunnik._x;
neeger.speed = 2 * tase;
neeger.onNeegerTassib = mx.utils.Delegate.create(this, onNeegerTassib);
neeger.jaluta();
}
function onNeegerTassib() {
hunnik.count = hunnik.count - 3;
hunnik.draw();
skoor = skoor - ((tase * level) * 15);
}
function onBanaanil() {
if (!banaan) {
return(undefined);
}
banaan.removeMovieClip();
banaan_kiirus = ((ahv._xscale > 0) ? (ahvi_kiirus) : (-ahvi_kiirus));
banaan_power = 100;
}
function gameOver() {
enabled = false;
onGameOver();
}
var enabled = false;
var palmid = [];
var pähklid = [];
var ground_y = 415;
var gravity = 0.05;
var ahvi_kiirus = 8;
}
Symbol 226 MovieClip [__Packages.com.tembu.Ahv] Frame 0
class com.tembu.Ahv extends MovieClip
{
var catching, gotoAndStop, _xscale;
function Ahv () {
super();
}
function püüa() {
catching = true;
gotoAndStop("p\u00FC\u00FCa");
}
function uimane() {
enabled = false;
catching = false;
gotoAndStop("uimane");
}
function seisab() {
catching = false;
gotoAndStop("seisab");
}
function püüdis() {
catching = false;
enabled = false;
gotoAndStop("p\u00FC\u00FCdis");
}
function jookseb() {
catching = false;
gotoAndStop("jookseb");
}
function jooksepüüa() {
catching = true;
gotoAndStop("jooksep\u00FC\u00FCa");
}
function hirmutab() {
enabled = false;
catching = false;
gotoAndStop("hirmutab");
}
function vaataParemale() {
_xscale = Math.abs(_xscale);
}
function vaataVasakule() {
_xscale = -Math.abs(_xscale);
}
var enabled = true;
}
Symbol 227 MovieClip [__Packages.com.tembu.Hunnik] Frame 0
class com.tembu.Hunnik extends MovieClip
{
var target_count, attachMovie;
function Hunnik () {
super();
}
function addItem() {
count++;
draw();
size = 20;
}
function draw() {
if (target_count > 0) {
if (pile_sum == 0) {
var _local3 = 0;
while (true) {
pile_sum = calc_pile_sum(_local3);
if (pile_sum >= target_count) {
break;
}
_local3++;
}
pile_btm = _local3;
}
} else if (pile_sum < count) {
var _local3 = 0;
while (true) {
pile_sum = calc_pile_sum(_local3);
if (pile_sum >= count) {
break;
}
_local3++;
}
pile_btm = _local3;
}
while (pahklid.length) {
pahklid.pop().removeMovieClip();
}
var _local5 = pile_btm;
var _local4 = 0;
var _local6 = count;
while (_local6 > 0) {
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = attachMovie("p\u00E4hkel_dumb", "p" + ((_local4 * 100) + _local3), (_local4 * 100) + _local3);
_local2._x = (_local3 * size) + ((_local4 * size) / 2);
_local2._y = (-_local4) * size;
_local2._xscale = (_local2._yscale = (100 * size) / 24);
pahklid.push(_local2);
_local6--;
if (_local6 == 0) {
break;
}
_local3++;
}
_local4++;
_local5--;
}
}
function clear() {
count = 0;
pile_btm = 0;
pile_sum = 0;
draw();
}
function calc_pile_sum(n) {
if (n > 0) {
return(n + calc_pile_sum(n - 1));
}
return(0);
}
var count = 0;
var size = 24;
var pile_sum = 0;
var pile_btm = 0;
var pahklid = [];
}
Symbol 228 MovieClip [__Packages.com.tembu.Neeger] Frame 0
class com.tembu.Neeger extends MovieClip
{
var orig_x, _x, speed, target_x, removeMovieClip, _xscale, gotoAndStop, onNeegerTassib;
function Neeger () {
super();
}
function onLoad() {
orig_x = _x;
}
function onEnterFrame() {
if (!jookseb) {
if (tassib) {
_x = _x + speed;
} else {
_x = _x - speed;
}
if (_x < (target_x + 40)) {
tassi();
}
} else {
_x = _x + 5;
}
if (_x > (orig_x + 5)) {
removeMovieClip();
}
}
function jaluta() {
_xscale = -Math.abs(_xscale);
jookseb = false;
tassib = false;
gotoAndStop("jalutab");
}
function tassi() {
_xscale = Math.abs(_xscale);
jookseb = false;
tassib = true;
gotoAndStop("tassib");
onNeegerTassib();
}
function põgene() {
_xscale = Math.abs(_xscale);
jookseb = true;
gotoAndStop("jookseb");
}
var enabled = true;
var jookseb = false;
var tassib = false;
}
Symbol 229 MovieClip [__Packages.com.tembu.Papagoi] Frame 0
class com.tembu.Papagoi extends MovieClip
{
var istub, _x, puu, _xscale, palmik_oldx, puud, gotoAndStop, onFly;
function Papagoi () {
super();
}
function onLoad() {
lenda();
pickPalm();
}
function onEnterFrame() {
if (istub == false) {
_x = _x + ((_x < puu._x) ? 3 : -3);
_xscale = ((_x > puu._x) ? 100 : -100);
if ((_x < (puu._x + 10)) && (_x > (puu._x - 10))) {
istu();
}
} else {
n++;
if (n > 200) {
pickPalm();
lenda();
}
_x = _x + ((puu._xscale / 100) * (puu.palmik._x - palmik_oldx));
palmik_oldx = puu.palmik._x;
}
}
function pickPalm() {
var _local2;
do {
_local2 = puud[random(puud.length)];
} while (_local2 == puu);
puu = _local2;
}
function lenda() {
n = 0;
istub = false;
gotoAndStop("lendab");
if (puu) {
onFly();
}
}
function istu() {
istub = true;
gotoAndStop("istub");
}
var n = 0;
}
Symbol 230 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1};
}
Symbol 231 MovieClip [__Packages.com.tembu.Pähkel] Frame 0
class com.tembu.Pähkel extends MovieClip
{
var _y, _x, pähkel_katki, gotoAndPlay, removeMovieClip;
function Pähkel () {
super();
}
function animate(gravity, ground) {
if (!enabled) {
return(undefined);
}
yspd = yspd + gravity;
_y = _y + yspd;
_x = _x + xspd;
if (_y > ground) {
explode();
}
}
function explode() {
p\u00E4hkel_katki();
enabled = false;
gotoAndPlay(2);
}
function dissapear() {
removeMovieClip();
}
var xspd = 0;
var yspd = 0;
var enabled = true;
}
Symbol 232 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}