Frame 1
_lockroot = true;
Stage.showMenu = false;
var CPMStarContentSpotID = "101Q4CF2D79D";
System.security.allowDomain("server.cpmstar.com");
_root.attachMovie("adBox", "adBox", 500, {_x:200, _y:150});
_root.adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
_root.attachMovie("ladebalken_rahmen", "ladebalken_rahmen", 6520, {_x:200, _y:440});
_root.attachMovie("ladebalken", "ladebalken", 6510, {_x:200, _y:440});
_root.ladebalken._width = 0;
Frame 2
var prozent;
prozent = (getBytesLoaded() * 100) / getBytesTotal();
prozent = Math.round(prozent);
Frame 3
if (_framesloaded >= _totalframes) {
gotoAndPlay ("Intro");
} else {
_root.ladebalken._width = prozent * 3;
gotoAndPlay ("Loader");
}
Frame 4
stop();
bass1 = new Sound(this);
bass1.attachSound("bass1");
removeMovieClip(_root.ladebalken_rahmen);
removeMovieClip(_root.ladebalken);
btnPlay.onRollOver = function () {
_root.bass1.start(0, 1);
this._xscale = 120;
};
btnPlay.onRollOut = function () {
this._xscale = 100;
};
btnPlay.onPress = function () {
removeMovieClip(_root.adBox);
play();
};
Frame 6
function shuffle(a, b) {
var _local1 = Math.round(Math.random() * 2) - 1;
return(_local1);
}
function fillBall(obj, color) {
ballColor = color;
var _local3 = (obj._width / 2) - 1;
xpos = _local3;
ypos = 0;
i = 1;
while (i < 10) {
if (ballColor == 16777215) {
color = initColors[i];
}
obj.lineStyle(0.25, color);
obj.beginFill(color, 100);
obj.moveTo(0, 0);
obj.lineTo(xpos, ypos);
ang = i * 0.698131700797732;
xpos = _local3 * Math.cos(ang);
ypos = _local3 * Math.sin(ang);
obj.lineTo(xpos, ypos);
obj.lineTo(0, 0);
obj.endFill();
i++;
}
}
stop();
var gravity = 0;
var links = 50;
var hoehe = 500;
var startHoehe;
var pos;
var vel;
var radius;
var anzColors;
var level = 0;
var initColors;
var allColors;
var colorsToUse;
var blockColors;
var blockOK;
var score = 0;
var meldung1;
var meldung2;
var selectedBonus;
var lifes = 0;
var levelRunning;
var gameRunning;
var ballColor;
var joker;
var flgMusic = true;
var flgSoundFX = true;
var fadeSound = false;
var vol = 60;
var txtBonusTip;
var txtBonusTip2;
var ballOut;
var gamemode;
_root.attachMovie("background", "background", 40);
_root.attachMovie("txt_line", "txt_line", 44, {_x:350, _y:95});
_root.attachMovie("logo", "logo", 666, {_x:130, _y:45});
_root.attachMovie("mj_logo", "mj_logo", 1002, {_x:640, _y:35});
_root.attachMovie("Meldung1", "meldung1_mc", 800, {_x:350, _y:-20});
_root.attachMovie("Meldung2", "meldung2_mc", 805, {_x:350, _y:570});
_root.attachMovie("score_mc", "score_mc", 810, {_x:160, _y:95});
_root.attachMovie("txtStage_mc", "txtStage_mc", 816, {_x:350, _y:95});
_root.attachMovie("txtGravity_mc", "txtGravity_mc", 815, {_x:510, _y:95});
_root.attachMovie("lifecounter", "lifecounter", 484, {_x:670, _y:95});
_root.attachMovie("startMC", "startMC", 1100, {_x:350, _y:-200});
_root.attachMovie("bonusTip", "bonusTip", 1110, {_x:400, _y:-50});
_root.attachMovie("bonusTip2", "bonusTip2", 1112, {_x:350, _y:-50});
_root.attachMovie("intro", "intro", 1550, {_x:350, _y:-200});
_root.attachMovie("howToLasche", "howToLasche", 1560, {_x:470, _y:10});
_root.attachMovie("howTo", "howTo", 1555, {_x:380, _y:-250});
_root.attachMovie("croakingrabbit", "croakingrabbit", 1556, {_x:350, _y:900});
_root.attachMovie("croakingrabbit_exit", "croakingrabbit_exit", 1557, {_x:350, _y:-50});
howToLasche.onRollOver = function () {
tweenHowToIn = new mx.transitions.Tween(_root.howTo, "_y", mx.transitions.easing.None.easeNone, _root.howTo._y, 280, 0.3, true);
};
howToLasche.onRollOut = function () {
tweenHowToOut = new mx.transitions.Tween(_root.howTo, "_y", mx.transitions.easing.None.easeNone, _root.howTo._y, -250, 0.3, true);
};
croakingrabbit.onRollOver = function () {
croakingrabbitIn = new mx.transitions.Tween(_root.croakingrabbit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit._y, 280, 0.3, true);
croakingrabbit_exitIn = new mx.transitions.Tween(_root.croakingrabbit_exit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit_exit._y, 30, 0.3, true);
};
croakingrabbit.onRollOut = function () {
croakingrabbitOut = new mx.transitions.Tween(_root.croakingrabbit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit._y, 700, 0.3, true);
croakingrabbit_exitOut = new mx.transitions.Tween(_root.croakingrabbit_exit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit_exit._y, -50, 0.3, true);
};
croakingrabbit.onRelease = function () {
getURL ("http://www.croakingrabbit.com/", "_blank");
};
mj_logo.onRelease = function () {
getURL ("http://www.croakingrabbit.com/", "_blank");
};
tweenstartIntro = new mx.transitions.Tween(_root.intro, "_y", mx.transitions.easing.Elastic.easeInOut, _root.intro._y, 450, 1, true);
tweenstartIntro.onMotionFinished = function () {
_root.intro.gotoAndPlay(2);
};
_global.introOut = function () {
tweenstartIntroOut = new mx.transitions.Tween(_root.intro, "_y", mx.transitions.easing.Elastic.easeInOut, _root.intro._y, -200, 1, true);
tweenstartIntroOut.onMotionFinished = function () {
_root.startMC_DOWN();
};
};
_global.randRange = function (min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
};
var keyListenerSpace = new Object();
keyListenerSpace.onKeyDown = function () {
if (Key.getCode() == 32) {
bonusChosen();
}
};
initLifes = function () {
i = 0;
while (i <= 9) {
_root.attachMovie("heart", "heart" + i, 400 + i, {_x:670, _y:128 + (i * 32)});
_root["heart" + i]._xscale = 0;
_root["heart" + i]._yscale = 0;
tweenHeart = new mx.transitions.Tween(_root["heart" + i], "_xscale", mx.transitions.easing.Elastic.easeInOut, _root["heart" + i]._xscale, 100, (i + 1) / 10, true);
tweenHeart = new mx.transitions.Tween(_root["heart" + i], "_yscale", mx.transitions.easing.Elastic.easeInOut, _root["heart" + i]._yscale, 100, (i + 1) / 10, true);
i++;
}
};
fillBlock = function (block, color) {
j = 0;
while (j <= 9) {
if (color == 16777215) {
block.beginFill(allColors[j], 100);
} else {
block.beginFill(color, 100);
}
block.moveTo(6 * j, 1);
block.lineTo(6 * (j + 1), 1);
block.lineTo(6 * (j + 1), 25);
block.lineTo(6 * j, 25);
block.lineTo(6 * j, 1);
block.endFill();
j++;
}
};
startBall = function () {
_root.attachMovie("Ball_MC", "ball_mc", 50, {_x:325, _y:_root.startHoehe});
ballOut = false;
fillBall(ball_mc, getColor());
radius = ball_mc._width / 2;
tweenBall1 = new mx.transitions.Tween(_root.ball_mc, "_y", mx.transitions.easing.Strong.easeOut, 500, startHoehe, 1.3, true);
tweenBall2 = new mx.transitions.Tween(_root.ball_mc, "_xscale", mx.transitions.easing.None.easeNone, 0, 100, 1.5, true);
tweenBall3 = new mx.transitions.Tween(_root.ball_mc, "_yscale", mx.transitions.easing.None.easeNone, 0, 100, 1.5, true);
tweenBall1.onMotionFinished = function () {
vel = {x:0, y:0};
pos = {x:ball_mc._x, y:ball_mc._y};
BallEvent();
};
};
setBlocks = function () {
j = 0;
blockColors = new Array();
blockOK = new Array();
i = 0;
while (i < 10) {
if (j >= colorsToUse.length) {
j = 0;
}
blockColors.push(colorsToUse[j]);
j++;
i++;
}
if (joker) {
blockColors[0] = 16777215 /* 0xFFFFFF */;
blockColors[1] = 16777215 /* 0xFFFFFF */;
blockColors[2] = 16777215 /* 0xFFFFFF */;
blockColors[3] = 16777215 /* 0xFFFFFF */;
blockColors[4] = 16777215 /* 0xFFFFFF */;
joker = false;
}
blockColors.sort(shuffle);
blockColors.sort(shuffle);
i = 0;
while (i < 10) {
_root.attachMovie("block", "block" + i, 501 + i, {_x:links + (60 * i), _y:700});
tweenBlockFadeIn = new mx.transitions.Tween(_root["block" + i], "_y", mx.transitions.easing.Elastic.easeInOut, _root["block" + i]._y, 500, (i + 1) / 15, true);
fillBlock(_root["block" + i], blockColors[i]);
blockOK.push(1);
i++;
}
};
gameOver = function () {
levelRunning = false;
gameRunning = false;
stopBall();
fadeSound = true;
meldung1_mc.meldung = "Game over!";
ScoreAPI = new LocalConnection();
if (gamemode == "easy") {
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", score, "easy");
}
if (gamemode == "normal") {
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", score, "normal");
}
if (gamemode == "hard") {
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", score, "hard");
}
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, 300, 2, true);
tweenMeldung1.onMotionFinished = function () {
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, -20, 2.5, true);
tweenMeldung1.onMotionFinished = function () {
i = 0;
while (i < 10) {
tweenBlockFadeIn = new mx.transitions.Tween(_root["block" + i], "_y", mx.transitions.easing.Elastic.easeInOut, _root["block" + i]._y, 700, (i + 1) / 5, true);
i++;
}
startMC_DOWN();
};
};
};
nextLevel = function () {
level++;
meldung1_mc.meldung = "Stage " + level;
if (level <= 10) {
meldung2_mc.meldung = "colors: " + level;
_root.startHoehe = _root.startHoehe - 20;
}
if ((level > 10) && (level <= 15)) {
meldung2_mc.meldung = "increasing gravity - phase 1";
_root.gravity = _root.gravity + 0.1;
}
if (level > 15) {
meldung2_mc.meldung = "increasing gravity - phase 2";
_root.gravity = _root.gravity + 0.15;
}
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, 250, 1.5, true);
tweenMeldung2 = new mx.transitions.Tween(_root.meldung2_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung2_mc._y, 300, 1.5, true);
tweenMeldung1.onMotionFinished = function () {
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, -20, 1.5, true);
tweenMeldung2 = new mx.transitions.Tween(_root.meldung2_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung2_mc._y, 570, 1.5, true);
tweenMeldung1.onMotionFinished = function () {
initColors = new Array(7340032, 16711680, 255, 8421376, 16755200, 16711935, 32768, 0, 43690, 8388736);
allColors = initColors.slice();
if (level <= 10) {
anzColors = level;
} else {
anzColors = 10;
}
colorsToUse = new Array();
i = 1;
while (i <= anzColors) {
initColors.sort(shuffle);
colorsToUse.push(initColors.pop());
i++;
}
setBlocks();
startBall();
levelRunning = true;
};
};
};
removeLife = function () {
lifes--;
tweenHeartXBIG = new mx.transitions.Tween(_root["heart" + lifes], "_xscale", mx.transitions.easing.None.easeNone, 100, 120, 0.2, true);
tweenHeartXBIG = new mx.transitions.Tween(_root["heart" + lifes], "_yscale", mx.transitions.easing.None.easeNone, 100, 120, 0.2, true);
tweenHeartXBIG.onMotionFinished = function () {
sound_container.sndheart.start(0, 1);
tweenHeartX = new mx.transitions.Tween(_root["heart" + lifes], "_xscale", mx.transitions.easing.Bounce.easeIn, 120, 0, 0.5, true);
tweenHeartX = new mx.transitions.Tween(_root["heart" + lifes], "_yscale", mx.transitions.easing.Bounce.easeIn, 120, 0, 0.5, true);
tweenHeartX.onMotionFinished = function () {
_root["heart" + lifes].unloadMovie();
lifecounter.text = lifes;
};
};
};
addLife = function () {
_root.attachMovie("heart", "heart" + lifes, 400 + lifes, {_x:670, _y:128 + (lifes * 32)});
sound_container.lifeAdd.start(0, 1);
tweenHeartX = new mx.transitions.Tween(_root["heart" + lifes], "_xscale", mx.transitions.easing.Bounce.easeOut, 0, 120, 0.5, true);
tweenHeartX = new mx.transitions.Tween(_root["heart" + lifes], "_yscale", mx.transitions.easing.Bounce.easeOut, 0, 120, 0.5, true);
tweenHeartX.onMotionFinished = function () {
tweenHeartXBIG = new mx.transitions.Tween(_root["heart" + lifes], "_xscale", mx.transitions.easing.None.easeNone, 120, 100, 0.2, true);
tweenHeartXBIG = new mx.transitions.Tween(_root["heart" + lifes], "_yscale", mx.transitions.easing.None.easeNone, 120, 100, 0.2, true);
lifes++;
lifecounter.text = lifes;
};
};
ballIsOut = function () {
if (levelRunning) {
removeLife();
if (lifes == 0) {
gameOver();
} else if (lifes > 0) {
startBall();
}
}
};
ballIsWrong = function () {
if (levelRunning) {
removeLife();
if (lifes == 0) {
gameOver();
}
}
};
startGame = function () {
croakingrabbitHide = new mx.transitions.Tween(_root.croakingrabbit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit._y, 900, 0.3, true);
Key.removeListener(keyListenerSpace);
level = 0;
_root.startHoehe = 325;
music_container.loop1.stop();
if (flgMusic) {
music_container.loop1.start(0, 999);
}
fadeSound = false;
vol = 60;
music_container.loop1.setVolume(vol);
lifes = 10;
initLifes();
gameRunning = true;
nextLevel();
};
stopBall = function () {
tweenBall1 = new mx.transitions.Tween(_root.ball_mc, "_xscale", mx.transitions.easing.None.easeNone, 100, 0, 2, true);
tweenBall2 = new mx.transitions.Tween(_root.ball_mc, "_yscale", mx.transitions.easing.None.easeNone, 100, 0, 2, true);
};
levelFinished = function () {
levelRunning = false;
stopBall();
meldung1_mc.meldung = ("Stage " + level) + " finished! Press SPACE to select your bonus!";
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, 250, 1.5, true);
tweenMeldung1.onMotionFinished = function () {
chooseBonus();
};
};
levelFinished_fortsetzung = function () {
i = 1;
while (i <= 6) {
if (i != (selectedBonus + 1)) {
_root["bonus" + i].unloadMovie();
}
i++;
}
tweenBonusX = new mx.transitions.Tween(_root["bonus" + (selectedBonus + 1)], "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 500, 0.5, true);
tweenBonusY = new mx.transitions.Tween(_root["bonus" + (selectedBonus + 1)], "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 500, 0.5, true);
tweenBonusBorderX = new mx.transitions.Tween(_root.bonusborder, "_xscale", mx.transitions.easing.Bounce.easeOut, 100, 500, 0.5, true);
tweenBonusBorderY = new mx.transitions.Tween(_root.bonusborder, "_yscale", mx.transitions.easing.Bounce.easeOut, 100, 500, 0.5, true);
tweenMeldung1 = new mx.transitions.Tween(_root.meldung1_mc, "_y", mx.transitions.easing.Elastic.easeInOut, _root.meldung1_mc._y, -20, 1.5, true);
tweenBonusX.onMotionFinished = function () {
tweenBonusXShrink = new mx.transitions.Tween(_root["bonus" + (selectedBonus + 1)], "_xscale", mx.transitions.easing.Elastic.easeInOut, 500, 0, 0.5, true);
tweenBonusYShrink = new mx.transitions.Tween(_root["bonus" + (selectedBonus + 1)], "_yscale", mx.transitions.easing.Elastic.easeInOut, 500, 0, 0.5, true);
tweenBonusBorderXShrink = new mx.transitions.Tween(_root.bonusborder, "_xscale", mx.transitions.easing.Elastic.easeInOut, 500, 0, 0.5, true);
tweenBonusBorderYShrink = new mx.transitions.Tween(_root.bonusborder, "_yscale", mx.transitions.easing.Elastic.easeInOut, 500, 0, 0.5, true);
tweenBonusXShrink.onMotionFinished = function () {
_root["bonus" + (selectedBonus + 1)].unloadMovie();
bonusborder.unloadMovie();
nextLevel();
};
};
};
chooseBonus = function () {
i = 0;
while (i <= 6) {
_root.attachMovie("bonus" + i, "bonus" + i, 300 + i, {_x:100 + ((i + 1) * 50), _y:300});
_root["bonus" + i]._xscale = 0;
_root["bonus" + i]._yscale = 0;
tweenBonusXScale = new mx.transitions.Tween(_root["bonus" + i], "_xscale", mx.transitions.easing.Elastic.easeInOut, _root["bonus" + i]._xscale, 100, (i + 1) / 10, true);
tweenBonusYScale = new mx.transitions.Tween(_root["bonus" + i], "_yscale", mx.transitions.easing.Elastic.easeInOut, _root["bonus" + i]._yscale, 100, (i + 1) / 10, true);
i++;
}
bonus5.wert = level * 100;
selectedBonus = randRange(0, 5);
_root.attachMovie("bonusborder", "bonusborder", 307, {_x:200 + (50 * selectedBonus), _y:300});
timerBonus = setInterval(swapBonus, 80);
Key.addListener(keyListenerSpace);
};
scoreAdd = function (wert) {
tweenScore = new mx.transitions.Tween(score_mc, "score", mx.transitions.easing.None.easeNone, score, score + wert, 0.1, true);
score = score + wert;
};
bonusChosen = function () {
Key.removeListener(keyListenerSpace);
if (selectedBonus == 0) {
sound_container.bonus1snd.start(0, 1);
txtBonusTip = "Reducing gravity!";
_root.bonusTip._x = 510;
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, 145, 2, true);
tweenBonusTipY.onMotionFinished = function () {
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, -50, 3, true);
if (gravity > 0.1) {
gravity = gravity - 0.1;
}
};
}
if (selectedBonus == 1) {
txtBonusTip2 = "Adding 1 extra life!";
tweenBonusTipY2 = new mx.transitions.Tween(_root.bonusTip2, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip2._y, 150, 2, true);
tweenBonusTipY2.onMotionFinished = function () {
tweenBonusTipY2 = new mx.transitions.Tween(_root.bonusTip2, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip2._y, -50, 3, true);
addLife();
};
}
if (selectedBonus == 2) {
sound_container.bonus345snd.start(0, 1);
txtBonusTip = "Adding 500 points!";
_root.bonusTip._x = 160;
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, 145, 2, true);
tweenBonusTipY.onMotionFinished = function () {
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, -50, 3, true);
scoreAdd(500);
};
}
if (selectedBonus == 3) {
sound_container.bonus345snd.start(0, 1);
txtBonusTip = "Adding 1000 points!";
_root.bonusTip._x = 160;
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, 145, 2, true);
tweenBonusTipY.onMotionFinished = function () {
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, -50, 3, true);
scoreAdd(1000);
};
}
if (selectedBonus == 4) {
sound_container.bonus345snd.start(0, 1);
var w = (100 * level);
txtBonusTip = ("Adding " + w) + " points!";
_root.bonusTip._x = 160;
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, 145, 2, true);
tweenBonusTipY.onMotionFinished = function () {
tweenBonusTipY = new mx.transitions.Tween(_root.bonusTip, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip._y, -50, 3, true);
scoreAdd(w);
};
}
if (selectedBonus == 5) {
sound_container.bonus6snd.start(0, 1);
txtBonusTip2 = "Preparing 5 Jokerblocks for next stage!";
tweenBonusTipY2 = new mx.transitions.Tween(_root.bonusTip2, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip2._y, 150, 2, true);
tweenBonusTipY2.onMotionFinished = function () {
tweenBonusTipY2 = new mx.transitions.Tween(_root.bonusTip2, "_y", mx.transitions.easing.Elastic.easeInOut, _root.bonusTip2._y, -50, 3, true);
};
joker = true;
}
clearInterval(timerBonus);
levelFinished_fortsetzung();
setBoni();
};
swapBonus = function () {
selectedBonus++;
if (selectedBonus > 5) {
selectedBonus = 0;
}
bonusborder._x = (selectedBonus * 50) + 200;
};
onEnterFrame = function () {
if ((music_container.loop1.getVolume() > 0) && (fadeSound == true)) {
vol = vol - 1;
music_container.loop1.setVolume(vol);
}
if (Key.isDown(39)) {
ball_mc._x = ball_mc._x + 14;
}
if (Key.isDown(37)) {
ball_mc._x = ball_mc._x - 14;
}
if (ball_mc._x < -10) {
ball_mc._x = 720;
}
if (ball_mc._x > 720) {
ball_mc._x = 10;
}
};
BallEvent = function () {
ball_mc.onEnterFrame = function () {
vel.y = vel.y + _root.gravity;
pos.y = pos.y + vel.y;
if ((pos.y + radius) < _root.hoehe) {
ballOut = false;
}
var _local2 = false;
if (((pos.y + radius) > _root.hoehe) && (!ballOut)) {
_local2 = true;
if (((ball_mc._x >= _root.links) && (ball_mc._x <= (_root.links + 600))) && (blockOK[int((ball_mc._x - links) / 60)] == 1)) {
vel.y = vel.y + _root.gravity;
vel.y = vel.y * -1;
Aufschlag();
}
}
if ((pos.y + radius) > (_root.hoehe + 1)) {
ballOut = true;
}
if ((pos.y + radius) > (_root.hoehe + 100)) {
ballIsOut();
}
if (_local2) {
ball_mc._y = _root.hoehe - radius;
} else {
ball_mc._y = pos.y;
}
};
};
Aufschlag = function () {
if (levelRunning) {
blockHit = int((ball_mc._x - links) / 60);
sound_container.bass1.start(0, 1);
if (((blockColors[blockHit] == ballColor) or (ballColor == 16777215)) or (blockColors[blockHit] == 16777215)) {
tweenScore = new mx.transitions.Tween(score_mc, "score", mx.transitions.easing.None.easeNone, score, score + 100, 0.1, true);
score = score + 100;
blockOK[blockHit] = 0;
tweenBlock = new mx.transitions.Tween(_root["block" + blockHit], "_y", mx.transitions.easing.None.easeNone, _root["block" + blockHit]._y, 560, 0.2, true);
fillBall(ball_mc, getColor());
} else {
sound_container.negative.start(0, 1);
ballIsWrong();
}
}
};
getColor = function () {
var _local1 = new Array();
var _local2 = 0;
i = 0;
while (i < 10) {
if (blockOK[i] == 1) {
_local2++;
if (blockColors[i] != 16777215) {
_local1.push(blockColors[i]);
}
}
i++;
}
if (_local2 == 0) {
levelFinished();
return(ballColor);
}
_local1.sort(shuffle);
return(Number(_local1.pop()));
};
startMC_DOWN = function () {
tweenstartMC_up = new mx.transitions.Tween(_root.startMC, "_y", mx.transitions.easing.Elastic.easeInOut, _root.startMC._y, 350, 1, true);
tweenstartMC_up.onMotionFinished = function () {
croakingrabbitShow = new mx.transitions.Tween(_root.croakingrabbit, "_y", mx.transitions.easing.None.easeNone, _root.croakingrabbit._y, 700, 0.3, true);
};
};
startMC_UP = function () {
tweenstartMC_up = new mx.transitions.Tween(_root.startMC, "_y", mx.transitions.easing.Elastic.easeInOut, _root.startMC._y, -200, 0.5, true);
tweenstartMC_up.onMotionFinished = function () {
startGame();
};
};
startMC.btnEasy.onRelease = function () {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("4569ab5e", this, 10301, true);
startMC_UP();
_root.gravity = 0.5;
score = 0;
score_mc.score = 0;
gamemode = "easy";
};
startMC.btnNormal.onRelease = function () {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("a1df65ca", this, 10301, true);
startMC_UP();
_root.gravity = 1;
score = 15000;
score_mc.score = 15000;
gamemode = "normal";
};
startMC.btnHard.onRelease = function () {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("0cb10a54", this, 10301, true);
startMC_UP();
_root.gravity = 1.5;
score = 30000;
score_mc.score = 30000;
gamemode = "hard";
};
_root.attachMovie("music_onoff", "music_onoff", 1333, {_x:442, _y:50});
_root.music_onoff.onEnterFrame = function () {
_root.music_onoff.onRelease = function () {
if ((flgMusic = !flgMusic)) {
_root.music_container.loop1.stop();
_root.music_container.loop1;
_root.stop();
if (gameRunning) {
_root.music_container.loop1.start(0, 999);
}
_root.music_onoff.gotoAndPlay(5);
} else {
_root.music_container.loop1.stop();
_root.music_onoff.gotoAndPlay(1);
}
};
};
_root.attachMovie("sndfx_onoff", "sndfx_onoff", 1334, {_x:500, _y:48});
_root.sndfx_onoff.onEnterFrame = function () {
_root.sndfx_onoff.onRelease = function () {
if ((flgSoundFX = !flgSoundFX)) {
_root.sound_container.bass1.setVolume(100);
_root.sndfx_onoff.gotoAndPlay(5);
} else {
_root.sound_container.bass1.setVolume(0);
_root.sndfx_onoff.gotoAndPlay(1);
}
};
};
Instance of Symbol 17 MovieClip [music_container] "music_container" in Frame 6
onClipEvent (load) {
loop1 = new Sound(this);
loop1.attachSound("loop1");
}
Instance of Symbol 25 MovieClip [soundFX_container] "sound_container" in Frame 6
onClipEvent (load) {
bass1 = new Sound(this);
bass1.attachSound("bass1");
sndheart = new Sound(this);
sndheart.attachSound("sndheart");
negative = new Sound(this);
negative.attachSound("negative");
lifeAdd = new Sound(this);
lifeAdd.attachSound("lifeAdd");
bonus1snd = new Sound(this);
bonus1snd.attachSound("bonus1snd");
bonus345snd = new Sound(this);
bonus345snd.attachSound("bonus345snd");
bonus6snd = new Sound(this);
bonus6snd.attachSound("bonus6snd");
test = new Sound(this);
test.attachSound("windmaster");
}
Symbol 139 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 140 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 141 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 142 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 143 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 144 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 145 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 76 MovieClip [croakingrabbit] Frame 1
crBtn.onRelease = function () {
trace("test");
};
Symbol 100 MovieClip [intro] Frame 1
stop();
Symbol 100 MovieClip [intro] Frame 140
stop();
introOut();
Symbol 108 MovieClip [startMC] Frame 1
btnEasy.onRollOver = function () {
_root.sound_container.bass1.start(0, 1);
this._xscale = 120;
};
btnEasy.onRollOut = function () {
this._xscale = 100;
};
btnNormal.onRollOver = function () {
_root.sound_container.bass1.start(0, 1);
this._xscale = 120;
};
btnNormal.onRollOut = function () {
this._xscale = 100;
};
btnHard.onRollOver = function () {
_root.sound_container.bass1.start(0, 1);
this._xscale = 120;
};
btnHard.onRollOut = function () {
this._xscale = 100;
};
Symbol 135 MovieClip [music_onoff] Frame 1
stop();
Symbol 135 MovieClip [music_onoff] Frame 5
stop();
Symbol 138 MovieClip [sndfx_onoff] Frame 1
stop();
Symbol 138 MovieClip [sndfx_onoff] Frame 5
stop();