Frame 1
var language;
var showPreloader;
var soundEnabled;
var dlink;
var branding;
var mochiAd = false;
var distribution = "mochiAd";
switch (distribution) {
case "screen7.co.uk" :
language = "en";
showPreloader = true;
soundEnabled = true;
branding = "screen7";
dlLink = "http://www.screenseven.co.uk/bitrix/redirect.php?event1=down_diamond-drop-2&event2=page_diamond-drop-2&goto=%2Fgames%2Fdiamond-drop-2%2Fdownload%2F";
break;
case "screen7.com" :
language = "en";
showPreloader = true;
soundEnabled = true;
branding = "screen7";
dlLink = "http://www.screenseven.com/bitrix/redirect.php?event1=down_diamond-drop-2&event2=page_diamond-drop-2&goto=%2Fgames%2Fdiamond-drop-2%2Fdownload%2F";
break;
case "deutschland-spielt.de" :
language = "de";
showPreloader = true;
soundEnabled = true;
branding = "ds";
dlLink = "http://www.deutschland-spielt.de/bitrix/redirect.php?event1=down_diamonddrop2&event2=page_diamonddrop2&goto=%2Fgames%2Fdiamonddrop2%2Fdownload%2F";
break;
case "mochiAd" :
language = "en";
showPreloader = false;
soundEnabled = true;
branding = "screen7";
mochiAd = true;
dlLink = "http://www.screenseven.com/bitrix/redirect.php?event1=down_diamond-drop-2&event2=page_diamond-drop-2&goto=%2Fgames%2Fdiamond-drop-2%2Fdownload%2F";
}
if (showPreloader) {
stop();
preLoader.onEnterFrame = function () {
var _local3 = _root.getBytesTotal();
var _local4 = _root.getBytesLoaded();
if (_local3 > 0) {
this.bar.indicator._xscale = (_local4 / _local3) * 100;
if (_local3 == _local4) {
_root.nextFrame();
}
}
};
} else {
preLoader._visible = false;
}
if (mochiAd) {
MochiAd.showPreGameAd({id:"88e2d4bf3c20817e", res:"550x410"});
}
Frame 2
if (mochiAd) {
trace("mochibot activated");
__com_mochibot__("4ce00d09", this, 10301, true);
}
function unRegisterButton(mc) {
mc.onRollOver = null;
mc.onRollOut = null;
mc.onRelease = null;
}
function playSound(id) {
if (!soundEnabled) {
return(undefined);
}
var _local2 = new Sound(this);
_local2.attachSound(id);
_local2.start();
}
function registerButton(mc, func, extra) {
mc.fn = func;
mc.extra = extra;
mc.onRollOver = function () {
var _local2;
if (extra == "dark") {
_local2 = {blurX:16, blurY:16, color:16777215, quality:1, strength:1, alpha:1};
} else {
_local2 = {blurX:8, blurY:8, color:16777215, quality:1, strength:2, alpha:1};
}
trace("RollOver " + this);
this.txt.glowTo(_local2, 1);
this.txt.scaleTo(110, 0.3);
playSound("step1");
};
mc.onRollOut = function () {
var _local2;
if (extra == "dark") {
_local2 = {blurX:1, blurY:1, color:16777215, quality:1, strength:1, alpha:0};
} else {
_local2 = {blurX:1, blurY:1, color:16777215, quality:1, strength:1, alpha:0};
}
this.txt.glowTo(_local2, 1);
this.txt.scaleTo(100, 1);
};
mc.onRelease = function () {
playSound("pushstones");
mc.fn();
};
}
function initMenu() {
startMenu.menuPanel.initY = yTo;
startMenu.menuPanel._y = -410;
startMenu.menuPanel.ySlideTo(yTo, 0.5, "easeinoutsine");
}
function playGame() {
startMenu.menuPanel.ySlideTo(-410, 0.5, "easeinoutsine", 0, function () {
gotoAndStop (3);
});
}
function dlGame() {
getURL (_root.dlLink, "_blank");
}
function backToMenu() {
startMenu.alphaTo(100, 1, "linear", 0, function () {
_root.gotoAndStop(2);
});
}
_global.$createTweenController = function () {
var _local3 = _root.createEmptyMovieClip("__tweenController__", 123432);
_local3.$_tweenPropList = new Array();
_local3.$_tTime = getTimer();
_local3.onEnterFrame = _global.$updateTweens;
};
ASSetPropFlags(_global, "$createTweenController", 1, 0);
_global.$removeTweenController = function () {
delete _root.__tweenController__.$_tweenPropList;
delete _root.__tweenController__.$_tTime;
delete _root.__tweenController__.onEnterFrame;
_root.__tweenController__.removeMovieClip();
};
ASSetPropFlags(_global, "$removeTweenController", 1, 0);
_global.$addTween = function (mtarget, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, extras) {
if (timeSeconds == undefined) {
timeSeconds = 0;
}
if ((animType == undefined) || (animType == "")) {
animType = "easeOutExpo";
}
if (delay == undefined) {
delay = 0;
}
if (typeof(prop) == "string") {
var _local7 = [prop];
var _local11 = [mtarget[prop]];
var _local9 = [propDest];
} else {
var _local7 = [];
var _local11 = [];
var _local9 = [];
for (var _local32 in prop) {
_local11.push(mtarget[prop[_local32]]);
}
for (var _local32 in prop) {
_local7.push(prop[_local32]);
}
for (var _local32 in propDest) {
_local9.push(propDest[_local32]);
}
}
var _local12 = false;
if (_root.__tweenController__ == undefined) {
_global.$createTweenController();
}
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local8 = _root.__tweenController__.$_tTime;
for (var _local32 in _local11) {
if ((_local9[_local32] != undefined) && (!mtarget.$_isTweenLocked)) {
if (mtarget.$_tweenCount > 0) {
var _local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3]._targ == mtarget) && (_local4[_local3]._prop == _local7[_local32])) {
if ((_local8 + (delay * 1000)) < _local4[_local3]._timeDest) {
_local4.splice(_local3, 1);
_local3--;
mtarget.$_tweenCount--;
}
}
_local3++;
}
}
_local4.push({_prop:_local7[_local32], _targ:mtarget, _propStart:undefined, _propDest:_local9[_local32], _timeStart:_local8, _timeDest:_local8 + (timeSeconds * 1000), _animType:animType, _extra1:extra1, _extra2:extra2, _extras:extras, _delay:delay, _isPaused:false, _timePaused:0, _callback:(_local12 ? undefined : (callback))});
mtarget.$_tweenCount = ((mtarget.$_tweenCount > 0) ? (mtarget.$_tweenCount + 1) : 1);
_local12 = true;
}
}
ASSetPropFlags(mtarget, "$_tweenCount", 1, 0);
};
ASSetPropFlags(_global, "$addTween", 1, 0);
_global.$updateTweens = function () {
var _local8 = (this.$_tTime = getTimer());
var _local6 = 0;
while (_local6 < this.$_tweenPropList.length) {
var _local3 = this.$_tweenPropList[_local6];
if (_local3._targ.toString() == undefined) {
this.$_tweenPropList.splice(_local6, 1);
_local6--;
} else if (((_local3._timeStart + (_local3._delay * 1000)) <= _local8) && (!_local3._isPaused)) {
if (_local3._propStart == undefined) {
if (_local3._prop.substr(0, 10) == "__special_") {
if (_local3._prop == "__special_mc_frame__") {
_local3._propStart = _local3._targ._currentframe;
} else if (_local3._prop == "__special_mc_ra__") {
_local3._propStart = new Color(_local3._targ).getTransform().ra;
} else if (_local3._prop == "__special_mc_rb__") {
_local3._propStart = new Color(_local3._targ).getTransform().rb;
} else if (_local3._prop == "__special_mc_ga__") {
_local3._propStart = new Color(_local3._targ).getTransform().ga;
} else if (_local3._prop == "__special_mc_gb__") {
_local3._propStart = new Color(_local3._targ).getTransform().gb;
} else if (_local3._prop == "__special_mc_ba__") {
_local3._propStart = new Color(_local3._targ).getTransform().ba;
} else if (_local3._prop == "__special_mc_bb__") {
_local3._propStart = new Color(_local3._targ).getTransform().bb;
} else if (_local3._prop == "__special_mc_aa__") {
_local3._propStart = new Color(_local3._targ).getTransform().aa;
} else if (_local3._prop == "__special_mc_ab__") {
_local3._propStart = new Color(_local3._targ).getTransform().ab;
} else if (_local3._prop == "__special_text_r__") {
_local3._propStart = _local3._targ.textColor >> 16;
} else if (_local3._prop == "__special_text_g__") {
_local3._propStart = (_local3._targ.textColor & 65280) >> 8;
} else if (_local3._prop == "__special_text_b__") {
_local3._propStart = _local3._targ.textColor & 255;
} else if (_local3._prop == "__special_sound_volume__") {
_local3._propStart = _local3._targ.getVolume();
} else if (_local3._prop == "__special_sound_pan__") {
_local3._propStart = _local3._targ.getPan();
} else if (_local3._prop == "__special_bst_t__") {
_local3._propStart = 0;
_local3._extras.__special_bst_ix__ = _local3._targ._x;
_local3._extras.__special_bst_iy__ = _local3._targ._y;
} else if (_local3._prop == "__special_blur_x__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BlurFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_blur_y__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BlurFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_color__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].color;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 16777215 /* 0xFFFFFF */;
}
} else if (_local3._prop == "__special_glow_alpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].alpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_glow_blurX__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_blurY__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_strength__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].strength;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_distance__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].distance;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_angle__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].angle;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 45;
}
} else if (_local3._prop == "__special_bevel_highlightColor__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].highlightColor;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 16777215 /* 0xFFFFFF */;
}
} else if (_local3._prop == "__special_bevel_highlightAlpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].highlightAlpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_shadowColor__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].shadowColor;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_shadowAlpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].shadowAlpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_blurX__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_blurY__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_strength__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].strength;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else {
_local3._propStart = _local3._targ[_local3._prop];
}
} else {
_local3._propStart = _local3._targ[_local3._prop];
}
}
var _local10 = _local3._timeDest + (_local3._delay * 1000);
if (_local10 <= _local8) {
var _local4 = _local3._propDest;
} else {
var _local4 = _global.findTweenValue(_local3._propStart, _local3._propDest, _local3._timeStart, _local8 - (_local3._delay * 1000), _local3._timeDest, _local3._animType, _local3._extra1, _local3._extra2);
}
_local3._targ[_local3._prop] = (_local3._extras.mustRound ? (Math.round(_local4)) : (_local4));
if (_local3._prop == "__special_mc_frame__") {
_local3._targ.gotoAndStop(Math.round(_local4));
} else if (_local3._prop == "__special_mc_ra__") {
new Color(_local3._targ).setTransform({ra:_local4});
} else if (_local3._prop == "__special_mc_rb__") {
new Color(_local3._targ).setTransform({rb:_local4});
} else if (_local3._prop == "__special_mc_ga__") {
new Color(_local3._targ).setTransform({ga:_local4});
} else if (_local3._prop == "__special_mc_gb__") {
new Color(_local3._targ).setTransform({gb:_local4});
} else if (_local3._prop == "__special_mc_ba__") {
new Color(_local3._targ).setTransform({ba:_local4});
} else if (_local3._prop == "__special_mc_bb__") {
new Color(_local3._targ).setTransform({bb:_local4});
} else if (_local3._prop == "__special_mc_aa__") {
new Color(_local3._targ).setTransform({aa:_local4});
} else if (_local3._prop == "__special_mc_ab__") {
new Color(_local3._targ).setTransform({ab:_local4});
}
if (_local3._prop == "__special_bst_t__") {
var _local7 = _local3._extras;
var _local9 = _global.findPointOnCurve(_local7.__special_bst_ix__, _local7.__special_bst_iy__, _local7.__special_bst_cx__, _local7.__special_bst_cy__, _local7.__special_bst_dx__, _local7.__special_bst_dy__, _local4);
if (_local3._extras.mustRound) {
_local3._targ._x = Math.round(_local9.x);
_local3._targ._y = Math.round(_local9.y);
} else {
_local3._targ._x = _local9.x;
_local3._targ._y = _local9.y;
}
}
if ((typeof(_local3._targ) != "movieclip") && (_local3._prop == "__special_text_b__")) {
_local3._targ.textColor = ((_local3._targ.__special_text_r__ << 16) + (_local3._targ.__special_text_g__ << 8)) + _local3._targ.__special_text_b__;
}
if (_local3._prop == "__special_sound_volume__") {
_local3._targ.setVolume(_local4);
}
if (_local3._prop == "__special_sound_pan__") {
_local3._targ.setPan(_local4);
}
if (_local3._prop == "__special_blur_x__") {
_global.$setFilterProperty(_local3._targ, "blur_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_blur_y__") {
_global.$setFilterProperty(_local3._targ, "blur_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_color__") {
_global.$setFilterProperty(_local3._targ, "glow_color", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_glow_alpha__") {
_global.$setFilterProperty(_local3._targ, "glow_alpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_blurX__") {
_global.$setFilterProperty(_local3._targ, "glow_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_blurY__") {
_global.$setFilterProperty(_local3._targ, "glow_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_strength__") {
_global.$setFilterProperty(_local3._targ, "glow_strength", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_distance__") {
_global.$setFilterProperty(_local3._targ, "bevel_distance", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_angle__") {
_global.$setFilterProperty(_local3._targ, "bevel_angle", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_highlightColor__") {
_global.$setFilterProperty(_local3._targ, "bevel_highlightColor", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_bevel_highlightAlpha__") {
_global.$setFilterProperty(_local3._targ, "bevel_highlightAlpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_shadowColor__") {
_global.$setFilterProperty(_local3._targ, "bevel_shadowColor", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_bevel_shadowAlpha__") {
_global.$setFilterProperty(_local3._targ, "bevel_shadowAlpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_blurX__") {
_global.$setFilterProperty(_local3._targ, "bevel_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_blurY__") {
_global.$setFilterProperty(_local3._targ, "bevel_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_strength__") {
_global.$setFilterProperty(_local3._targ, "bevel_strength", _local4, _local3._extras);
}
if (_local3._targ.onTweenUpdate != undefined) {
_local3._targ.onTweenUpdate(_local3._prop);
}
if (_local10 <= _local8) {
if (_local3._targ.onTweenComplete != undefined) {
_local3._targ.onTweenComplete(_local3._prop);
}
_global.$stopTween(_local3._targ, [_local3._prop], false);
_local6--;
if (_local3._callback != undefined) {
if (_global.backwardCallbackTweening) {
var _local11 = _local3._targ.createEmptyMovieClip("__child__", 122344);
_local3._callback.apply(_local11, null);
_local11.removeMovieClip();
} else {
_local3._callback.apply(_local3._targ, null);
}
}
}
}
_local6++;
}
if (this.$_tweenPropList.length == 0) {
_global.$removeTweenController();
}
};
ASSetPropFlags(_global, "$updateTween", 1, 0);
_global.$stopTween = function (mtarget, props, wipeFuture) {
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local7;
for (var _local9 in _local4) {
_local7 = _local4[_local9]._prop;
var _local5 = 0;
while ((_local5 < props.length) || ((_local5 < 1) && (props == undefined))) {
if (((_local4[_local9]._targ == mtarget) && ((_local7 == props[_local5]) || (props == undefined))) && (wipeFuture || ((_local4[_local9]._timeDest + (_local4[_local9]._delay * 1000)) <= getTimer()))) {
switch (_local7) {
case "__special_mc_frame__" :
case "__special_mc_ra__" :
case "__special_mc_rb__" :
case "__special_mc_ga__" :
case "__special_mc_gb__" :
case "__special_mc_ba__" :
case "__special_mc_bb__" :
case "__special_mc_aa__" :
case "__special_mc_ab__" :
case "__special_sound_volume__" :
case "__special_bst_t__" :
delete mtarget[_local7];
break;
case "__special_text_b__" :
delete mtarget.__special_text_r__;
delete mtarget.__special_text_g__;
delete mtarget.__special_text_b__;
}
_local4.splice(_local9, 1);
}
_local5++;
}
}
if (props == undefined) {
delete mtarget.$_tweenCount;
} else {
mtarget.$_tweenCount = 0;
for (var _local9 in _local4) {
if (_local4[_local9]._targ == mtarget) {
mtarget.$_tweenCount++;
}
}
if (mtarget.$_tweenCount == 0) {
delete mtarget.$_tweenCount;
}
}
if (_local4.length == 0) {
_global.$removeTweenController();
}
};
ASSetPropFlags(_global, "$stopTween", 1, 0);
_global.$setFilterProperty = function (mtarget, propName, propValue, extras) {
var _local1;
var _local7 = false;
var _local3 = [];
_local1 = 0;
while (_local1 < mtarget.filters.length) {
_local3.push(mtarget.filters[_local1]);
_local1++;
}
if (propName.substr(0, 5) == "blur_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.BlurFilter) {
_local3[_local1][propName.substr(5)] = propValue;
if (extras.__special_blur_quality__ != undefined) {
_local3[_local1].quality = extras.__special_blur_quality__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local9;
var _local8 = ((extras.__special_blur_quality__ == undefined) ? 2 : (extras.__special_blur_quality__));
if (propName == "blur_blurX") {
_local9 = new flash.filters.BlurFilter(propValue, 0, _local8);
}
if (propName == "blur_blurY") {
_local9 = new flash.filters.BlurFilter(0, propValue, _local8);
}
_local3.push(_local9);
}
} else if (propName.substr(0, 5) == "glow_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.GlowFilter) {
_local3[_local1][propName.substr(5)] = propValue;
if (extras.__special_glow_quality__ != undefined) {
_local3[_local1].quality = extras.__special_glow_quality__;
}
if (extras.__special_glow_inner__ != undefined) {
_local3[_local1].inner = extras.__special_glow_inner__;
}
if (extras.__special_glow_knockout__ != undefined) {
_local3[_local1].knockout = extras.__special_glow_knockout__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local8 = ((extras.__special_glow_quality__ == undefined) ? 2 : (extras.__special_glow_quality__));
var _local12 = ((extras.__special_glow_inner__ == undefined) ? false : (extras.__special_glow_inner__));
var _local10 = ((extras.__special_glow_knockout__ == undefined) ? false : (extras.__special_glow_knockout__));
if (propName == "glow_color") {
var _local9 = new flash.filters.GlowFilter(propValue, 1, 0, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_alpha") {
var _local9 = new flash.filters.GlowFilter(16777215, propValue, 0, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_blurX") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, propValue, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_blurY") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, 0, propValue, 1, _local8, _local12, _local10);
}
if (propName == "glow_strength") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, 0, 0, propValue, _local8, _local12, _local10);
}
_local3.push(_local9);
}
} else if (propName.substr(0, 6) == "bevel_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.BevelFilter) {
_local3[_local1][propName.substr(6)] = propValue;
if (extras.__special_bevel_quality__ != undefined) {
_local3[_local1].quality = extras.__special_bevel_quality__;
}
if (extras.__special_bevel_type__ != undefined) {
_local3[_local1].inner = extras.__special_bevel_type__;
}
if (extras.__special_bevel_knockout__ != undefined) {
_local3[_local1].knockout = extras.__special_bevel_knockout__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local8 = ((extras.__special_bevel_quality__ == undefined) ? 2 : (extras.__special_bevel_quality__));
var _local11 = ((extras.__special_bevel_type__ == undefined) ? "inner" : (extras.__special_bevel_type__));
var _local10 = ((extras.__special_bevel_knockout__ == undefined) ? false : (extras.__special_bevel_knockout__));
if (propName == "bevel_distance") {
var _local9 = new flash.filters.BevelFilter(propValue, 45, 16777215, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_angle") {
var _local9 = new flash.filters.BevelFilter(0, propValue, 16777215, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_highlightColor") {
var _local9 = new flash.filters.BevelFilter(0, 45, propValue, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_highlightAlpha") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, propValue, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_shadowColor") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, propValue, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_shadowAlpha") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, propValue, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_blurX") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, propValue, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_blurY") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, propValue, 1, _local8, _local11, _local10);
}
if (propName == "bevel_strength") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, 0, propValue, _local8, _local11, _local10);
}
_local3.push(_local9);
}
} else {
return(undefined);
}
mtarget.filters = _local3;
};
MovieClip.prototype.tween = (TextField.prototype.tween = (Sound.prototype.tween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2);
}));
ASSetPropFlags(MovieClip.prototype, "tween", 1, 0);
ASSetPropFlags(TextField.prototype, "tween", 1, 0);
ASSetPropFlags(Sound.prototype, "tween", 1, 0);
MovieClip.prototype.roundedTween = (TextField.prototype.roundedTween = (Sound.prototype.roundedTween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
}));
ASSetPropFlags(MovieClip.prototype, "roundedTween", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedTween", 1, 0);
ASSetPropFlags(Sound.prototype, "roundedTween", 1, 0);
MovieClip.prototype.stopTween = (TextField.prototype.stopTween = (Sound.prototype.stopTween = function (props) {
if (typeof(props) == "string") {
props = [props];
}
if (props != undefined) {
var _local4 = 1;
while (_local4 < arguments.length) {
props.push(arguments[_local4]);
_local4++;
}
}
_global.$stopTween(this, props, true);
}));
ASSetPropFlags(MovieClip.prototype, "stopTween", 1, 0);
ASSetPropFlags(TextField.prototype, "stopTween", 1, 0);
ASSetPropFlags(Sound.prototype, "stopTween", 1, 0);
MovieClip.prototype.pauseTween = (TextField.prototype.pauseTween = (Sound.prototype.pauseTween = function (props) {
if (props != undefined) {
if (typeof(props) == "string") {
props = [props];
}
var _local6 = 1;
while (_local6 < Arguments.length) {
props.push(Arguments[_local6]);
_local6++;
}
}
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local5;
for (var _local7 in _local4) {
if ((_local4[_local7]._targ == this) && (!_local4[_local7]._isPaused)) {
if (props != undefined) {
_local5 = false;
for (var _local6 in props) {
if (props[_local6] == _local4[_local7]._prop) {
_local5 = true;
break;
}
}
}
if ((props == undefined) || (_local5)) {
_local4[_local7]._isPaused = true;
_local4[_local7]._timePaused = _root.__tweenController__.$_tTime;
}
}
}
}));
ASSetPropFlags(MovieClip.prototype, "pauseTween", 1, 0);
ASSetPropFlags(TextField.prototype, "pauseTween", 1, 0);
ASSetPropFlags(Sound.prototype, "pauseTween", 1, 0);
MovieClip.prototype.resumeTween = (TextField.prototype.resumeTween = (Sound.prototype.resumeTween = function (props) {
if (props != undefined) {
if (typeof(props) == "string") {
props = [props];
}
var _local7 = 1;
while (_local7 < Arguments.length) {
props.push(Arguments[_local7]);
_local7++;
}
}
var _local3 = _root.__tweenController__.$_tweenPropList;
var _local5;
var _local6;
for (var _local8 in _local3) {
if ((_local3[_local8]._targ == this) && (_local3[_local8]._isPaused)) {
if (props != undefined) {
_local5 = false;
for (var _local7 in props) {
if (props[_local7] == _local3[_local8]._prop) {
_local5 = true;
break;
}
}
}
if ((props == undefined) || (_local5)) {
_local3[_local8]._isPaused = false;
_local6 = _root.__tweenController__.$_tTime - _local3[_local8]._timePaused;
_local3[_local8]._timeStart = _local3[_local8]._timeStart + _local6;
_local3[_local8]._timeDest = _local3[_local8]._timeDest + _local6;
_local3[_local8]._timePaused = 0;
}
}
}
}));
ASSetPropFlags(MovieClip.prototype, "resumeTween", 1, 0);
ASSetPropFlags(TextField.prototype, "resumeTween", 1, 0);
ASSetPropFlags(Sound.prototype, "resumeTween", 1, 0);
MovieClip.prototype.lockTween = (TextField.prototype.lockTween = (Sound.prototype.lockTween = function () {
this.$_isTweenLocked = true;
ASSetPropFlags(this, "this.$_isTweenLocked", 1, 0);
}));
ASSetPropFlags(MovieClip.prototype, "lockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "lockTween", 1, 0);
ASSetPropFlags(Sound.prototype, "lockTween", 1, 0);
MovieClip.prototype.unlockTween = (TextField.prototype.unlockTween = (Sound.prototype.unlockTween = function () {
delete this.$_isTweenLocked;
}));
ASSetPropFlags(MovieClip.prototype, "unlockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "unlockTween", 1, 0);
ASSetPropFlags(Sound.prototype, "unlockTween", 1, 0);
MovieClip.prototype.getTweens = (TextField.prototype.getTweens = (Sound.prototype.getTweens = function () {
return(this.$_tweenCount);
}));
ASSetPropFlags(MovieClip.prototype, "getTweens", 1, 0);
ASSetPropFlags(TextField.prototype, "getTweens", 1, 0);
ASSetPropFlags(Sound.prototype, "getTweens", 1, 0);
MovieClip.prototype.isTweening = (TextField.prototype.isTweening = (Sound.prototype.isTweening = function () {
return(((this.$_tweenCount > 0) ? true : false));
}));
ASSetPropFlags(MovieClip.prototype, "isTweening", 1, 0);
ASSetPropFlags(TextField.prototype, "isTweening", 1, 0);
ASSetPropFlags(Sound.prototype, "isTweening", 1, 0);
MovieClip.prototype.alphaTo = (TextField.prototype.alphaTo = function (propDest_a, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_alpha", propDest_a, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "alphaTo", 1, 0);
ASSetPropFlags(TextField.prototype, "alphaTo", 1, 0);
MovieClip.prototype.frameTo = function (propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_mc_frame__", propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "frameTo", 1, 0);
MovieClip.prototype.resizeTo = (TextField.prototype.resizeTo = function (propDest_width, propDest_height, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_width", "_height"], [propDest_width, propDest_height], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "resizeTo", 1, 0);
ASSetPropFlags(TextField.prototype, "resizeTo", 1, 0);
MovieClip.prototype.rotateTo = (TextField.prototype.rotateTo = function (propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_rotation", propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "rotateTo", 1, 0);
ASSetPropFlags(TextField.prototype, "rotateTo", 1, 0);
MovieClip.prototype.scaleTo = (TextField.prototype.scaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_xscale", "_yscale"], [propDest_scale, propDest_scale], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "scaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "scaleTo", 1, 0);
MovieClip.prototype.xScaleTo = (TextField.prototype.xScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_xscale", propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "xScaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xScaleTo", 1, 0);
MovieClip.prototype.yScaleTo = (TextField.prototype.yScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_yscale", propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "yScaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yScaleTo", 1, 0);
TextField.prototype.scrollTo = function (propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "scroll", propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(TextField.prototype, "scrollTo", 1, 0);
MovieClip.prototype.slideTo = (TextField.prototype.slideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "slideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "slideTo", 1, 0);
MovieClip.prototype.roundedSlideTo = (TextField.prototype.roundedSlideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedSlideTo", 1, 0);
MovieClip.prototype.xSlideTo = (TextField.prototype.xSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_x", propDest_x, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "xSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xSlideTo", 1, 0);
MovieClip.prototype.roundedXSlideTo = (TextField.prototype.roundedXSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_x", propDest_x, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedXSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedXSlideTo", 1, 0);
MovieClip.prototype.ySlideTo = (TextField.prototype.ySlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_y", propDest_y, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "ySlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "ySlideTo", 1, 0);
MovieClip.prototype.roundedYSlideTo = (TextField.prototype.roundedYSlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_y", propDest_y, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedYSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedYSlideTo", 1, 0);
MovieClip.prototype.bezierSlideTo = (TextField.prototype.bezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = new Object();
_local3.__special_bst_ix__ = undefined;
_local3.__special_bst_iy__ = undefined;
_local3.__special_bst_cx__ = cpoint_x;
_local3.__special_bst_cy__ = cpoint_y;
_local3.__special_bst_dx__ = propDest_x;
_local3.__special_bst_dy__ = propDest_y;
_global.$addTween(this, "__special_bst_t__", 1, timeSeconds, animType, delay, callback, extra1, extra2, _local3);
});
ASSetPropFlags(MovieClip.prototype, "bezierSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "bezierSlideTo", 1, 0);
MovieClip.prototype.roundedBezierSlideTo = (TextField.prototype.roundedBezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = new Object();
_local3.__special_bst_ix__ = undefined;
_local3.__special_bst_iy__ = undefined;
_local3.__special_bst_cx__ = cpoint_x;
_local3.__special_bst_cy__ = cpoint_y;
_local3.__special_bst_dx__ = propDest_x;
_local3.__special_bst_dy__ = propDest_y;
_local3.mustRound = true;
_global.$addTween(this, "__special_bst_t__", 1, timeSeconds, animType, delay, callback, extra1, extra2, _local3);
});
ASSetPropFlags(MovieClip.prototype, "roundedBezierSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedBezierSlideTo", 1, 0);
Sound.prototype.volumeTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_sound_volume__", propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Sound.prototype, "volumeTo", 1, 0);
Sound.prototype.panTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_sound_pan__", propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Sound.prototype, "panTo", 1, 0);
MovieClip.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) {
if (propDest_color == null) {
this.colorTransformTo(100, 0, 100, 0, 100, 0, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2);
} else {
var _local3 = propDest_color >> 16;
var _local5 = (propDest_color & 65280) >> 8;
var _local4 = propDest_color & 255;
this.colorTransformTo(0, _local3, 0, _local5, 0, _local4, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2);
}
};
ASSetPropFlags(MovieClip.prototype, "colorTo", 1, 0);
TextField.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = propDest_color >> 16;
var _local6 = (propDest_color & 65280) >> 8;
var _local4 = propDest_color & 255;
_global.$addTween(this, ["__special_text_r__", "__special_text_g__", "__special_text_b__"], [_local3, _local6, _local4], timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(TextField.prototype, "colorTo", 1, 0);
MovieClip.prototype.colorTransformTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_mc_ra__", "__special_mc_rb__", "__special_mc_ga__", "__special_mc_gb__", "__special_mc_ba__", "__special_mc_bb__", "__special_mc_aa__", "__special_mc_ab__"], [arguments[0].ra, arguments[0].rb, arguments[0].ga, arguments[0].gb, arguments[0].ba, arguments[0].bb, arguments[0].aa, arguments[0].ab], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);
} else {
_global.$addTween(this, ["__special_mc_ra__", "__special_mc_rb__", "__special_mc_ga__", "__special_mc_gb__", "__special_mc_ba__", "__special_mc_bb__", "__special_mc_aa__", "__special_mc_ab__"], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13]);
}
};
ASSetPropFlags(MovieClip.prototype, "colorTransformTo", 1, 0);
MovieClip.prototype.blurTo = (TextField.prototype.blurTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [arguments[0].blurX, arguments[0].blurY], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_blur_quality__:arguments[0].quality});
} else {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [arguments[0], arguments[0]], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], {__special_blur_quality__:arguments[1]});
}
});
ASSetPropFlags(MovieClip.prototype, "blurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "blurTo", 1, 0);
MovieClip.prototype.xyBlurTo = (TextField.prototype.xyBlurTo = function (propDest_blurX, propDest_blurY, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [propDest_blurX, propDest_blurY], timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "xyBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyBlurTo", 1, 0);
MovieClip.prototype.xBlurTo = (TextField.prototype.xBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_blur_x__", propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "xBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xBlurTo", 1, 0);
MovieClip.prototype.yBlurTo = (TextField.prototype.yBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_blur_y__", propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "yBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yBlurTo", 1, 0);
MovieClip.prototype.glowTo = (TextField.prototype.glowTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [arguments[0].color, arguments[0].alpha, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_glow_quality__:arguments[0].quality, __special_glow_inner__:arguments[0].inner, __special_glow_knockout__:arguments[0].knockout});
} else {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [arguments[0], arguments[1], arguments[2], arguments[2], arguments[3]], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], {__special_glow_quality__:arguments[4], __special_glow_inner__:arguments[5], __special_glow_knockout__:arguments[6]});
}
});
ASSetPropFlags(MovieClip.prototype, "glowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "glowTo", 1, 0);
MovieClip.prototype.xyGlowTo = (TextField.prototype.xyGlowTo = function (propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xyGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyGlowTo", 1, 0);
MovieClip.prototype.xGlowTo = (TextField.prototype.xGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xGlowTo", 1, 0);
MovieClip.prototype.yGlowTo = (TextField.prototype.yGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurY__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "yGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yGlowTo", 1, 0);
MovieClip.prototype.bevelTo = (TextField.prototype.bevelTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_strength__"], [arguments[0].distance, arguments[0].angle, arguments[0].highlightColor, arguments[0].highlightAlpha * 100, arguments[0].shadowColor, arguments[0].shadowAlpha * 100, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_bevel_quality__:arguments[0].quality, __special_bevel_type__:arguments[0].type, __special_bevel_knockout__:arguments[0].knockout});
} else {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_strength__"], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[6], arguments[7]], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], {__special_bevel_quality__:arguments[8], __special_bevel_type__:arguments[9], __special_bevel_knockout__:arguments[10]});
}
});
ASSetPropFlags(MovieClip.prototype, "bevelTo", 1, 0);
ASSetPropFlags(TextField.prototype, "bevelTo", 1, 0);
MovieClip.prototype.xyBevelTo = (TextField.prototype.xyBevelTo = function (propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blurX, propDest_blurY, propDest_strength, quality, type, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_blurY__", "__special_bevel_strength__"], [propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blur, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_bevel_quality__:quality, __special_bevel_type__:type, __special_bevel_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xyBevelTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyBevelTo", 1, 0);
_global.findPointOnCurve = function (p1x, p1y, cx, cy, p2x, p2y, t) {
return({x:p1x + (t * (((2 * (1 - t)) * (cx - p1x)) + (t * (p2x - p1x)))), y:p1y + (t * (((2 * (1 - t)) * (cy - p1y)) + (t * (p2y - p1y))))});
};
ASSetPropFlags(_global, "findPointOnCurve", 1, 0);
_global.findTweenColor = function (objProp, tTime) {
var _local8 = objProp._propStart >> 16;
var _local4 = objProp._propDest >> 16;
var _local5 = (objProp._propStart >> 8) & 255;
var _local6 = (objProp._propDest >> 8) & 255;
var _local9 = objProp._propStart & 255;
var _local7 = objProp._propDest & 255;
var _local12 = Math.round(_global.findTweenValue(_local8, _local4, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
var _local10 = Math.round(_global.findTweenValue(_local5, _local6, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
var _local3 = Math.round(_global.findTweenValue(_local9, _local7, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
return(((_local12 << 16) + (_local10 << 8)) + _local3);
};
_global.findTweenValue = function (_propStart, _propDest, _timeStart, _timeNow, _timeDest, _animType, _extra1, _extra2) {
var _local1 = _timeNow - _timeStart;
var _local4 = _propStart;
var _local2 = _propDest - _propStart;
var _local3 = _timeDest - _timeStart;
var _local6 = _extra1;
var _local7 = _extra2;
var _local5 = _extra1;
switch (_animType.toLowerCase()) {
case "linear" :
return(((_local2 * _local1) / _local3) + _local4);
case "easeinquad" :
_local1 = _local1 / _local3;
return(((_local2 * _local1) * _local1) + _local4);
case "easeoutquad" :
_local1 = _local1 / _local3;
return((((-_local2) * _local1) * (_local1 - 2)) + _local4);
case "easeinoutquad" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((_local2 / 2) * _local1) * _local1) + _local4);
}
_local1--;
return((((-_local2) / 2) * ((_local1 * (_local1 - 2)) - 1)) + _local4);
case "easeoutinquad" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuad") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuad") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeincubic" :
_local1 = _local1 / _local3;
return((((_local2 * _local1) * _local1) * _local1) + _local4);
case "easeoutcubic" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((_local1 * _local1) * _local1) + 1)) + _local4);
case "easeinoutcubic" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((((_local2 / 2) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((_local1 * _local1) * _local1) + 2)) + _local4);
case "easeoutincubic" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutCubic") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInCubic") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinquart" :
_local1 = _local1 / _local3;
return(((((_local2 * _local1) * _local1) * _local1) * _local1) + _local4);
case "easeoutquart" :
_local1 = (_local1 / _local3) - 1;
return(((-_local2) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + _local4);
case "easeinoutquart" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return((((-_local2) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 2)) + _local4);
case "easeoutinquart" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuart") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuart") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinquint" :
_local1 = _local1 / _local3;
return((((((_local2 * _local1) * _local1) * _local1) * _local1) * _local1) + _local4);
case "easeoutquint" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + _local4);
case "easeinoutquint" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 2)) + _local4);
case "easeoutinquint" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuint") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuint") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinsine" :
return((((-_local2) * Math.cos((_local1 / _local3) * (Math.PI/2))) + _local2) + _local4);
case "easeoutsine" :
return((_local2 * Math.sin((_local1 / _local3) * (Math.PI/2))) + _local4);
case "easeinoutsine" :
return((((-_local2) / 2) * (Math.cos((Math.PI * _local1) / _local3) - 1)) + _local4);
case "easeoutinsine" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutSine") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInSine") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinexpo" :
return(((_local1 == 0) ? (_local4) : ((_local2 * Math.pow(2, 10 * ((_local1 / _local3) - 1))) + _local4)));
case "easeoutexpo" :
return(((_local1 == _local3) ? (_local4 + _local2) : ((_local2 * ((-Math.pow(2, (-10 * _local1) / _local3)) + 1)) + _local4)));
case "easeinoutexpo" :
if (_local1 == 0) {
return(_local4);
}
if (_local1 == _local3) {
return(_local4 + _local2);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((_local2 / 2) * Math.pow(2, 10 * (_local1 - 1))) + _local4);
}
_local1--;
return(((_local2 / 2) * ((-Math.pow(2, -10 * _local1)) + 2)) + _local4);
case "easeoutinexpo" :
if (_local1 == 0) {
return(_local4);
}
if (_local1 == _local3) {
return(_local4 + _local2);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((_local2 / 2) * ((-Math.pow(2, (-10 * _local1) / 1)) + 1)) + _local4);
}
return(((_local2 / 2) * (Math.pow(2, (10 * (_local1 - 2)) / 1) + 1)) + _local4);
case "easeincirc" :
_local1 = _local1 / _local3;
return(((-_local2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local4);
case "easeoutcirc" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * Math.sqrt(1 - (_local1 * _local1))) + _local4);
case "easeinoutcirc" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((-_local2) / 2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (Math.sqrt(1 - (_local1 * _local1)) + 1)) + _local4);
case "easeoutincirc" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutCirc") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInCirc") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / _local3;
if (_local1 == 1) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.3;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
_local1 = _local1 - 1;
return((-((_local6 * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7))) + _local4);
case "easeoutelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / _local3;
if (_local1 == 1) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.3;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
return((((_local6 * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7)) + _local2) + _local4);
case "easeinoutelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 == 2) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.45;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
if (_local1 < 1) {
_local1 = _local1 - 1;
return((-0.5 * ((_local6 * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7))) + _local4);
}
_local1 = _local1 - 1;
return(((((_local6 * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7)) * 0.5) + _local2) + _local4);
case "easeoutinelastic" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutElastic") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInElastic") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = _local1 / _local3;
return((((_local2 * _local1) * _local1) * (((_local5 + 1) * _local1) - _local5)) + _local4);
case "easeoutback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((_local1 * _local1) * (((_local5 + 1) * _local1) + _local5)) + 1)) + _local4);
case "easeinoutback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
_local5 = _local5 * 1.525;
return(((_local2 / 2) * ((_local1 * _local1) * (((_local5 + 1) * _local1) - _local5))) + _local4);
}
_local1 = _local1 - 2;
_local5 = _local5 * 1.525;
return(((_local2 / 2) * (((_local1 * _local1) * (((_local5 + 1) * _local1) + _local5)) + 2)) + _local4);
case "easeoutinback" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutBack") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInBack") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinbounce" :
return((_local2 - findTweenValue(0, _local2, 0, _local3 - _local1, _local3, "easeOutBounce")) + _local4);
case "easeoutbounce" :
_local1 = _local1 / _local3;
if (_local1 < 0.363636363636364) {
return((_local2 * ((7.5625 * _local1) * _local1)) + _local4);
}
if (_local1 < 0.727272727272727) {
_local1 = _local1 - 0.545454545454545;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.75)) + _local4);
}
if (_local1 < 0.909090909090909) {
_local1 = _local1 - 0.818181818181818;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.9375)) + _local4);
}
_local1 = _local1 - 0.954545454545455;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.984375)) + _local4);
case "easeinoutbounce" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeInBounce") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeOutBounce") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeoutinbounce" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutBounce") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInBounce") * 0.5) + (_local2 * 0.5)) + _local4);
}
trace(("MC TWEEN ### Error on transition: there's no \"" + _animType) + "\" animation type.");
return(0);
};
ASSetPropFlags(_global, "findTweenValue", 1, 0);
if (yTo == undefined) {
yTo = startMenu.menuPanel._y;
}
registerButton(mcSound, function () {
trace("mcSound triggered");
if (_root.soundEnabled) {
trace("shoud stop all sounds");
stopAllSounds();
var _local2 = new Sound(_root);
_local2.setVolume(0);
_root.soundEnabled = false;
mcSound.gotoAndStop(2);
} else {
var _local2 = new Sound(_root);
_local2.setVolume(100);
_root.soundEnabled = true;
mcSound.gotoAndStop(1);
}
}, "dark");
initMenu();
stop();
Frame 3
startMenu.alphaTo(0, 0.5, "linear", 0, function () {
gamefield.initGame();
});
stop();
Symbol 8 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 493 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.2");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Symbol 23 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 27 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 31 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 35 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 60 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 67 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 70 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 74 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 75 MovieClip Frame 1
var menuObj = _parent._parent;
var currentPage = (menuObj._currentframe - 1);
_root.registerButton(mcWeiter, function () {
menuObj.gotoPage(currentPage + 2);
});
_root.registerButton(mcZurueck, function () {
menuObj.gotoPage(currentPage);
});
if (currentPage == 1) {
mcZurueck._visible = false;
} else if (currentPage >= (menuObj._totalframes - 1)) {
mcWeiter._visible = false;
}
_root.registerButton(mcMenu, function () {
menuObj.gotoPage(1);
});
Symbol 76 MovieClip Frame 1
function doAnimation() {
tresor.gotoAndStop(1);
tresor.frameTo(52, 3, "linear", 3, function () {
this.alphaTo(100, 0, "linear", 1, doAnimation);
});
var _local4;
_local4 = 1;
while (_local4 < 52) {
var _local3 = ((_local4 / 52) * 3) + 1;
var _local5 = _local4 + 20;
var _local2 = coin.duplicateMovieClip("c" + _local5, _local5);
_local2.gotoAndPlay(random(_local2._totalframes) + 1);
_local2._alpha = 0;
_local2._visible = false;
_local2._xscale = (_local2._yscale = 50);
_local2._x = _local2._x + random(30);
_local2._y = _local2._y + (random(10) - 5);
_local2.alphaTo(100, 0, "linear", _local3, function () {
this._visible = true;
});
_local2.xSlideTo(_local2._x + 200, 2, "linear", _local3);
_local2.ySlideTo(obY - 150, 1, "easeoutsine", _local3);
_local2.ySlideTo(obY - 50, 1, "easeinsine", _local3 + 1, removeMovieClip);
_local4++;
}
}
stop();
var obY = coin._y;
doAnimation();
Symbol 79 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 92 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 1
function blinkInterval() {
this.scaleTo(size, 0.4, "linear", Math.random() * 9, function () {
this.scaleTo(0, 0.4, "linear", 0, blinkInterval);
});
}
_xscale = 0;
_yscale = 0;
size = 100 + random(30);
blinkInterval();
Symbol 187 MovieClip [diamond] Frame 1
function setStone(nr) {
gotoAndStop(nr);
gem.gotoAndStop(1);
}
Symbol 189 MovieClip Frame 1
function doAnimation() {
waage.gotoAndStop(1);
waage._y = wY;
waage.frameTo(6, 3, "linear", 3, function () {
this.alphaTo(100, 0, "linear", 2, doAnimation);
});
waage.ySlideTo(wY + 10, 3, "linear", 3, function () {
coinObj = this.attachMovie("diamond", "d", 20);
coinObj.gotoAndStop(10);
coinObj._x = coinObj._x + 30;
coinObj._y = coinObj._y - 12;
coinObj.xSlideTo(coinObj._x + 80, 1, "linear");
coinObj.ySlideTo(coinObj._y - 50, 0.5, "easeoutsine");
coinObj.ySlideTo(coinObj._y, 0.5, "easeinsine", 0.5);
coinObj.alphaTo(0, 0.5, "linear", 0.5, removeMovieClip);
});
var _local4;
_local4 = 1;
while (_local4 < 52) {
var _local3 = ((_local4 / 52) * 3) + 1;
var _local5 = _local4 + 20;
var _local2 = gem.duplicateMovieClip("c" + _local5, _local5);
_local2.gotoAndStop(1 + random(8));
_local2.gem.gotoAndStop(1);
_local2._visible = 0;
_local2._xscale = (_local2._yscale = 50);
_local2._x = _local2._x + (random(20) - 10);
_local2._y = _local2._y + (random(10) - 5);
_local2.alphaTo(100, 0, "linear", _local3, function () {
this._visible = true;
});
_local2.xSlideTo(_local2._x + 200, 2, "linear", _local3);
_local2.ySlideTo((obY - random(100)) - 30, 1, "easeoutquad", _local3);
_local2.ySlideTo(obY, 1, "easeinquad", _local3 + 1, removeMovieClip);
_local4++;
}
}
stop();
var obY = gem._y;
var wY = waage._y;
gem.gotoAndStop(1);
gem.gem.gotoAndStop(1);
gem.countdown = random(20);
gem.onEnterFrame = function () {
if (this.countdown <= 0) {
this.countdown = random(20);
this.gotoAndStop(1 + random(8));
this.gem.gotoAndStop(1);
} else {
this.countdown--;
}
};
doAnimation();
Symbol 192 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 204 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 231 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 245 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 252 MovieClip Frame 1
function doAnimation() {
tresor.gotoAndStop(1);
mcGameClock.gotoAndStop(1);
tresor.frameTo(52, 5, "linear", 1);
mcGameClock.frameTo(80, 5, "linear", 1, function () {
this.alphaTo(100, 0, "linear", 1, doAnimation);
});
}
stop();
var obY = coin._y;
doAnimation();
Symbol 253 MovieClip Frame 1
function gotoPage(page) {
this.ySlideTo(-410, 0.3, "easeinoutsine", 0, function () {
gotoAndStop(page);
this.ySlideTo(this.initY, 0.3, "easeinoutsine");
});
}
stop();
_root.registerButton(mcStartGame, _root.playGame);
_root.registerButton(mcDownloadGame, _root.dlGame);
_root.registerButton(mcTutorial, function () {
gotoPage(2);
});
Symbol 259 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 262 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 263 MovieClip Frame 1
gotoAndStop(2 - _root.soundEnabled);
Symbol 299 MovieClip [diamondFX] Frame 1
stop();
Symbol 299 MovieClip [diamondFX] Frame 11
stop();
this.removeMovieClip();
Symbol 300 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 1
scoreField.htmlText = "<b>000000000</b>";
Symbol 351 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 9
stop();
Symbol 363 MovieClip Frame 9
stop();
Symbol 398 MovieClip Frame 1
_parent.playerStopped = true;
Symbol 398 MovieClip Frame 34
_parent.playerStopped = false;
_parent.gotoAndStop(1);
Symbol 400 MovieClip Frame 65
_parent._parent.nextLevel();
Symbol 403 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 1
gotoAndStop(_root.branding);
Symbol 415 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 419 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 421 MovieClip Frame 1
_root.registerButton(mcExitGame, _parent.exitGame, "dark");
_root.registerButton(mcDownload, _root.dlGame, "dark");
Symbol 425 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 426 MovieClip Frame 41
_parent.gotoAndStop(1);
Symbol 429 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 430 MovieClip Frame 41
_parent.gotoAndStop(1);
Symbol 431 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 464 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 469 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 474 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 479 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 481 MovieClip Frame 4
var i;
i = 0;
while (i < 8) {
var obj = diamonds["d" + i];
obj.gotoAndStop(6);
i++;
}
Symbol 490 MovieClip Frame 1
gotoAndStop(_root.language);
Symbol 491 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 1
function playSound(id, vol, pan) {
if (!_root.soundEnabled) {
return(undefined);
}
var _local2 = new Sound(soundClip);
_local2.attachSound(id);
if (pan != undefined) {
_local2.setPan(pan);
}
if (vol != undefined) {
_local2.setVolume(vol);
}
_local2.start(0);
}
function getTimeStr(time) {
var _local2 = Math.floor(time / 60);
var _local1 = time % 60;
if (_local1 < 10) {
_local1 = "0" + _local1;
}
return((_local2 + ":") + _local1);
}
function messageWindow(type, params) {
switch (type) {
case "level" :
trace("msgWindow LEVEL");
mcMsgWin.gotoAndStop(1);
mcMsgWin.win.level.htmlText = ("<b>" + params.nr) + "</b>";
mcMsgWin.win.timeleft.htmlText = ("<b>" + getTimeStr(params.time)) + "</b>";
mcMsgWin.win.goldvalue.htmlText = ("<b>" + (params.diamondsPerCoin * 10)) + "</b>";
_root.registerButton(mcMsgWin.win.mcDownload, _root.dlGame, "dark");
if (params.description) {
mcMsgWin.description = params.description;
_root.unRegisterButton(mcMsgWin.win.okButton);
mcMsgWin.win.okButton.gotoAndStop(2);
mcMsgWin.win.okButton.frameTo(1, 0, "linear", 2, function () {
_root.registerButton(this, function () {
mcMsgWin.ySlideTo(-400, 1, "easeoutcubic", 0, function () {
messageWindow("description", this.description);
}, "dark");
});
});
} else {
_root.unRegisterButton(mcMsgWin.win.okButton);
mcMsgWin.win.okButton.gotoAndStop(2);
mcMsgWin.win.okButton.frameTo(1, 0, "linear", 2, function () {
_root.registerButton(this, continueGame, "dark");
});
}
break;
case "description" :
trace("msgWindow DESCRIPTION");
mcMsgWin.gotoAndStop(2);
mcMsgWin.win.gotoAndStop(params);
_root.registerButton(mcMsgWin.win.okButton, function () {
continueGame();
}, "dark");
break;
case "won" :
mcMsgWin.gotoAndStop(3);
mcMsgWin.win.score.htmlText = ("<b>" + params.score) + "</b>";
mcMsgWin.win.gold.htmlText = ("<b>" + params.gold) + "</b>";
_root.registerButton(mcMsgWin.win.mcDownload, _root.dlGame, "dark");
_root.unRegisterButton(mcMsgWin.win.okButton);
mcMsgWin.win.okButton.gotoAndStop(2);
mcMsgWin.win.okButton.frameTo(1, 0, "linear", 2, function () {
_root.registerButton(this, function () {
exitGame();
}, "dark");
});
}
mcMsgWin.ySlideTo(msgWinY, 1, "easeoutback");
}
function GameStone(nr, subtype) {
this.nr = nr;
this.subtype = subtype;
return(stone);
}
function addScore(pts) {
levelScore = levelScore + pts;
playerStats.score = playerStats.score + pts;
if (levelScore < 0) {
levelScore = 0;
}
if (playerStats.score < 0) {
playerStats.score = 0;
}
scoreDisplay.stopTween();
scoreDisplay.blurTo({blurX:0, blurY:16, quality:1}, 0.1, "easeoutexpo", 0, function () {
var _local2 = playerStats.score + "";
while (_local2.length < 9) {
_local2 = "0" + _local2;
}
this.scoreField.htmlText = ("<b>" + _local2) + "</b>";
this.blurTo({blurX:0, blurY:0, quality:1}, 0.1, "easeinexpo", 0.1);
});
}
function scoreSpawn(pts, obj) {
addScore(pts);
var _local4 = obj._x;
var _local2 = obj._y;
if (obj._parent == raster) {
_local4 = _local4 + (raster._x + 18);
_local2 = _local2 + (raster._y - 36);
}
var _local3 = animation.getNextHighestDepth();
var _local1 = animation.attachMovie("scoreSpawn", "ss" + _local3, _local3);
_local1.gotoAndStop(((pts > 0) ? 1 : 2));
_local1.scoreField.htmlText = ("<b>" + pts) + "</b>";
_local1.scoreField.autoSize = "center";
_local1._x = _local4;
_local1._y = _local2;
_local1._alpha = 0;
_local1.ySlideTo(_local2 - 60, 2, "linear", 0, removeMovieClip);
_local1.alphaTo(100, 0.25, "linear");
_local1.alphaTo(0, 0.5, "easeincubic", 1.5);
}
function gemHandlers(handler, obj) {
switch (handler) {
case "unfreeze" :
obj.gem.gotoAndStop(1);
var _local3 = animation.getNextHighestDepth();
var _local2 = animation.attachMovie("diamondFX", "fx" + _local3, _local3);
_local2._x = obj._x + 18;
_local2._y = obj._y + 18;
if (obj._parent == raster) {
_local2._x = _local2._x + raster._x;
_local2._y = _local2._y + raster._y;
}
_local2.frameTo(10, 0.5, "linear", 0, removeMovieClip);
playSound("unfreeze");
obj.stoneObj.subtype = ST_NORMAL;
obj.stoneObj.handlers = null;
break;
case "hurt" :
mcPlayer.gotoAndStop(3);
playerStones = [];
obj.stopTween();
scoreSpawn(-250, obj);
obj.removeMovieClip();
playSound("rockhit");
break;
case "getcoin" :
getCoin(obj._x, obj._y, 0);
obj.stopTween();
obj.removeMovieClip();
playSound("getcoin");
break;
case "getcake" :
currentLevel.time = currentLevel.time + 10;
scoreSpawn(100, obj);
obj.removeMovieClip();
playSound("cake");
break;
default :
trace("Unknown handler:" + handler);
}
}
function setStone(x, y, stone) {
var _local4 = raster.getNextHighestDepth();
var _local1 = raster.attachMovie("diamond", (("d" + x) + "_") + y, _local4);
_local1._x = x * stepsizeX;
_local1._y = y * stepsizeY;
_local1.x = x;
_local1.y = y;
_local1.setStone(stone);
if (!rasterField[y]) {
rasterField[y] = [null, null, null, null, null, null, null, null];
}
rasterField[y][x] = stone;
return(_local1);
}
function setNewRow(row, allowFalling) {
j = 0;
while (j < 8) {
var _local1 = currentLevel.stonePalette[random(currentLevel.stoneTypes)];
var _local2 = ST_NORMAL;
if ((currentLevel.frozenChance > 0) && (Math.random() < currentLevel.frozenChance)) {
_local2 = ST_FROZEN;
} else if (allowFalling) {
if ((currentLevel.rockChance > 0) && (Math.random() < currentLevel.rockChance)) {
_local1 = ITEM_ROCK;
} else if ((currentLevel.coinChance > 0) && (Math.random() < currentLevel.coinChance)) {
_local1 = ITEM_COIN;
} else if ((currentLevel.cakeChance > 0) && (Math.random() < currentLevel.cakeChance)) {
_local1 = ITEM_CAKE;
}
}
var _local3 = new GameStone(_local1, _local2);
setStone(j, row, _local3, 0);
j++;
}
}
function fillRaster() {
if (rasterPosition >= 0) {
setNewRow(rasterPosition, true);
rasterPosition--;
}
}
function initRaster() {
var _local1;
rasterSize = 128;
rasterField = [];
stonePalette = currentLevel.stonePalette;
raster._y = (-rasterSize) * stepsizeY;
lastVisibleLine = Math.max(rasterSize, 0);
var _local2 = getTimer();
_local1 = 127;
while (_local1 > 110) {
setNewRow(_local1, _local1 < (rasterSize - 1));
_local1--;
}
rasterPosition = _local1;
trace(("Built in " + (getTimer() - _local2)) + " msecs");
scrollRaster();
}
function getRasterHeight() {
var _local2;
var _local3 = rasterField.length;
_local2 = rasterField.length - 1;
while (_local2 >= 0) {
var _local1;
_local1 = 0;
while (_local1 < 8) {
if (rasterField[_local2][_local1] != null) {
break;
}
_local1++;
}
if (_local1 < 8) {
_local3 = _local2 + 1;
break;
}
_local2--;
}
if (_local3 < rasterField.length) {
rasterField = rasterField.slice(0, _local3);
}
return(_local3);
}
function getPSCoords(nr) {
var _local1 = (mcPlayer._y - 82) - (nr * stepsizeY);
var _local2 = mcPlayer._x - 14;
return({x:_local2, y:_local1});
}
function getRasterCoords(x, y) {
return({x:raster._x + (x * stepsizeX), y:raster._y + (y * stepsizeY)});
}
function addPlayerStone(stone, col, row) {
var _local6 = raster[(("d" + col) + "_") + row];
var _local8 = _local6._x + raster._x;
var _local7 = _local6._y + raster._y;
_local6.removeMovieClip();
var _local5 = animation.getNextHighestDepth();
var _local2 = animation.attachMovie("diamond", "d" + _local5, _local5);
_local2.setStone(stone);
_local2._x = _local8;
_local2._y = _local7;
_local2.pos = playerStones.length;
_local2.stone = stone;
waitForFinish++;
_local2.onEnterFrame = function () {
var _local2 = getPSCoords(0);
_local2.x = _local2.x + gemsOnArms[this.pos].x;
_local2.y = _local2.y + gemsOnArms[this.pos].y;
this._x = this._x + ((_local2.x - this._x) * 0.5);
this._y = this._y + 45;
if (this._y > _local2.y) {
var _local4 = mcPlayer.stoneHolder;
var _local3 = _local4.attachMovie("diamond", "d" + this.pos, this.pos);
_local3.setStone(this.stone);
_local3._y = gemsOnArms[this.pos].y;
_local3._x = gemsOnArms[this.pos].x;
this.removeMovieClip();
waitForFinish--;
}
};
playerStones.push(stone);
rasterField[row][col] = null;
}
function getPlayerCol() {
return(Math.floor((mcPlayer._x - raster._x) / stepsizeX));
}
function moveStone(x0, y0, x1, y1) {
var _local4 = rasterField[y0][x0];
if (raster[(("d" + x1) + "_") + y1]) {
raster[(("d" + x1) + "_") + y1].removeMovieClip();
}
if (_local4 != null) {
if (raster[(("d" + x0) + "_") + y0]) {
raster[(("d" + x0) + "_") + y0].removeMovieClip();
}
var _local7 = raster.getNextHighestDepth();
var _local1 = raster.attachMovie("diamond", (("d" + x1) + "_") + y1, _local7);
_local1._x = x0 * stepsizeX;
_local1._y = y0 * stepsizeY;
_local1.x = x1;
_local1.y = y1;
_local1.setStone(_local4);
_local1.stone = _local4;
_local1.slideTo(x1 * stepsizeX, y1 * stepsizeY, 0.5, "easeoutbounce");
}
rasterField[y1][x1] = _local4;
rasterField[y0][x0] = null;
}
function collapseField(collapseMultiplier) {
var _local3;
var _local2;
var _local10 = [];
var collisions = [];
checkFallingObjects();
_local3 = 0;
while (_local3 < 8) {
var _local4 = 0;
_local4 = rasterField.length - 1;
while (_local4 >= lastVisibleLine) {
if (rasterField[_local4][_local3] != null) {
break;
}
_local4--;
}
_local4++;
var _local5 = 0;
_local2 = lastVisibleLine;
while (_local2 < _local4) {
var _local8 = rasterField[_local2][_local3];
if (_local8 == null) {
_local5++;
collisions.push({x:_local3, y:_local2 - _local5});
} else if (_local5 > 0) {
_local10.push({x0:_local3, y0:_local2, x1:_local3, y1:_local2 - _local5});
}
_local2++;
}
_local3++;
}
var _local11;
_local11 = 0;
while (_local11 < _local10.length) {
var _local7 = _local10[_local11];
moveStone(_local7.x0, _local7.y0, _local7.x1, _local7.y1);
_local11++;
}
if (collisions) {
justATimer.collapseMultiplier = collapseMultiplier;
justATimer.collisions = collisions;
justATimer.alphaTo(100, 0, "linear", 0.5, function () {
var _local4;
_local4 = 0;
while (_local4 < this.collisions.length) {
var _local2 = this.collisions[_local4];
var _local3 = rasterField[_local2.y + 1][_local2.x];
var _local7;
_local7 = _local3.handlers.onCollapse;
if (_local7) {
gemHandlers(_local7, _local3.gemObj);
}
if (_local2.y >= 0) {
var _local6;
var _local5 = rasterField[_local2.y][_local2.x];
_local6 = _local5.handlers.onHit;
if (_local6) {
playSound("pushstones");
gemHandlers(_local6, _local5.gemObj);
}
}
checkAdjacent(_local2.x, _local2.y + 1, _local3, collapseMultiplier);
_local4++;
}
checkFallingObjects();
scrollRaster();
});
}
}
function makeFall(obj) {
var _local4 = animation.getNextHighestDepth();
var _local2 = animation.attachMovie("diamond", "fall" + _local4, _local4);
_local2._x = obj.gemObj._x + raster._x;
_local2._y = obj.gemObj._y + raster._y;
rasterField[obj.gemObj.y][obj.gemObj.x] = null;
obj.gemObj.removeMovieClip();
if (obj.nr == ITEM_ROCK) {
playSound("rock");
}
_local2.setStone(obj);
_local2.onTweenUpdate = function (propName) {
if (propName == "_y") {
if (((this._y > ((mcPlayer._y - mcPlayer._height) - 36)) && (this._x > (mcPlayer._x - 35))) && (this._x < (mcPlayer._x + 35))) {
var _local2;
_local2 = this.stoneObj.handlers.onHitPlayer;
if (_local2) {
gemHandlers(_local2, this);
}
}
}
};
fallTime = (400 - _local2._y) / 400;
_local2.ySlideTo(mcPlayer._y, fallTime, "easeinquad", 0, removeMovieClip);
}
function checkFallingObjects() {
var _local3;
var _local2;
_local3 = 0;
while (_local3 < 8) {
_local2 = rasterField.length - 1;
while (_local2 >= lastVisibleLine) {
var _local1 = rasterField[_local2][_local3];
if (_local1 != null) {
if (((_local1.nr == ITEM_ROCK) || (_local1.nr == ITEM_COIN)) || (_local1.nr == ITEM_CAKE)) {
makeFall(_local1);
}
if (_local1.nr <= 8) {
break;
}
}
_local2--;
}
_local3++;
}
}
function checkAdjacent_r(x, y, stone) {
if (stone.nr > 8) {
return(undefined);
}
if ((((y > (rasterField.length - 1)) || (x > 7)) || (x < 0)) || (y < lastVisibleLine)) {
return(undefined);
}
if (adjacentHash[(x + "_") + y] != undefined) {
return(undefined);
}
adjacentHash[(x + "_") + y] = true;
if (((rasterField[y][x] != null) && (rasterField[y][x].subtype != ST_FROZEN)) && (rasterField[y][x].equals(stone))) {
adjacentStones.push({x:x, y:y});
} else {
return(undefined);
}
checkAdjacent_r(x - 1, y, stone);
checkAdjacent_r(1 + x, y, stone);
checkAdjacent_r(x, y - 1, stone);
checkAdjacent_r(x, 1 + y, stone);
}
function checkAdjacent(x, y, stone, collapseMultiplier) {
adjacentHash = {};
adjacentStones = [];
checkAdjacent_r(x, y, stone);
var _local4;
if (adjacentStones.length > 2) {
playSound("collapse");
var _local19 = 0;
x = 0;
y = 0;
_local4 = 0;
while (_local4 < adjacentStones.length) {
var _local9 = _local4 * 0.1;
var _local3 = adjacentStones[_local4];
var _local8 = rasterField[_local3.y][_local3.x];
rasterField[_local3.y][_local3.x] = null;
var _local7 = raster[(("d" + _local3.x) + "_") + _local3.y];
var _local6 = getRasterCoords(_local3.x, _local3.y);
var _local5 = animation.getNextHighestDepth();
var _local2 = animation.attachMovie("diamond", "d" + _local5, _local5);
_local2.setStone(_local8);
_local2._x = _local6.x;
_local2._y = _local6.y;
x = x + _local2._x;
y = y + _local2._y;
_local2.rotateTo(-90, 1, "linear");
_local2.scaleTo(20, 1, "easeinexpo");
_local2.xSlideTo(60, 1, "linear", 0, advanceWaage);
_local2.glowTo({blurX:16, blurY:16, strength:4, color:16777215, quality:1}, 0.5);
_local2.ySlideTo(50, 0.5, "easeoutsine", 0);
_local2.ySlideTo(kristallWaage._y + kristallWaage.waage._y, 0.5, "easeinsine", 0.5, removeMovieClip);
_local7.removeMovieClip();
_local4++;
}
scoreSpawn(Math.round(_local4 * collapseMultiplier), {_x:x / _local4, _y:y / _local4});
}
justATimer.stopTween();
justATimer.collapseMultiplier = collapseMultiplier + 25;
justATimer.alphaTo(100, 0, "linear", 0.31 + _local9, function () {
collapseField(this.collapseMultiplier);
});
}
function advanceWaage() {
var _local1 = currentLevel.diamondsPerCoin * 8;
kwScore++;
if (kwScore > _local1) {
emptyWaage();
kwScore = kwScore - _local1;
}
var _local3 = (kwScore / _local1) * 80;
var _local2 = Math.ceil((kwScore / _local1) * kristallWaage.waage._totalframes) + 1;
kristallWaage.waage.gotoAndStop(_local2);
kristallWaage.waage.ySlideTo(_local3, 1, "easeoutback");
}
function getCoin(x, y, delay) {
playerStats.gold++;
var _local5 = animation.getNextHighestDepth();
var _local3 = animation.attachMovie("diamond", "d" + _local5, _local5);
_local3.gotoAndStop(ITEM_COIN);
_local3._alpha = 0;
_local3._xscale = (_local3._yscale = 75);
_local3._x = x;
_local3._y = y;
_local3.alphaTo(100, 0, "linear", delay);
_local3.rotateTo(180, 1, "linear", delay);
_local3.xSlideTo(488, 1, "linear", delay);
_local3.ySlideTo(50, 0.5, "easeoutsine", delay);
_local3.ySlideTo(255, 0.5, "easeinsine", 0.5 + delay, function () {
mcTresor.nextFrame();
if (mcTresor._currentframe == mcTresor._totalframes) {
levelWon();
}
goldDisplay.stopTween();
goldDisplay.blurTo({blurX:0, blurY:16, quality:1}, 0.1, "easeoutexpo", 0, function () {
var _local2 = playerStats.gold + "";
while (_local2.length < 6) {
_local2 = "0" + _local2;
}
this.goldField.htmlText = ("<b>" + _local2) + "</b>";
});
goldDisplay.blurTo({blurX:0, blurY:0, quality:1}, 0.1, "easeinexpo", 0.1);
this.removeMovieClip();
});
}
function emptyWaage() {
var _local1;
playSound("diamondgold");
_local1 = 0;
while (_local1 < 10) {
var _local2 = _local1 * 0.075;
var _local4 = (kristallWaage._x + 20) + random(80);
var _local3 = ((kristallWaage._y + 115) - ((_local1 / 40) * 115)) - random(20);
getCoin(_local4, _local3, _local2);
_local1++;
}
}
function pushStones() {
if (waitForFinish > 0) {
return(undefined);
}
var _local7 = getPlayerCol();
var yOffset = (rasterField.length - 1);
while (yOffset >= 0) {
if (rasterField[yOffset][_local7] != null) {
break;
}
yOffset--;
}
yOffset++;
var _local3;
_local3 = 0;
while (_local3 < playerStones.length) {
var _local5 = _local3;
var _local4 = getPSCoords(0);
_local4.x = _local4.x - (raster._x + gemsOnArms[_local5].x);
_local4.y = _local4.y - (raster._y + gemsOnArms[_local5].y);
mcPlayer.stoneHolder["d" + _local3].removeMovieClip();
var _local2 = setStone(_local7, _local3 + yOffset, playerStones[_local3]);
_local2.xTo = _local2._x;
_local2.yTo = _local2._y;
_local2._x = _local4.x;
_local2._y = _local4.y;
if (_local3 == (playerStones.length - 1)) {
_local2.col = _local7;
_local2.yOffset = yOffset;
_local2.ps = playerStones[0];
}
_local2.slideTo(_local2.xTo, _local2.yTo, 0.3, "easeoutcubic", 0, function () {
var _local4;
_local4 = this.stoneObj.handlers.onShoot;
if (_local4) {
gemHandlers(_local4, this);
}
if (this.col != undefined) {
if (this.yOffset > 0) {
playSound("pushstones");
var _local2 = rasterField[this.yOffset - 1][this.col];
var _local3;
_local3 = _local2.handlers.onHit;
if (_local3) {
gemHandlers(_local3, _local2.gemObj);
}
}
checkAdjacent(this.col, this.yOffset, this.ps, collapseMultiplier);
}
});
_local3++;
}
playerStones = [];
mcPlayer.gotoAndStop(1);
}
function getTopMostStone(col) {
var _local1 = rasterField.length - 1;
while ((_local1 >= 0) && (_local1 >= lastVisibleLine)) {
var _local2 = rasterField[_local1][col];
if (_local2 != null) {
return(_local2);
}
_local1--;
}
return(null);
}
function suckStones(singleButton) {
var _local2 = false;
var _local3 = getPlayerCol();
var _local1 = getTopMostStone(_local3);
if (_local1 != null) {
i = _local1.gemObj.y;
if (_local1.nr > 8) {
return(false);
}
if (playerStones.length == 0) {
addPlayerStone(_local1, _local3, i);
mcPlayer.gotoAndStop(2);
_local2 = true;
} else if (playerStones[0].equals(_local1)) {
addPlayerStone(_local1, _local3, i);
_local2 = true;
} else if (singleButton) {
pushStones();
}
} else if (singleButton) {
pushStones();
}
return(_local2);
}
function scrollRaster() {
var _local6 = getRasterHeight();
var _local5;
var _local7 = _local6 + Math.floor(raster._y / stepsizeY);
if (_local7 < 6) {
_local5 = 6 - _local7;
raster.ySlideTo(raster._y + (_local5 * stepsizeY), 0.5, "easeoutcubic");
lastVisibleLine = lastVisibleLine - _local5;
if (lastVisibleLine < 0) {
lastVisibleLine = 0;
}
var _local1;
var _local3;
var _local4 = _local6 - 6;
_local3 = 0;
while (_local3 < _local5) {
fillRaster();
_local1 = 0;
while (_local1 < 8) {
var _local2 = rasterField[_local4 + _local3][_local1];
_local2.gemObj.showStone();
_local1++;
}
_local3++;
}
}
}
function gemsAnim() {
var _local4;
var _local5 = 1 + random(8);
_local4 = 1;
while (_local4 <= 8) {
var _local3 = rasterField.length - _local4;
if (_local3 >= 0) {
var _local1;
_local1 = 0;
while (_local1 < 8) {
if (rasterField[_local3][_local1].nr == _local5) {
var _local2 = raster[(("d" + _local1) + "_") + _local3];
if (_local2.subtype == ST_NORMAL) {
_local2.animGem();
}
}
_local1++;
}
}
_local4++;
}
}
function getTimeScore() {
var _local1 = Math.round(currentLevel.time - currentTime);
var _local4;
mcGameClock.onEnterFrame = null;
mcGameClock.frameTo(100, 1.5, "linear", 0, function () {
playSound("abrechnung");
});
scoreSpawn(_local1 * 25, {_x:500, _y:200});
}
function levelWon() {
trace("levelWon=" + levelWonFlag);
if (levelWonFlag) {
return(undefined);
}
trace("Level Won!");
mcYayTexts.gotoAndStop("won");
mcPlayer.playerStopped = true;
playSound("win");
playSound("winmusic");
mcPlayer.gotoAndStop(4);
getTimeScore();
levelWonFlag = true;
}
function levelLost() {
if (levelWonFlag) {
return(undefined);
}
trace("Level Lost!");
mcYayTexts.gotoAndStop("lost");
levelWonFlag = true;
mcGerryLostMask._visible = true;
mcGerryLostMask.cacheAsBitmap = true;
mcPlayer.playerStopped = true;
mcPlayer.cacheAsBitmap = true;
mcPlayer.setMask(mcGerryLostMask);
mcPlayer.gotoAndStop(5);
playSound("naah");
justATimer.alphaTo(100, 0, "linear", 6, exitGame);
}
function exitGame() {
_root.backToMenu();
}
function gameClock() {
gameClockTimeDivider++;
if (gameClockTimeDivider < 16) {
return(undefined);
}
gameClockTimeDivider = 0;
var _local2 = getTimer();
currentTime = (_local2 - timeOffset) / 1000;
var _local1 = Math.floor((currentTime / currentLevel.time) * mcGameClock._totalframes) + 1;
if (_local1 > mcGameClock._totalframes) {
levelLost();
} else {
mcGameClock.gotoAndStop(_local1);
}
if (currentTime > 0) {
levelScore = levelScore * 0.7;
if (levelScore > 100) {
mcVisitor.visitor.gotoAndStop(3);
} else if (levelScore < 10) {
mcVisitor.visitor.gotoAndStop(1);
} else {
mcVisitor.visitor.gotoAndStop(2);
}
}
}
function initVisitor() {
mcVisitor.gotoAndStop(random(4) + 2);
mcVisitor.visitor.gotoAndStop(2);
mcVisitor.visitor._alpha = 0;
mcVisitor.visitor._xscale = 80;
mcVisitor.visitor._yscale = 80;
mcVisitor.visitor.scaleTo(100, 1, "easeoutback");
mcVisitor.visitor.alphaTo(100, 1, "linear");
}
function cleanLevel() {
mcGameClock.gotoAndStop(1);
clearInterval(ivIdGameClock);
clearInterval(ivIdGemsAnim);
raster.stopTween();
var _local1;
for (_local1 in animation) {
if (typeof(animation[_local1]) == "movieclip") {
if (animation[_local1].isTweening) {
animation[_local1].stopTween();
}
animation[_local1].swapDepths(99666);
animation[_local1].removeMovieClip();
trace((("result animation[" + _local1) + "]:") + animation[_local1]);
}
}
for (_local1 in raster) {
if (typeof(raster[_local1]) == "movieclip") {
if (raster[_local1].isTweening) {
raster[_local1].stopTween();
}
raster[_local1].swapDepths(99666);
raster[_local1].removeMovieClip();
trace((("result raster[" + _local1) + "]:") + raster[_local1]);
}
}
kristallWaage.waage.stopTween();
kristallWaage.waage.gotoAndStop(1);
kristallWaage.waage._y = 0;
kwScore = 0;
playerStones = [];
mcTresor.gotoAndStop(1);
waitForFinish = 0;
mcPlayer.gotoAndStop(1);
}
function nextLevel() {
cleanLevel();
mcPlayer.playerStopped = true;
levelNr++;
if (levelNr >= levels.length) {
messageWindow("won", playerStats);
} else {
currentLevel = levels[levelNr];
trace("currentLevel = " + currentLevel);
messageWindow("level", currentLevel);
}
}
function continueGame() {
mcMsgWin.ySlideTo(-400, 1, "easeoutcubic", 0, function () {
mcPlayer.playerStopped = false;
initLevel(levelNr);
});
}
function initLevel(nr) {
timeOffset = getTimer();
currentTime = 0;
initRaster();
initVisitor();
levelWonFlag = false;
mcGameClock.onEnterFrame = gameClock;
ivIdGemsAnim = setInterval(gemsAnim, 3000);
kristallWaage.scoreFull.htmlText = ("<b>" + Math.round(currentLevel.diamondsPerCoin * 10)) + "</b>";
kristallWaage.scoreMid.htmlText = ("<b>" + Math.round(currentLevel.diamondsPerCoin * 5)) + "</b>";
}
function initGame() {
Mouse.addListener(mouseListener);
mcPlayer.aniCounter = 0;
mcPlayer.onEnterFrame = function () {
if (this.playerStopped) {
return(undefined);
}
var _local2 = _xmouse;
var _local4 = (raster._x + (8 * stepsizeX)) - 4;
if (_local2 < raster._x) {
_local2 = raster._x;
}
if (_local2 > _local4) {
_local2 = _local4;
}
var _local5 = _local2 - this._x;
this._x = _local2;
var _local3 = Math.floor(this.aniCounter) % 3;
if (_local5 > 3) {
if (playerStones.length == 0) {
this.gerry.gotoAndStop(_local3 + 5);
} else {
this.gerry.gotoAndStop(_local3 + 14);
}
} else if (_local5 < -3) {
if (playerStones.length == 0) {
this.gerry.gotoAndStop(_local3 + 2);
} else {
this.gerry.gotoAndStop(_local3 + 11);
}
}
this.aniCounter = this.aniCounter + 0.5;
if (this.aniCounter > 30000) {
this.aniCounter = 0;
}
};
nextLevel();
}
var cpr = "Diamond Drop 2 / Complete Flash conversion 2008 by Nina Cording / nina@hamburch.de";
var ST_NORMAL = 0;
var ST_FROZEN = 1;
var ST_LOCKED = 2;
var ITEM_ROCK = 9;
var ITEM_COIN = 10;
var ITEM_CAKE = 11;
var rasterField = null;
var stepsizeX = 36;
var stepsizeY = 36;
var playerStats = {gold:0, score:0, lives:3};
var levelScore = 0;
var kwScore = 0;
var playerMode = null;
var playerStones = [];
var waitForFinish = 0;
var lastVisibleLine = 0;
var currentTime = 0;
var collapseMultiplier = 25;
var levelNr = -1;
var currentTime = 0;
var gemsOnArms = [{x:0, y:0}, {x:-15, y:-7}, {x:12, y:-5}];
var i;
i = 0;
while (i < 100) {
gemsOnArms.push({x:20 - random(40), y:-random(20)});
i++;
}
var msgWinY = mcMsgWin._y;
mcMsgWin._y = -410;
var justATimer = this.createEmptyMovieClip("timer", this.getNextHighestDepth());
var soundClip = this.createEmptyMovieClip("sounds", this.getNextHighestDepth());
mcGerryLostMask._visible = false;
var levels = [{nr:1, stoneTypes:3, stonePalette:[2, 5, 8], frozenChance:0, rockChance:0, coinChance:0, cakeChance:0, diamondsPerCoin:2, time:180}, {nr:2, stoneTypes:3, stonePalette:[1, 3, 4], frozenChance:0, rockChance:0, coinChance:0.08, cakeChance:0, diamondsPerCoin:2, description:"coin", time:170}, {nr:3, stoneTypes:3, stonePalette:[6, 7, 1], frozenChance:0, rockChance:0, coinChance:0.06, cakeChance:0, diamondsPerCoin:3, time:160}, {nr:4, stoneTypes:4, stonePalette:[4, 5, 6, 7], frozenChance:0, rockChance:0, coinChance:0.05, cakeChance:0.05, diamondsPerCoin:4, description:"cake", time:150}, {nr:5, stoneTypes:4, stonePalette:[1, 3, 5, 7], frozenChance:0, rockChance:0, coinChance:0.05, cakeChance:0.05, diamondsPerCoin:4, time:130}, {nr:6, stoneTypes:4, stonePalette:[2, 4, 8, 3], frozenChance:0, rockChance:0.06, coinChance:0.05, cakeChance:0.05, diamondsPerCoin:5, description:"rock", time:130}, {nr:7, stoneTypes:4, stonePalette:[1, 3, 6, 8], frozenChance:0, rockChance:0.07, coinChance:0.03, cakeChance:0.04, diamondsPerCoin:5, time:130}, {nr:8, stoneTypes:4, stonePalette:[2, 4, 5, 6], frozenChance:0.1, rockChance:0.08, coinChance:0.05, cakeChance:0.04, diamondsPerCoin:6, description:"frozen", time:140}, {nr:9, stoneTypes:5, stonePalette:[2, 5, 6, 8, 3], frozenChance:0.2, rockChance:0.1, coinChance:0.06, cakeChance:0.065, diamondsPerCoin:6, time:130}, {nr:10, stoneTypes:5, stonePalette:[1, 4, 3, 8, 5], frozenChance:0.25, rockChance:0.11, coinChance:0.07, cakeChance:0.07, diamondsPerCoin:6, time:120}];
var currentLevel;
GameStone.prototype.equals = function (otherStone, occasion) {
if (otherStone.nr != this.nr) {
return(false);
}
return(true);
};
MovieClip.prototype.animGem = function () {
this.gem.frameTo(5, 0.5, "linear", 0, function () {
this.frameTo(1, 0.5, "linear");
});
};
MovieClip.prototype.showStone = function () {
this.gotoAndStop(this.stoneObj.nr);
if (this.stoneObj.nr <= 8) {
if (this.stoneObj.subtype == ST_FROZEN) {
this.gem.gotoAndStop(6);
} else {
this.gem.gotoAndStop(1);
}
}
};
MovieClip.prototype.setStone = function (stone) {
this.stoneObj = stone;
this.stoneObj.gemObj = this;
this.nr = stone.nr;
var _local3 = ((this._parent == raster) ? (this._y + raster._y) : (this._y));
if ((_local3 + stepsizeY) > 0) {
this.showStone();
} else {
this.gotoAndStop("invisible");
}
if (this.stoneObj.nr <= 8) {
if (this.stoneObj.subtype == ST_FROZEN) {
this.stoneObj.handlers = {onShoot:"unfreeze", onHit:"unfreeze"};
}
} else if (stone.nr == ITEM_ROCK) {
this.stoneObj.handlers = {onHitPlayer:"hurt"};
} else if (stone.nr == ITEM_COIN) {
this.stoneObj.handlers = {onHitPlayer:"getcoin"};
} else if (stone.nr == ITEM_CAKE) {
this.stoneObj.handlers = {onHitPlayer:"getcake"};
}
};
var rasterPosition = 0;
var rfIvID = null;
var adjacentHash = {};
var adjacentStones = [];
var mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if (mcPlayer.playerStopped) {
return(undefined);
}
if (delta > 0) {
pushStones();
}
if (delta < 0) {
var _local1 = suckStones(false);
if (_local1) {
playSound("suckstones");
}
checkFallingObjects();
}
};
mouseListener.onMouseDown = function () {
if (mcPlayer.playerStopped) {
return(undefined);
}
var _local1 = false;
var _local2 = false;
do {
_local1 = suckStones(true);
_local2 = _local2 | _local1;
} while (_local1);
if (_local2) {
playSound("suckstones");
}
checkFallingObjects();
};
mouseListener.onMouseUp = function () {
if (mcPlayer.playerStopped) {
return(undefined);
}
pushStones();
};
var levelWonFlag = false;
var gameClockTimeDivider = 0;