Frame 1
function getout() {
_root.gotoandstop(5);
}
function checkHighscores() {
clearInterval(logoID);
_root.gotoandstop(4);
}
function checkLogo() {
clearInterval(logoID);
if (_root.taito_logo._visible != true) {
_root.taito_logo._visible = true;
logoID = setInterval(checkLogo, 2000);
} else {
_root.taito_logo._visible = false;
_root.b1.gotoandplay(1);
_root.b2.gotoandplay(1);
}
}
delete this.onEnterFrame;
Key.removeListener(someListener);
_root.cadre.removemovieclip();
_root.pause.removemovieclip();
if (!issound) {
var issound = 1;
if (!colourblind) {
}
}
var colourblind = "";
MovieClip.prototype.drawRect = function (x, y, w, h, RGB, alpha, fillRGB, fillalpha) {
this.lineStyle(0, RGB, alpha);
this.moveTo(x, y);
this.beginFill(fillRGB, fillalpha);
this.lineTo(x + w, y);
this.lineTo(x + w, y + h);
this.lineTo(x, y + h);
this.lineTo(x, y);
this.endFill();
};
logoID = setInterval(checkLogo, 2000);
stop();
Frame 2
function pauseGame() {
_root.cadre.hurryup.removeMovieClip();
clearInterval(intervalID);
Key.removeListener(someListener);
delete cadre.onEnterFrame;
_root.cadre.createEmptyMovieClip("paused", 999999);
_root.cadre.paused._x = -96;
_root.cadre.paused._y = -32;
_root.cadre.paused.drawRect(0, 0, 320, 240, 16777215, 0, 0, 40);
_root.cadre.paused.attachMovie("paused", "pause_text", 2);
_root.cadre.paused.pause_text._x = 135;
_root.cadre.paused.pause_text._y = 120;
someListener = new Object();
someListener.onKeyUp = function () {
Key.removeListener(someListener);
setKeys();
intervalID = setInterval(hurrycheck, 1000);
if (_root.timer >= 7) {
_root.cadre.createEmptyMovieClip("hurryup", 222223);
_root.cadre.hurryup._x = _root.cadre.hurryup._x - 5;
_root.cadre.hurryup._y = _root.cadre.hurryup._y + 155;
_root.cadre.hurryup.attachMovie("hurry", "hurry", 1);
}
_root.cadre.paused.removeMovieClip();
};
Key.addListener(someListener);
}
function showLivesLeft() {
_root.cadre.createEmptyMovieClip("livesleft", 902030);
_root.cadre.livesleft._x = 155;
_root.cadre.livesleft._y = 192;
_root.cadre.livesleft.attachMovie("credit", "credit", 1);
_root.cadre.livesleft.createEmptyMovieClip("number", 2);
_root.cadre.livesleft.number.afficheMessage((lives-1).toString(), "highscore");
_root.cadre.livesleft.number._x = _root.cadre.livesleft.number._x + 60;
}
function rtd(rad) {
return(rad * (180 / Pi));
}
function isInArray(val, ar) {
var _local3 = ar.length;
_local3--;
while ((_local3-1) , _local3 > -1) {
if (Number(ar[_local3]) == Number(val)) {
return(false);
}
}
return(true);
}
function colorsLeft() {
colAr = new Array();
var _local1 = myLv.length;
_local1--;
while ((_local1-1) , _local1 > -1) {
var _local2 = myLv[_local1].length;
_local2--;
while ((_local2-1) , _local2 > -1) {
if (myLv[_local1][_local2] > 0) {
if (isInArray(myLv[_local1][_local2], colAr)) {
colAr.push(myLv[_local1][_local2]);
}
}
}
}
return(colAr);
}
function getNextBall() {
_root.cadre.createEmptyMovieClip("bulleNext", 10000);
_root.cadre.createEmptyMovieClip("bulleActual", 10001);
if (!nextBall) {
cls = colorsLeft();
cl = random(cls.length);
nextBall = cls[cl];
cm = random(cls.length);
actualBall = cls[cm];
} else {
actualBall = nextBall;
cls = colorsLeft(_root.myLv);
cl = random(cls.length);
nextBall = cls[cl];
}
with (_root.cadre.bulleNext) {
_x = 20;
_y = _root.tabH - _root.nbH;
attachMovie(("ball_" + nextBall) + colourblind, "ball", 1);
}
with (_root.cadre.bulleActual) {
_x = _root.tabW_2 - _root.nbW_2;
_y = (_root.tabH - (2 * _root.nbH)) - 4;
attachMovie(("ball_" + actualBall) + colourblind, "ball", 1);
}
if (cls.length == 0) {
nextLevel();
}
}
function nextLevel() {
Key.removeListener(someListener);
delete cadre.onEnterFrame;
_root.cadre.hurryup.removeMovieClip();
clearInterval(intervalID);
if (issound == 1) {
musicSound.stop();
winSound.start();
}
_root.cadre.createEmptyMovieClip("winpanel", 222222);
_root.cadre.winpanel.attachMovie("win_panel", "win_panel", 1);
_root.cadre.winpanel._x = 35;
_root.cadre.winpanel._y = 40;
_root.cadre.winpanel.createEmptyMovieClip("messageRoundClear", 3);
_root.cadre.winpanel.messageRoundClear.attachMovie("round_clear_text", "pts", 1000);
_root.cadre.winpanel.messageRoundClear.pts._x = -58;
totalTime = Math.round((getTimer() - time) / 1000);
displayTimeID = setInterval(displayTimeBonus, 1500);
}
function displayTimeBonus() {
clearInterval(displayTimeID);
_root.cadre.winpanel.createEmptyMovieClip("messageTimeBonus", 3);
_root.cadre.winpanel.messageTimeBonus._y = 0;
_root.cadre.winpanel.messageTimeBonus._x = 16;
_root.cadre.winpanel.messageTimeBonus.afficheMessage(totalTime.toString(), "levels");
_root.cadre.winpanel.messageTimeBonus.attachMovie("sec_text", "sec", 1000);
_root.cadre.winpanel.messageTimeBonus.sec._x = 12;
if (totalTime < 6) {
added = 50000;
} else if (totalTime < 65) {
added = 50000 - ((totalTime - 5) * 840);
} else {
added = 0;
}
_root.cadre.winpanel.createEmptyMovieClip("messageTimeBonus2", 4);
_root.cadre.winpanel.messageTimeBonus2._y = 34;
_root.cadre.winpanel.messageTimeBonus2._x = 32;
if (added > 0) {
_root.cadre.winpanel.messageTimeBonus2.afficheMessage(added.toString(), "levels");
_root.cadre.winpanel.messageTimeBonus2.attachMovie("pts_text", "pts", 1000);
_root.cadre.winpanel.messageTimeBonus2.pts._x = 12;
_root.highscore = _root.highscore + added;
} else {
_root.cadre.winpanel.messageTimeBonus2.attachMovie("no_bonus", "pts", 1000);
_root.cadre.winpanel.messageTimeBonus2.pts._x = -68;
}
_root.level++;
nextLevelID = setInterval(automaticGoToLevel, 1500);
}
function automaticGoToLevel() {
clearInterval(nextLevelID);
if (_root.level > 100) {
_root.gotoAndStop(1);
} else {
_root.displayLevel(_root.level);
}
}
function displayLevel(lev) {
musicSound.start(0, 99);
clearInterval(blinkID);
Key.removeListener(someListener);
readySound.start();
_root.winner = 0;
_root.spacelocked = 1;
_root.shoots = 0;
_root.topOffSet = 0;
_root.bgs.displayCorrect();
_root.createEmptyMovieClip("cadre", 1);
cadre._x = 0;
cadre._y = 0;
cadre.createEmptyMovieClip("current_level", 902020);
cadre.attachMovie("round", "round_text", 902021);
cadre.round_text._x = 35;
cadre.round_text._y = 192;
cadre.current_level._x = 96;
cadre.current_level._y = 192;
if (_root.level < 10) {
cadre.current_level.afficheMessage("0" + _root.level.toString(), "highscore");
} else {
cadre.current_level.afficheMessage(_root.level.toString(), "highscore");
}
angle = -(Pi / 2);
myLv = new Array();
var _local3 = -1;
var _local4 = _root["level" + level].length;
_local3++;
while ((_local3+1) , _local3 < _local4) {
myLv[_local3] = new Array();
var _local5 = -1;
var _local6 = _root["level" + level][_local3].length;
_local5++;
while ((_local5+1) , _local5 < _local6) {
myLv[_local3].push(_root["level" + level][_local3][_local5]);
}
}
cadre.createEmptyMovieClip("bubbles", 2);
cadre.bubbles.drawBulles(myLv);
cadre._x = 96;
cadre._y = 32;
cadre.createEmptyMovieClip("compressor_mask", 200002);
cadre.compressor_mask._x = 0;
cadre.compressor_mask._y = 0;
_root.cadre.compressor_mask.drawRect(0, 0, tabW, tabH, 16777215, 0, 0, 0);
cadre.createEmptyMovieClip("compressor", 200001);
cadre.compressor.attachMovie("compressor", "compressor", 0);
cadre.compressor.compressor.displayCorrect();
cadre.compressor._x = 0;
cadre.compressor._y = -16;
cadre.compressor.setMask(cadre.compressor_mask);
cadre.createEmptyMovieClip("launcher", -10);
cadre.launcher.attachMovie("launcher", "launcher", 1);
cadre.launcher._x = (tabW_2-1);
cadre.launcher._y = tabH - 26;
_root.cadre.attachMovie("bub", "bubchoose", 10);
_root.cadre.bubchoose._x = 39;
_root.cadre.bubchoose._y = 175;
_root.bubmove.gotoAndPlay(1);
showLivesLeft();
cadre.createEmptyMovieClip("highscore_panel", 200005);
cadre.highscore_panel._x = 0;
cadre.highscore_panel._y = -16;
_local3 = 8 - _root.highscore.toString().length;
var _local7 = "";
_local3--;
while ((_local3-1) , _local3 > -1) {
_local7 = _local7 + "0";
}
cadre.highscore_panel.afficheMessage(_local7 + _root.highscore.toString(), "highscore");
_root.spacelocked = 1;
setKeys();
getNextBall();
cadre.createEmptyMovieClip("show_round_panel", 200006);
cadre.show_round_panel._x = 0;
cadre.show_round_panel._y = 24;
cadre.show_round_panel.attachMovie("round_panel", "round_panel", 1);
cadre.show_round_panel.createEmptyMovieClip("lev_text", 2);
cadre.show_round_panel.lev_text._x = 70;
cadre.show_round_panel.lev_text._y = 24;
cadre.show_round_panel.lev_text.afficheMessage(_root.level.toString(), "levels");
goPlayID = setInterval(goPlay, 1400);
}
function goPlay() {
cadre.show_round_panel.removeMovieClip();
clearInterval(goPlayID);
_root.spacelocked = 0;
time = getTimer();
_root.timer = 0;
intervalID = setInterval(hurrycheck, 1000);
}
function insertCredit(howmany) {
if (lives < 10) {
lives++;
cheatSound.start();
showLivesLeft();
}
}
function setKeys() {
someListener = new Object();
someListener.onKeyUp = function () {
var _local2 = Key.getCode();
if (_root.godmode == 1) {
if (_local2 == 73) {
_root.godmode = 2;
} else {
delete _root.godmode;
}
} else if (_root.godmode == 2) {
if (_local2 == 76) {
_root.godmode = 3;
} else {
delete _root.godmode;
}
} else if (_root.godmode == 3) {
if (_local2 == 83) {
delete _root.godmode;
_root.insertCredit(1);
} else {
delete _root.godmode;
}
}
if (_local2 == "78") {
_root.godmode = 1;
}
if (_local2 == 37) {
_root.bubmove.gotoAndPlay(1);
}
if (_local2 == 39) {
_root.bubmove.gotoAndPlay(1);
}
if (_local2 == 80) {
pauseGame();
}
if ((_local2 == 32) || (_local2 == 38)) {
if (_root.spacelocked == 0) {
_root.timer = 0;
_root.cadre.hurryup.removeMovieClip();
_root.cadre.bubchoose.gotoAndPlay(1);
render();
fire();
}
}
};
Key.addListener(someListener);
cadre.onEnterFrame = function () {
_root.timex = getTimer() / 1000;
_root.thistime = _root.timex - _root.oldtime;
if (_root.thistime >= 1) {
_root.fps = _root.frames;
_root.frames = 0;
_root.oldtime++;
} else {
_root.frames++;
}
if (Key.isDown(37)) {
if (angle > -3) {
_root.bubmove.gotoAndStop("moveleft");
angle = angle - anglemove;
_root.cadre.launcher._rotation = _root.rtd(angle) + 90;
}
} else if (Key.isDown(39)) {
if (angle < -0.14) {
_root.bubmove.gotoAndStop("moveright");
angle = angle + anglemove;
_root.cadre.launcher._rotation = _root.rtd(angle) + 90;
}
}
};
}
function hurrycheck() {
_root.timer++;
if (_root.timer == 7) {
_root.cadre.createEmptyMovieClip("hurryup", 222223);
_root.cadre.hurryup._x = _root.cadre.hurryup._x - 5;
_root.cadre.hurryup._y = _root.cadre.hurryup._y + 155;
_root.cadre.hurryup.attachMovie("hurry", "hurry", 1);
_root.cadre.bubchoose.gotoAndPlay("alert");
}
if (_root.timer == 10) {
_root.cadre.hurryup.removeMovieClip();
_root.timer = 0;
render();
fire();
}
}
function fire() {
if (_root.spacelocked == 0) {
_root.spacelocked = 1;
if (issound == 1) {
launchSound.start();
}
_root.cadre.bubchoose.gotoAndPlay("puf");
_root.shoots++;
_root.finco = _root.finalCoords;
_root.moves = _root.cOords;
_root.cadre.bulleActual.removeMovieClip();
_root.cadre.createEmptyMovieClip("bulleMoving", 10002);
with (_root.cadre.bulleMoving) {
_x = _root.tabW_2 - _root.nbW_2;
_y = (_root.tabH - (2 * _root.nbH)) - 4;
attachMovie(("ball_" + actualBall) + colourblind, "ball", 1);
}
_root.cadre.bulleMoving.step = -1;
_root.cadre.bulleMoving.onEnterFrame = function () {
if (this.step >= (_root.moves.length - 2)) {
delete this.onEnterFrame;
_root.putBubble();
}
this.step = this.step + 2;
this._x = _root.moves[this.step][0] - _root.nbW_2;
this._y = _root.moves[this.step][1] - _root.nbH_2;
};
}
}
function putBubble() {
_root.cadre.bulleMoving.removeMovieClip();
_root.pouet++;
_root.cadre.bubbles.createEmptyMovieClip((("bulle_" + _root.finco[1]) + "_") + _root.finco[0], 1000 + _root.pouet);
_root.cadre.bubbles[(("bulle_" + _root.finco[1]) + "_") + _root.finco[0]].drawBu(_root.finco[0], _root.finco[1], _root.actualBall);
_root.myLv[_root.finco[1]][_root.finco[0]] = _root.actualBall;
three(_root.finco[0], _root.finco[1]);
store_x = new Array();
store_y = new Array();
checkFalls();
makefall();
getNextBall();
if (_root.shoots == (_root.compressormoves - 2)) {
_root.cadre.bubbles.shake(5);
}
if (_root.shoots == (_root.compressormoves-1)) {
_root.vibrateSound.start();
_root.cadre.bubbles.shake(2);
}
if (_root.shoots == _root.compressormoves) {
delete _root.cadre.bubbles.onEnterFrame;
compressorMove();
}
_root.timer = 0;
_root.spacelocked = 0;
checkDeath();
}
function compressorMove() {
_root.topOffSet++;
_root.shoots = 0;
_root.cadre.compressor.attachMovie("compressor_ext", "compressorext_" + _root.topOffSet, _root.topOffSet + 2);
_root.cadre.compressor["compressorext_" + _root.topOffSet].displayCorrect();
_root.cadre.compressor["compressorext_" + _root.topOffSet]._y = _root.cadre.compressor["compressorext_" + _root.topOffSet]._y + (-16 * _root.topOffSet);
_root.cadre.compressor["compressorext_" + _root.topOffSet]._x = 0;
_root.cadre.compressor._y = _root.cadre.compressor._y + _root.nbH;
_root.cadre.bubbles._x = 0;
_root.cadre.bubbles.drawBulles(myLv);
if (issound == 1) {
newRootSound.start();
}
}
function checkDeath() {
if (_root.topOffSet > 11) {
youReDead();
} else {
var _local2 = (myLv.length+1);
_local2--;
while ((_local2-1) , _local2 > -1) {
var _local3 = (myLv[_local2].length+1);
_local3--;
while ((_local3-1) , _local3 > -1) {
if (myLv[_local2][_local3] > 0) {
if ((_local2 + _root.topOffSet) > 10) {
break;
}
}
}
if (myLv[_local2][_local3] > 0) {
if ((_local2 + _root.topOffSet) > 10) {
youReDead();
break;
}
}
}
}
}
function freezeBubbles() {
delete _root.cadre.bubbles.onEnterFrame;
_root.cadre.bubbles._x = 0;
_root.p--;
if (_root.p < 1) {
if (issound == 1) {
musicSound.stop();
looseSound.start();
}
clearInterval(eraseID);
displayID = setInterval(displayWinMessage, 1000);
}
_root.cadre.bubbles[(("bulle_" + _root.bubblesToFreeze[_root.p][0]) + "_") + _root.bubblesToFreeze[_root.p][1]].attachMovie(("ball_" + myLv[_root.bubblesToFreeze[_root.p][0]][_root.bubblesToFreeze[_root.p][1]]) + "_noire", "freeze", 1);
}
function returnToTitle() {
clearInterval(backtomenuID);
_root.gotoAndStop(1);
}
function displayGameOver() {
_root.cadre.createEmptyMovieClip("game_over", 999999);
_root.cadre.game_over._x = -96;
_root.cadre.game_over._y = -32;
_root.cadre.game_over.drawRect(0, 0, 320, 240, 16777215, 0, 0, 100);
_root.cadre.game_over.attachMovie("game_over", "game_over_text", 1);
_root.cadre.game_over.game_over_text._x = 90;
_root.cadre.game_over.game_over_text._y = 105;
gameOverSound.start();
backtomenuID = setInterval(returnToTitle, 7000);
}
function hitContinue() {
_root.cadre.createEmptyMovieClip("hit_continue", 999999);
_root.cadre.hit_continue._x = -96;
_root.cadre.hit_continue._y = -32;
_root.cadre.hit_continue.drawRect(0, 0, 320, 240, 16777215, 0, 0, 60);
_root.cadre.hit_continue.attachMovie("hit_continue", "hit_continue_text", 1);
_root.cadre.hit_continue.hit_continue_text._x = 45;
_root.cadre.hit_continue.hit_continue_text._y = 120;
someListener = new Object();
someListener.onKeyUp = function () {
if ((Key.getCode() == 32) || (Key.getCode() == 13)) {
if (_root.level > 30) {
gotoAndStop (3);
} else {
_root.displayLevel(_root.level);
}
}
};
Key.addListener(someListener);
}
function displayWinMessage() {
clearInterval(displayID);
if (lives <= 0) {
if (_root.highscore >= 0) {
gotoAndStop (3);
} else {
gotoAndStop (1);
}
} else {
hitContinue();
}
}
function youReDead() {
delete cadre.onEnterFrame;
Key.removeListener(someListener);
clearInterval(intervalID);
_root.cadre.hurryup.removeMovieClip();
_root.cadre.bulleNext.removeMovieClip();
_root.cadre.bulleActual.removeMovieClip();
lives--;
_root.bubblesToFreeze = new Array();
_root.p = 0;
var _local2 = myLv.length;
_local2--;
while ((_local2-1) , _local2 > -1) {
var _local3 = myLv[_local2].length;
_local3--;
while ((_local3-1) , _local3 > -1) {
if (myLv[_local2][_local3] > 0) {
_root.bubblesToFreeze.push([_local2, _local3]);
_root.p++;
}
}
}
_root.bubblesToFreeze.reverse();
eraseID = setInterval(freezeBubbles, 15);
if (issound == 1) {
freezeSound.start();
}
}
function showLv(lev) {
lv = _root["level" + lev];
var _local3 = -1;
_local3++;
while ((_local3+1) , _local3 < lv.length) {
}
}
function translateCoords(x, y) {
x = Math.round(x);
y = Math.round(y);
var _local4 = [-pr, 0, pr, -pr, pr, -pr, 0, pr];
var _local5 = [-pr, -pr, -pr, 0, 0, pr, pr, pr];
var _local6 = _local4.length;
_local6--;
while ((_local6-1) , _local6 > -1) {
var _local7 = Math.floor(((y / nbH) + _local5[_local6]) - _root.topOffSet);
if (_local7 % 2) {
var _local8 = Math.floor(((x - nbW_2) / nbW) + _local4[_local6]);
} else {
var _local8 = Math.floor((x / nbW) + _local4[_local6]);
}
if ((myLv[_local7][_local8] > 0) || (_local7 < 0)) {
var _local9 = Math.floor(y / nbH) - _root.topOffSet;
if (_local9 % 2) {
var _local10 = Math.floor((x - nbW_2) / nbW);
if (_local9 == _local7) {
if ((_local10 == 7) || (_local10 == -1)) {
_local10 = ((_local10 == 8) ? 7 : (_local10));
_local10 = ((_local10 == -1) ? 0 : (_local10));
_local9++;
}
} else {
_local10 = ((_local10 == -1) ? 0 : (_local10));
_local10 = ((_local10 == 7) ? 6 : (_local10));
}
} else {
var _local10 = Math.floor(x / nbW);
_local10 = ((_local10 == -1) ? 0 : (_local10));
_local10 = ((_local10 == 8) ? 7 : (_local10));
if (_local9 == _local7) {
if ((_local10 == 7) && (_local10 == _local8)) {
_local10--;
_local9++;
}
if ((_local10 == 0) && (_local10 == _local8)) {
_local9++;
}
}
}
_root.finalCoords = [_local10, _local9];
return(true);
}
}
return(false);
}
function three(x, y) {
var _local4 = myLv[y][x];
var _local5 = [-1, 0, 1, 0, -1, -1];
var _local6 = [0, 1, 1, 1, 0, -1];
var _local7 = [-1, -1, 0, 1, 1, 0];
var _local8 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
var _local9 = [];
var _local10 = [];
var _local11 = x;
var _local12 = y;
var _local15 = 1;
var _local16 = 1;
_local9[0] = x;
_local10[0] = y;
_local8[y][x] = 2;
while (true) {
var _local17 = 6;
_local17--;
while ((_local17-1) , _local17 > -1) {
var _local14 = _local7[_local17] + _local12;
var _local13 = ((_local12 % 2) ? (_local6[_local17] + _local11) : (_local5[_local17] + _local11));
if ((((((_local13 > -1) && (_local13 < 9)) && (_local14 > -1)) && (_local14 < 14)) && (_local8[_local14][_local13] == 0)) && (myLv[_local14][_local13] > 0)) {
_local8[_local14][_local13] = 1;
if (_root.myLv[_local14][_local13] == _local4) {
_local8[_local14][_local13] = 2;
_local9[_local15] = _local13;
_local10[_local15] = _local14;
_local15++;
}
}
}
if (_local15 == _local16) {
break;
}
_local11 = _local9[_local16];
_local12 = _local10[_local16];
_local16++;
}
if (_local15 > 2) {
var _local17 = _local15;
_local17--;
while ((_local17-1) , _local17 > -1) {
_root.cadre.bubbles[(("bulle_" + _local10[_local17]) + "_") + _local9[_local17]].jumpfall();
_root.myLv[_local10[_local17]][_local9[_local17]] = 0;
}
if (issound == 1) {
burstSound.start();
}
_root.highscore = _root.highscore + (_local15 * 10);
_local17 = 8 - _root.highscore.toString().length;
var _local18 = "";
_local17--;
while ((_local17-1) , _local17 > -1) {
_local18 = _local18 + "0";
}
cadre.highscore_panel.afficheMessage(_local18 + _root.highscore.toString(), "highscore");
} else {
if (issound == 1) {
stickSound.start();
}
_root.cadre.bubbles[(("bulle_" + _root.finco[1]) + "_") + _root.finco[0]].attachMovie("glow", "g", 2);
}
}
function makefall() {
how = 0;
var _local2 = myLv.length;
_local2--;
while ((_local2-1) , _local2 > -1) {
var _local3 = myLv[_local2].length;
_local3--;
while ((_local3-1) , _local3 > -1) {
if ((myLv[_local2][_local3] != 0) && (nestcheck[_local2][_local3] == 0)) {
_root.myLv[_local2][_local3] = 0;
_root.cadre.bubbles[(("bulle_" + _local2) + "_") + _local3].fall();
how++;
}
}
}
if (how > 0) {
if (issound == 1) {
fallSound.start();
}
switch (how) {
case 1 :
_root.highscore = _root.highscore + 20;
break;
case 2 :
_root.highscore = _root.highscore + 40;
break;
case 3 :
_root.highscore = _root.highscore + 80;
break;
case 4 :
_root.highscore = _root.highscore + 160;
break;
case 5 :
_root.highscore = _root.highscore + 320;
break;
case 6 :
_root.highscore = _root.highscore + 640;
break;
case 7 :
_root.highscore = _root.highscore + 1280;
break;
case 8 :
_root.highscore = _root.highscore + 2560;
break;
case 9 :
_root.highscore = _root.highscore + 5120;
break;
case 10 :
_root.highscore = _root.highscore + 10240;
break;
case 11 :
_root.highscore = _root.highscore + 20480;
break;
case 12 :
_root.highscore = _root.highscore + 40960;
break;
case 13 :
_root.highscore = _root.highscore + 81920;
break;
case 14 :
_root.highscore = _root.highscore + 163840;
break;
case 15 :
_root.highscore = _root.highscore + 327680;
break;
case 16 :
_root.highscore = _root.highscore + 655360;
break;
case 17 :
_root.highscore = _root.highscore + 1310720;
break;
default :
_root.highscore = _root.highscore + 1310720;
}
_local2 = 8 - _root.highscore.toString().length;
var _local4 = "";
_local2--;
while ((_local2-1) , _local2 > -1) {
_local4 = _local4 + "0";
}
cadre.highscore_panel.afficheMessage(_local4 + _root.highscore.toString(), "highscore");
}
}
function checkFalls() {
next_x = [-1, 0, 1, 0, -1, -1];
next_y = [-1, -1, 0, 1, 1, 0];
bext_x = [0, 1, 1, 1, 0, -1];
bext_y = [-1, -1, 0, 1, 1, 0];
nestcheck = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
_root.count = 0;
k = 0;
while (k < 8) {
if (myLv[0][k] != 0) {
nestcheck[0][k] = 1;
xx = k;
yy = 0;
v = 0;
if ((yy % 2) == 0) {
while (v < 6) {
xxx = next_x[v] + xx;
yyy = next_y[v] + yy;
if ((((((xxx < 0) || (xxx > 8)) || (yyy < 0)) || (yyy > 12)) || (nestcheck[yyy][xxx] != 0)) || (myLv[yyy][xxx] == 0)) {
} else {
nestcheck[yyy][xxx] = 1;
store_x[count] = xxx;
store_y[count] = yyy;
count++;
}
v++;
}
} else if ((yy % 2) != 0) {
while (v < 6) {
xxx = bext_x[v] + xx;
yyy = bext_y[v] + yy;
if ((((((xxx < 0) || (xxx > 7)) || (yyy < 0)) || (yyy > 12)) || (nestcheck[yyy][xxx] != 0)) || (myLv[yyy][xxx] == 0)) {
} else {
nestcheck[yyy][xxx] = 1;
store_x[count] = xxx;
store_y[count] = yyy;
count++;
}
v++;
}
}
}
k++;
}
testit();
}
function testit() {
var _local1 = 0;
while (_local1 < store_x.length) {
xx = store_x[_local1];
yy = store_y[_local1];
var _local2 = 0;
if ((yy % 2) == 0) {
while (_local2 < 6) {
xxx = next_x[_local2] + xx;
yyy = next_y[_local2] + yy;
if ((((((xxx < 0) || (xxx > 8)) || (yyy < 0)) || (yyy > 12)) || (nestcheck[yyy][xxx] != 0)) || (myLv[yyy][xxx] == 0)) {
} else {
nestcheck[yyy][xxx] = 1;
store_x[count] = xxx;
store_y[count] = yyy;
count++;
}
_local2++;
}
} else if ((yy % 2) != 0) {
while (_local2 < 6) {
xxx = bext_x[_local2] + xx;
yyy = bext_y[_local2] + yy;
if ((((((xxx < 0) || (xxx > 7)) || (yyy < 0)) || (yyy > 12)) || (nestcheck[yyy][xxx] != 0)) || (myLv[yyy][xxx] == 0)) {
} else {
nestcheck[yyy][xxx] = 1;
store_x[count] = xxx;
store_y[count] = yyy;
count++;
}
_local2++;
}
}
_local1++;
}
}
Key.removeListener(someListener);
level1 = [[6, 6, 4, 4, 2, 2, 3, 3], [6, 6, 4, 4, 2, 2, 3], [2, 2, 3, 3, 6, 6, 4, 4], [2, 3, 3, 6, 6, 4, 4], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level2 = [[0, 0, 0, 8, 8, 0, 0, 0], [0, 0, 0, 2, 0, 0, 0], [0, 0, 0, 3, 0, 0, 0, 0], [0, 0, 0, 2, 0, 0, 0], [0, 0, 0, 5, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, 0], [0, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level3 = [[3, 0, 0, 0, 0, 0, 0, 3], [6, 3, 2, 4, 6, 3, 2], [4, 0, 0, 0, 0, 0, 0, 4], [2, 4, 6, 3, 2, 4, 6], [0, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, 0], [0, 0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level4 = [[0, 8, 8, 0, 0, 2, 2, 0], [0, 1, 0, 0, 0, 5, 0], [0, 2, 0, 0, 0, 3, 0, 0], [0, 1, 0, 0, 0, 3, 0], [0, 1, 0, 0, 0, 3, 0, 0], [0, 6, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 2, 0, 0], [0, 6, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level5 = [[0, 4, 0, 4, 0, 4, 0, 5], [3, 0, 5, 0, 2, 0, 6], [6, 0, 2, 0, 4, 0, 5, 0], [0, 3, 0, 4, 0, 2, 0], [0, 6, 0, 5, 0, 7, 0, 0], [2, 0, 3, 0, 3, 0, 0], [0, 0, 5, 0, 4, 0, 0, 0], [0, 0, 0, 6, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level6 = [[6, 6, 3, 6, 4, 6, 5, 3], [3, 0, 5, 0, 6, 0, 6], [0, 5, 2, 6, 2, 4, 1, 0], [0, 3, 0, 4, 0, 6, 0], [0, 6, 1, 4, 4, 4, 6, 0], [1, 0, 2, 0, 6, 0, 6], [3, 1, 4, 4, 3, 2, 3, 5], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level7 = [[0, 0, 0, 3, 4, 0, 0, 0], [0, 0, 3, 4, 3, 0, 0], [0, 0, 0, 2, 4, 0, 0, 0], [0, 5, 4, 0, 7, 4, 0], [0, 2, 7, 3, 2, 5, 5, 0], [0, 2, 3, 0, 3, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level8 = [[6, 3, 2, 4, 5, 1, 6, 3], [5, 1, 6, 3, 2, 4, 5], [6, 3, 2, 4, 5, 1, 6, 3], [5, 1, 6, 3, 2, 4, 5], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level9 = [[7, 7, 7, 7, 7, 7, 7, 7], [7, 0, 0, 0, 0, 0, 7], [7, 0, 0, 5, 6, 6, 2, 5], [7, 0, 0, 0, 8, 3, 8], [7, 0, 0, 0, 0, 0, 4, 4], [2, 0, 0, 0, 0, 0, 0], [6, 6, 6, 6, 0, 0, 0, 0], [2, 2, 8, 3, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level10 = [[8, 0, 0, 0, 0, 0, 0, 6], [6, 2, 4, 3, 7, 5, 8], [8, 0, 0, 0, 0, 0, 0, 6], [6, 2, 4, 3, 7, 5, 8], [8, 0, 0, 0, 0, 0, 0, 6], [6, 2, 4, 3, 7, 5, 8], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level11 = [[0, 0, 0, 8, 2, 0, 0, 0], [0, 0, 4, 8, 2, 0, 0], [0, 0, 1, 1, 7, 6, 0, 0], [0, 4, 2, 2, 2, 1, 0], [0, 0, 2, 3, 4, 1, 0, 0], [0, 0, 3, 6, 7, 0, 0], [0, 0, 0, 7, 2, 0, 0, 0], [0, 0, 0, 5, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level12 = [[0, 0, 0, 6, 3, 0, 0, 0], [0, 0, 3, 2, 6, 0, 0], [0, 0, 2, 6, 3, 2, 0, 0], [0, 6, 3, 2, 6, 3, 0], [0, 3, 2, 6, 3, 2, 6, 0], [2, 6, 3, 2, 6, 3, 2], [6, 3, 2, 6, 3, 2, 6, 3], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level13 = [[2, 2, 4, 6, 6, 4, 2, 2], [8, 2, 4, 6, 4, 2, 8], [3, 7, 2, 4, 4, 2, 3, 7], [7, 8, 2, 4, 2, 5, 1], [1, 8, 7, 2, 2, 3, 3, 1], [3, 1, 4, 2, 6, 7, 7], [3, 3, 1, 6, 4, 3, 7, 7], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level14 = [[7, 0, 3, 0, 0, 6, 0, 8], [7, 0, 8, 0, 5, 5, 3], [0, 8, 0, 5, 3, 0, 4, 0], [5, 6, 0, 0, 0, 5, 0], [5, 0, 8, 7, 6, 8, 0, 7], [7, 0, 0, 0, 0, 0, 4], [0, 8, 2, 3, 5, 2, 4, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level15 = [[3, 3, 0, 2, 2, 0, 6, 6], [8, 0, 0, 8, 0, 0, 1], [8, 0, 0, 5, 0, 0, 5, 0], [8, 0, 0, 1, 0, 0, 1], [1, 0, 0, 4, 0, 0, 1, 0], [4, 0, 0, 1, 0, 0, 5], [4, 0, 0, 1, 0, 0, 7, 0], [5, 0, 0, 7, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level16 = [[6, 3, 2, 4, 5, 1, 7, 6], [5, 1, 7, 6, 3, 2, 4], [6, 3, 2, 4, 5, 1, 7, 6], [5, 1, 7, 6, 3, 2, 4], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level17 = [[6, 3, 6, 0, 0, 4, 2, 4], [2, 4, 2, 0, 3, 6, 3], [6, 3, 6, 0, 0, 4, 2, 4], [2, 4, 2, 0, 3, 6, 3], [6, 3, 6, 0, 0, 4, 2, 4], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level18 = [[0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 3, 0, 0, 1, 0, 6, 0], [7, 0, 0, 1, 0, 0, 7], [0, 4, 0, 0, 1, 0, 4, 0], [0, 7, 0, 1, 0, 3, 0], [0, 0, 7, 8, 7, 7, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level19 = [[1, 3, 4, 1, 3, 4, 1, 3], [4, 1, 3, 0, 1, 3, 4], [0, 3, 4, 0, 0, 4, 1, 0], [0, 1, 0, 0, 0, 3, 0], [0, 3, 4, 0, 0, 4, 1, 0], [4, 1, 3, 0, 1, 3, 4], [1, 3, 4, 1, 3, 4, 1, 3], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level20 = [[4, 0, 3, 0, 0, 1, 0, 6], [2, 0, 8, 0, 3, 0, 4], [4, 0, 0, 3, 3, 0, 0, 6], [6, 0, 3, 1, 5, 0, 4], [4, 0, 0, 2, 8, 0, 0, 6], [2, 0, 1, 0, 8, 0, 4], [4, 0, 1, 0, 0, 8, 0, 6], [6, 0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level21 = [[1, 5, 7, 4, 1, 5, 7, 4], [7, 4, 1, 0, 7, 4, 1], [0, 5, 7, 0, 0, 5, 7, 0], [0, 4, 0, 0, 0, 4, 0], [0, 5, 7, 0, 0, 5, 7, 0], [7, 4, 1, 0, 7, 4, 1], [1, 5, 7, 4, 1, 5, 7, 4], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level22 = [[6, 6, 6, 6, 6, 6, 6, 6], [4, 0, 0, 0, 0, 0, 0], [0, 3, 2, 5, 7, 6, 4, 3], [0, 5, 0, 0, 0, 0, 0], [0, 0, 7, 4, 3, 2, 5, 7], [0, 0, 6, 0, 0, 0, 0], [0, 0, 0, 4, 3, 2, 5, 7], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level23 = [[0, 0, 0, 5, 3, 0, 0, 0], [0, 0, 2, 5, 1, 0, 0], [0, 0, 3, 2, 1, 6, 0, 0], [0, 4, 3, 0, 6, 7, 0], [0, 7, 4, 0, 0, 7, 4, 0], [6, 7, 0, 0, 0, 4, 3], [1, 6, 0, 0, 0, 0, 3, 2], [1, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level24 = [[1, 6, 7, 4, 0, 0, 0, 0], [5, 2, 3, 0, 0, 0, 0], [1, 6, 7, 4, 0, 0, 0, 0], [5, 2, 3, 0, 0, 0, 0], [1, 6, 7, 4, 0, 0, 0, 0], [5, 2, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level25 = [[2, 0, 0, 0, 0, 0, 0, 5], [2, 0, 0, 0, 0, 0, 5], [0, 8, 0, 0, 0, 0, 6, 0], [6, 2, 4, 3, 7, 5, 8], [0, 8, 0, 0, 0, 0, 6, 0], [6, 2, 4, 3, 7, 5, 8], [0, 8, 0, 0, 0, 0, 6, 0], [6, 2, 4, 3, 7, 5, 8], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level26 = [[6, 3, 2, 4, 5, 7, 1, 8], [7, 1, 8, 6, 3, 2, 4], [6, 3, 2, 4, 5, 7, 1, 8], [7, 1, 8, 6, 3, 2, 4], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level27 = [[6, 6, 6, 0, 0, 6, 6, 6], [0, 0, 6, 0, 6, 0, 0], [0, 0, 2, 3, 3, 2, 0, 0], [0, 3, 0, 5, 0, 3, 0], [0, 0, 5, 3, 3, 5, 0, 0], [0, 0, 6, 8, 6, 0, 0], [0, 4, 2, 0, 0, 2, 4, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level28 = [[6, 3, 2, 1, 4, 6, 3, 0], [1, 4, 6, 3, 2, 1, 0], [0, 3, 2, 1, 4, 6, 0, 0], [0, 4, 6, 3, 2, 0, 0], [0, 0, 2, 1, 4, 0, 0, 0], [0, 0, 6, 3, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level29 = [[0, 0, 3, 0, 0, 3, 0, 0], [0, 0, 3, 0, 3, 0, 0], [0, 0, 0, 3, 3, 0, 0, 0], [0, 5, 6, 3, 6, 5, 0], [0, 3, 4, 0, 0, 4, 3, 0], [1, 0, 6, 2, 6, 0, 1], [8, 0, 0, 5, 5, 0, 0, 8], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
level30 = [[6, 0, 2, 0, 6, 0, 2, 0], [3, 0, 4, 0, 3, 0, 4], [2, 0, 5, 0, 2, 0, 5, 0], [4, 0, 7, 0, 4, 0, 7], [5, 0, 1, 0, 5, 0, 1, 0], [7, 0, 8, 0, 7, 0, 8], [1, 0, 6, 0, 1, 0, 6, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
var nbW = 16;
var nbH = 14;
var nbW_2 = (nbW / 2);
var nbH_2 = (nbH / 2);
var pr = 0.3;
var lives = 3;
var tabW = 128;
var tabW_2 = (tabW / 2);
var tabH = 192;
var espacement = 4;
var anglemove = 0.04;
var Pi = 3.14;
var debugmode = 0;
var afficherligne = 0;
var afficherpoints = 0;
var highscore = 0;
var compressormoves = 8;
var level = 1;
var burstSound = new Sound();
burstSound.attachSound("burst.wav");
var fallSound = new Sound();
fallSound.attachSound("destroy_group.wav");
var stickSound = new Sound();
stickSound.attachSound("stick.wav");
var newRootSound = new Sound();
newRootSound.attachSound("newroot_solo.wav");
var launchSound = new Sound();
launchSound.attachSound("launch.wav");
var looseSound = new Sound();
looseSound.attachSound("noh.wav");
var winSound = new Sound();
winSound.attachSound("applause.wav");
var hurrySound = new Sound();
hurrySound.attachSound("hurry.wav");
var gameOverSound = new Sound();
gameOverSound.attachSound("GAMEOVER.WAV");
var readySound = new Sound();
readySound.attachSound("readygo.mp3");
var vibrateSound = new Sound();
vibrateSound.attachSound("Vibrate.wav");
var freezeSound = new Sound();
freezeSound.attachSound("freezebubbles.wav");
var musicSound = new Sound();
musicSound.attachSound("music_16.mp3");
var cheatSound = new Sound();
cheatSound.attachSound("Item03.wav");
MovieClip.prototype.afficheMessage = function (message, fontused) {
if (fontused == "highscore") {
fused = "font_highscore";
letter_space = 8;
} else if (fontused == "levels") {
fused = "font_levels";
letter_space = 15;
}
var _local4 = -1;
var _local5 = message.length;
_local4++;
while ((_local4+1) , _local4 < _local5) {
this.attachMovie(fused, "f" + _local4, _local4);
this["f" + _local4]._x = this["f" + (_local4-1)]._x - letter_space;
if (Number(message.substr(_local5 - (_local4+1), 1)) < 10) {
this["f" + _local4].gotoAndStop(Number(message.substr(_local5 - (_local4+1), 1)) + 2);
} else {
this["f" + _local4].gotoAndStop(message.substr(_local5 - (_local4+1), 1));
}
}
};
MovieClip.prototype.shake = function (delta) {
this.deltacounter = 0;
this.deltamove = delta;
this.delta = 1;
this.xbase = this._x;
this.onEnterFrame = function () {
this.deltacounter++;
if ((this.deltacounter % this.deltamove) == 0) {
this.delta = -this.delta;
this._x = this.xbase + this.delta;
}
};
};
MovieClip.prototype.jumpfall = function () {
this.name = (((random(1000) + "_") + random(1000)) + "_") + random(1000);
this._name = this.name;
this.onEnterFrame = function () {
this._y = this._y - 2;
this._x = this._x - 2;
this._width = this._width + 3;
this._height = this._height + 3;
this._alpha = this._alpha - 15;
if (this._alpha <= 10) {
_root.cadre.attachMovie("10_points", this.name + "_p", random(1000) + 3000);
_root.cadre[this.name + "_p"]._x = this._x + 10;
_root.cadre[this.name + "_p"]._y = this._y + 10;
this.removeMovieClip();
}
};
};
MovieClip.prototype.fall = function () {
var moveY = (-2 - (Math.random() * 8));
this._name = (((random(1000) + "_") + random(1000)) + "_") + random(1000);
this.onEnterFrame = function () {
moveY++;
this._y = this._y + moveY;
if (this._y >= 240) {
this.removeMovieClip();
}
};
};
MovieClip.prototype.blink = function () {
_root.cadre.winpanel.message._visible = ((_root.cadre.winpanel.message._visible == 1) ? 0 : 1);
};
MovieClip.prototype.displayCorrect = function () {
if (_root.level < 4) {
this.gotoAndStop(1);
} else if ((_root.level > 3) && (_root.level < 7)) {
this.gotoAndStop(2);
} else if ((_root.level > 6) && (_root.level < 10)) {
this.gotoAndStop(3);
} else if ((_root.level > 9) && (_root.level < 13)) {
this.gotoAndStop(4);
} else if ((_root.level > 12) && (_root.level < 16)) {
this.gotoAndStop(5);
} else if ((_root.level > 15) && (_root.level < 19)) {
this.gotoAndStop(6);
} else if ((_root.level > 18) && (_root.level < 22)) {
this.gotoAndStop(7);
} else if ((_root.level > 21) && (_root.level < 25)) {
this.gotoAndStop(8);
} else if ((_root.level > 24) && (_root.level < 28)) {
this.gotoAndStop(9);
} else if ((_root.level > 27) && (_root.level < 31)) {
this.gotoAndStop(10);
}
};
MovieClip.prototype.drawBu = function (x, y, co) {
with (this) {
if (y % 2) {
_x = (x * _root.nbW) + _root.nbW_2;
} else {
_x = x * _root.nbW;
}
_y = Math.round((y + _root.topOffSet) * _root.nbH);
attachMovie(("ball_" + co) + _root.colourblind, "ball", 1);
}
};
MovieClip.prototype.drawBulles = function (myLv) {
var i = myLv.length;
while ((--i) > -1) {
var j = myLv[i].length;
while ((--j) > -1) {
if (myLv[i][j] > 0) {
this.createEmptyMovieClip((("bulle_" + i) + "_") + j, 1000 + (_root.pouet++));
with (this[(("bulle_" + i) + "_") + j]) {
if (i % 2) {
_x = Math.round((j * nbW) + (nbW / 2));
} else {
_x = Math.round(j * nbW);
}
_y = Math.round(i * nbH) + (_root.topOffSet * _root.nbH);
attachMovie(("ball_" + myLv[i][j]) + _root.colourblind, "ball", 1);
}
}
}
}
};
MovieClip.prototype.PIC = function (pdx, pdy, pax, pay) {
var _local5 = tabW;
var _local6 = 0;
var _local7 = 0;
(((pax - pdx) >= 0) ? (_local7++) : (_local7--));
if (pdx == pax) {
return([pax, 0]);
}
if (pax != 0) {
var _local8 = (pdy - pay) / (pdx - pax);
var _local9 = ((pay * pdx) - (pdy * pax)) / (pdx - pax);
} else {
var _local9 = pay;
var _local8 = (pdy - _local9) / pdx;
}
if (_local7 == 1) {
if (((_local8 * _local5) + _local9) < 0) {
return([(-_local9) / _local8, _local6]);
}
return([_local5, (_local8 * _local5) + _local9]);
}
if (_local9 < 0) {
return([(-_local9) / _local8, _local6]);
}
return([_local6, _local9]);
};
MovieClip.prototype.render = function () {
_root.cOords = new Array();
var _local3 = 0;
var _local4 = (10 * Math.cos(angle)) + tabW_2;
var _local5 = (((10 * Math.sin(angle)) + _root.tabH) - (2 * _root.nbH)) + 2;
var _local6 = PIC(tabW_2, (_root.tabH - (2 * _root.nbH)) + 2, _local4, _local5);
var _local7 = 0;
depth = _local7;
var _local8 = Math.sin(angle);
var _local9 = Math.cos(angle);
var _local10 = (_root.tabH - (2 * _root.nbH)) + 2;
_local7++;
while ((_local7+1) , (((espacement * _local7) * _local8) + _local10) > _local6[1]) {
var _local11 = ((espacement * _local7) * _local9) + tabW_2;
var _local12 = ((espacement * _local7) * _local8) + _local10;
if (translateCoords(_local11, _local12)) {
_local3 = 1;
break;
}
_root.cOords.push([_local11, _local12]);
depth++;
}
angle1 = angle;
rebonds = 1;
while ((_local6[1] > 0) && (_local3 != 1)) {
rebonds++;
if (this["angle" + (rebonds-1)] < (-(Pi / 2))) {
this["angle" + rebonds] = (-(Pi / 2)) - (this["angle" + (rebonds-1)] + (Pi / 2));
} else {
this["angle" + rebonds] = (-(Pi / 2)) - ((Pi / 2) + this["angle" + (rebonds-1)]);
}
var _local13 = (espacement * Math.cos(this["angle" + rebonds])) + _local6[0];
var _local14 = (espacement * Math.sin(this["angle" + rebonds])) + _local6[1];
var _local15 = PIC(_local6[0], _local6[1], _local13, _local14);
var _local16 = _local6[0];
var _local17 = _local6[1];
_local6 = _local15;
_local7 = 0;
if (_local3 != 1) {
_local7++;
while ((_local7+1) , (((espacement * _local7) * Math.sin(this["angle" + rebonds])) + _local17) > _local6[1]) {
var _local11 = ((espacement * _local7) * Math.cos(this["angle" + rebonds])) + _local16;
var _local12 = ((espacement * _local7) * Math.sin(this["angle" + rebonds])) + _local17;
if (translateCoords(_local11, _local12)) {
_local3 = 1;
break;
}
_root.cOords.push([_local11, _local12]);
depth++;
}
}
}
};
displayLevel(level);
stop();
Frame 3
function sendscore() {
sc = new LoadVars();
sc.gname = "puzzlebobbleGC";
sc.gscore = highscore;
sc.send("index.php?act=Arcade&do=newscore", "_self", "POST");
_root._visible = false;
_root.enabled = false;
stopAllSounds();
clearInterval(logoID);
stop();
}
gameOverSound.start();
_root.cadre.removemovieclip();
_root.pause.removemovieclip();
entered = 0;
_root.ourtarget = "one";
bub_1._visible = false;
bub_2._visible = false;
bub_3._visible = false;
logoID = setInterval(sendscore, 5000);
stop();
Frame 4
function goMain() {
clearInterval(logoID);
_root.gotoAndStop(1);
}
Key.removeListener(someListener);
_root.cadre.removeMovieClip();
_root.pause.removeMovieClip();
MovieClip.prototype.afficheMessage2 = function (message) {
letter_space = 16;
var _local3 = -1;
var _local4 = message.length;
_local3++;
while ((_local3+1) , _local3 < _local4) {
this.attachMovie("font_reg_entry_nums", "f_" + _local3, _local3);
this["f_" + _local3]._x = this["f_" + (_local3-1)]._x + letter_space;
if (Number(message.substr(_local3, 1)) < 10) {
this["f_" + _local3].gotoAndStop(Number(message.substr(_local3, 1)) + 2);
} else if (message.substr(_local3, 1) == " ") {
this["f_" + _local3].gotoAndStop(0);
} else if (message.substr(_local3, 1) == ".") {
this["f_" + _local3].gotoAndStop("point");
} else {
this["f_" + _local3].gotoAndStop(message.substr(_local3, 1));
}
}
};
MovieClip.prototype.setColor = function (ra, rb, ga, gb, ba, bb, aa, ab) {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
myColor.setTransform(myColorTransform);
};
logoID = setInterval(goMain, 8000000);
stop();
Frame 5
stop();
Symbol 18 MovieClip [ball_8_noire] Frame 1
stop();
Symbol 21 MovieClip [ball_8] Frame 1
stop();
Symbol 24 MovieClip [ball_1_noire] Frame 1
stop();
Symbol 27 MovieClip [ball_1] Frame 1
stop();
Symbol 30 MovieClip [ball_2_noire] Frame 1
stop();
Symbol 33 MovieClip [ball_2] Frame 1
stop();
Symbol 36 MovieClip [ball_3_noire] Frame 1
stop();
Symbol 39 MovieClip [ball_3] Frame 1
stop();
Symbol 42 MovieClip [ball_4_noire] Frame 1
stop();
Symbol 45 MovieClip [ball_4] Frame 1
stop();
Symbol 48 MovieClip [ball_5_noire] Frame 1
stop();
Symbol 51 MovieClip [ball_5] Frame 1
stop();
Symbol 54 MovieClip [ball_6_noire] Frame 1
stop();
Symbol 57 MovieClip [ball_6] Frame 1
stop();
Symbol 60 MovieClip [ball_7_noire] Frame 1
stop();
Symbol 63 MovieClip [ball_7] Frame 1
stop();
Symbol 66 MovieClip [launcher] Frame 1
stop();
Symbol 69 MovieClip [glow] Frame 11
this.removeMovieClip();
Symbol 80 MovieClip [compressor] Frame 1
stop();
Symbol 80 MovieClip [compressor] Frame 2
stop();
Symbol 80 MovieClip [compressor] Frame 3
stop();
Symbol 80 MovieClip [compressor] Frame 4
stop();
Symbol 80 MovieClip [compressor] Frame 5
stop();
Symbol 80 MovieClip [compressor] Frame 6
stop();
Symbol 80 MovieClip [compressor] Frame 7
stop();
Symbol 80 MovieClip [compressor] Frame 8
stop();
Symbol 80 MovieClip [compressor] Frame 9
stop();
Symbol 80 MovieClip [compressor] Frame 10
stop();
Symbol 101 MovieClip [compressor_ext] Frame 1
stop();
Symbol 101 MovieClip [compressor_ext] Frame 2
stop();
Symbol 101 MovieClip [compressor_ext] Frame 3
stop();
Symbol 101 MovieClip [compressor_ext] Frame 4
stop();
Symbol 101 MovieClip [compressor_ext] Frame 5
stop();
Symbol 101 MovieClip [compressor_ext] Frame 6
stop();
Symbol 101 MovieClip [compressor_ext] Frame 7
stop();
Symbol 101 MovieClip [compressor_ext] Frame 8
stop();
Symbol 101 MovieClip [compressor_ext] Frame 9
stop();
Symbol 101 MovieClip [compressor_ext] Frame 10
stop();
Symbol 122 MovieClip [hurry] Frame 1
if (_root.issound == 1) {
}
_root.hurrySound.start();
Symbol 128 MovieClip [font_levels] Frame 1
stop();
Symbol 149 MovieClip [font_highscore] Frame 1
stop();
Symbol 171 Button
on (press) {
if (_parent.name != "") {
}
if (blah != 1) {
blah = 1;
this.removeMovieClip();
}
}
Symbol 182 MovieClip [round] Frame 1
stop();
Symbol 206 MovieClip [10_points] Frame 11
this.removeMovieClip();
Symbol 213 MovieClip [font_reg_entry_nums] Frame 1
val = " ";
stop();
Symbol 288 MovieClip [font_reg_entry] Frame 1
val = "a";
stop();
Symbol 288 MovieClip [font_reg_entry] Frame 2
val = "b";
Symbol 288 MovieClip [font_reg_entry] Frame 3
val = "c";
Symbol 288 MovieClip [font_reg_entry] Frame 4
val = "d";
Symbol 288 MovieClip [font_reg_entry] Frame 5
val = "e";
Symbol 288 MovieClip [font_reg_entry] Frame 6
val = "f";
Symbol 288 MovieClip [font_reg_entry] Frame 7
val = "g";
Symbol 288 MovieClip [font_reg_entry] Frame 8
val = "h";
Symbol 288 MovieClip [font_reg_entry] Frame 9
val = "i";
Symbol 288 MovieClip [font_reg_entry] Frame 10
val = "j";
Symbol 288 MovieClip [font_reg_entry] Frame 11
val = "k";
Symbol 288 MovieClip [font_reg_entry] Frame 12
val = "l";
Symbol 288 MovieClip [font_reg_entry] Frame 13
val = "m";
Symbol 288 MovieClip [font_reg_entry] Frame 14
val = "n";
Symbol 288 MovieClip [font_reg_entry] Frame 15
val = "o";
Symbol 288 MovieClip [font_reg_entry] Frame 16
val = "p";
Symbol 288 MovieClip [font_reg_entry] Frame 17
val = "q";
Symbol 288 MovieClip [font_reg_entry] Frame 18
val = "r";
Symbol 288 MovieClip [font_reg_entry] Frame 19
val = "s";
Symbol 288 MovieClip [font_reg_entry] Frame 20
val = "t";
Symbol 288 MovieClip [font_reg_entry] Frame 21
val = "u";
Symbol 288 MovieClip [font_reg_entry] Frame 22
val = "v";
Symbol 288 MovieClip [font_reg_entry] Frame 23
val = "w";
Symbol 288 MovieClip [font_reg_entry] Frame 24
val = "x";
Symbol 288 MovieClip [font_reg_entry] Frame 25
val = "y";
Symbol 288 MovieClip [font_reg_entry] Frame 26
val = "z";
Symbol 288 MovieClip [font_reg_entry] Frame 27
val = "0";
Symbol 288 MovieClip [font_reg_entry] Frame 28
val = "1";
Symbol 288 MovieClip [font_reg_entry] Frame 29
val = "2";
Symbol 288 MovieClip [font_reg_entry] Frame 30
val = "3";
Symbol 288 MovieClip [font_reg_entry] Frame 31
val = "4";
Symbol 288 MovieClip [font_reg_entry] Frame 32
val = "5";
Symbol 288 MovieClip [font_reg_entry] Frame 33
val = "6";
Symbol 288 MovieClip [font_reg_entry] Frame 34
val = "7";
Symbol 288 MovieClip [font_reg_entry] Frame 35
val = "8";
Symbol 288 MovieClip [font_reg_entry] Frame 36
val = "9";
Symbol 288 MovieClip [font_reg_entry] Frame 37
val = ".";
Symbol 288 MovieClip [font_reg_entry] Frame 39
val = " ";
Symbol 291 MovieClip [vide] Frame 1
stop();
Symbol 291 MovieClip [vide] Frame 136
gotoAndStop (1);
Instance of Symbol 291 MovieClip [vide] in Symbol 292 MovieClip [bub] Frame 1
onClipEvent (enterFrame) {
x = Math.round(Math.random(10) * 10);
if (x > 9) {
_parent.play();
}
updateAfterEvent();
}
Symbol 292 MovieClip [bub] Frame 10
gotoAndStop (1);
Symbol 292 MovieClip [bub] Frame 19
gotoAndPlay (11);
Symbol 292 MovieClip [bub] Frame 90
gotoAndPlay (20);
Symbol 292 MovieClip [bub] Frame 91
stop();
Symbol 292 MovieClip [bub] Frame 92
stop();
Symbol 292 MovieClip [bub] Frame 102
gotoAndPlay (1);
Symbol 292 MovieClip [bub] Frame 105
b.gotoAndStop(bouletomove);
Symbol 292 MovieClip [bub] Frame 107
b.gotoAndStop(bouletomove);
Symbol 292 MovieClip [bub] Frame 108
gotoAndPlay (1);
Symbol 319 Button
on (release, keyPress "<Enter>") {
clearInterval(logoID);
_root.gotoAndStop(2);
}
Symbol 341 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 2
stop();
Symbol 341 MovieClip Frame 3
stop();
Symbol 341 MovieClip Frame 4
stop();
Symbol 341 MovieClip Frame 5
stop();
Symbol 341 MovieClip Frame 6
stop();
Symbol 341 MovieClip Frame 7
stop();
Symbol 341 MovieClip Frame 8
stop();
Symbol 341 MovieClip Frame 9
stop();
Symbol 341 MovieClip Frame 10
stop();
Symbol 362 Button
on (release, keyPress "<Enter>") {
clearInterval(logoID);
_root.gotoAndStop(2);
}
Symbol 377 MovieClip Frame 1
nCharacterCount = 7;
nFrameCount = 3;
nWaveCrest = 10;
nWaveWidth = 5;
function fun() {
i = 1;
while (nCharacterCount >= i) {
this["c" + i]._y = PosY[i] + (Math.sin(State[i]) * nWaveCrest);
State[i] = State[i] + 0.4;
i++;
}
}
function again() {
gotoAndPlay (2);
}
State = new Array(nCharacterCount);
PosY = new Array(nCharacterCount);
i = 1;
while (nCharacterCount >= i) {
PosY[i] = this["c" + i]._y;
i++;
}
i = 1;
while (nCharacterCount >= i) {
State[i] = (3.1415926 / nWaveWidth) * i;
i++;
}
fun();
Symbol 377 MovieClip Frame 2
fun();
Symbol 377 MovieClip Frame 3
again();
Symbol 376 MovieClip Frame 2
fun();
Symbol 376 MovieClip Frame 3
again();
Symbol 385 MovieClip Frame 1
nCharacterCount = 4;
nFrameCount = 3;
nWaveCrest = 10;
nWaveWidth = 5;
function fun() {
i = 1;
while (nCharacterCount >= i) {
this["c" + i]._y = PosY[i] + (Math.sin(State[i]) * nWaveCrest);
State[i] = State[i] + 0.4;
i++;
}
}
function again() {
gotoAndPlay (2);
}
State = new Array(nCharacterCount);
PosY = new Array(nCharacterCount);
i = 1;
while (nCharacterCount >= i) {
PosY[i] = this["c" + i]._y;
i++;
}
i = 1;
while (nCharacterCount >= i) {
State[i] = (3.1415926 / nWaveWidth) * i;
i++;
}
fun();
Symbol 385 MovieClip Frame 2
fun();
Symbol 385 MovieClip Frame 3
again();
Symbol 384 MovieClip Frame 2
fun();
Symbol 384 MovieClip Frame 3
again();