Frame 1
var \x01 = 498;
// swfAction0x03 // Unknown action
Frame 2
var \x01 = 543;
// swfAction0x03 // Unknown action
Frame 4
var \x01 = 536;
// swfAction0x03 // Unknown action
Frame 5
function updateVector(v, frompoints) {
if (frompoints) {
v.vx = v.p1.x - v.p0.x;
v.vy = v.p1.y - v.p0.y;
} else {
v.p1.x = v.p0.x + v.vx;
v.p1.y = v.p0.y + v.vy;
}
v.len = Math.sqrt((v.vx * v.vx) + (v.vy * v.vy));
if (v.len > 0) {
v.dx = v.vx / v.len;
v.dy = v.vy / v.len;
} else {
v.dx = 0;
v.dy = 0;
}
v.rx = -v.dy;
v.ry = v.dx;
v.lx = v.dy;
v.ly = -v.dx;
return(v);
}
function bounce(v1, v2) {
var _local4 = projectVector(v1, v2.dx, v2.dy);
var _local1 = projectVector(v1, v2.lx, v2.ly);
var _local3 = {};
_local1.len = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
_local1.vx = v2.lx * _local1.len;
_local1.vy = v2.ly * _local1.len;
_local3.vx = _local4.vx + _local1.vx;
_local3.vy = _local4.vy + _local1.vy;
return(_local3);
}
function findIntersection(v1, v2) {
var _local2 = {};
_local2.vx = v1.p1.x - v2.p0.x;
_local2.vy = v1.p1.y - v2.p0.y;
var _local6 = (_local2.vx * v2.dx) + (_local2.vy * v2.dy);
if (_local6 < 0) {
var _local5 = _local2;
} else {
var _local3 = {};
_local3.vx = v1.p1.x - v2.p1.x;
_local3.vy = v1.p1.y - v2.p1.y;
_local6 = (_local3.vx * v2.dx) + (_local3.vy * v2.dy);
if (_local6 > 0) {
var _local5 = _local3;
} else {
var _local5 = projectVector(_local2, v2.lx, v2.ly);
}
}
return(_local5);
}
function projectVector(v1, dx, dy) {
var _local2 = (v1.vx * dx) + (v1.vy * dy);
var _local1 = {};
_local1.vx = _local2 * dx;
_local1.vy = _local2 * dy;
return(_local1);
}
function dotP(v1, v2) {
var _local1 = (v1.vx * v2.vx) + (v1.vy * v2.vy);
return(_local1);
}
function insertRecord(hs_score, hs_name, game_id) {
var _local2 = new LoadVars();
_local2.onLoad = function (ok) {
if (ok) {
var _local2 = {weeklyScorepos:this.weeklyScorepos, alltimeScorepos:this.scorepos, success:true};
setHS_panel(5, _local2);
} else {
setHS_panel(4);
}
};
if (hs_name == "") {
highScoresObj.mc.message.text = "Enter your name first";
setHS_panel(3);
} else if ((isNaN(hs_score) || (Number(hs_score) < 0)) || (Number(hs_score) > 1000000)) {
highScoresObj.mc.message.text = "Score must be a number between 0 and 1000000";
} else {
_local2.naam = hs_name;
_local2.score = hs_score;
_local2.game_id = game_id;
_local2.do_alltime = highScoresObj.doAlltime;
_local2.do_weekly = highScoresObj.doWeekly;
_local2.sendAndLoad(highScoresObj.path + highScoresObj.verwerkFile, _local2, "post");
}
}
function determineTopPos(hs_score, game_id) {
var _local2 = new LoadVars();
_local2.onLoad = function (ok) {
if (ok) {
var _local2 = {alltime:this.made_it, weekly:this.weekly_made_it};
setHS_panel(2, _local2);
} else {
setHS_panel(4);
}
};
if ((isNaN(highScoresObj.playerScore) || (Number(highScoresObj.playerScore) < 0)) || (Number(highScoresObj.playerScore) > 1000000)) {
message.text = "Score must be a number between 0 and 1000000";
} else {
_local2.score = hs_score;
_local2.game_id = game_id;
_local2.naam = "nnaam";
_local2.sendAndLoad(highScoresObj.path + highScoresObj.get_topFile, _local2, "post");
}
}
releaseListener = function () {
if ((game.countDown.active == true) && (game.exam == true)) {
var _local1 = true;
} else {
var _local1 = false;
}
if (_local1 == false) {
if (Key.isDown(32)) {
game.reactieScore = game.reactieScore + (20 - (game.tel - game.telReactie));
trace(game.reactieScore + " REACTIE !!!!!!!!");
game.heroReleased = true;
hero.mc.aktie = "val";
hero.released = true;
hero.platformMc.removeMovieClip();
if (game.exam != true) {
game.numTries++;
}
}
}
};
chuteListener = function () {
if (Key.isDown(32)) {
hero.chuteUit = true;
hero.chute = {x:hero.p1.x, y:hero.p1.y, vy:hero.vy, speed:4};
var _local1 = actionContainer.getNextHighestDepth();
var _local2 = (hero.chute.mc = actionContainer.attachMovie("mcChute", "mcChute" + _local1, _local1));
_local2._x = hero.chute.x;
_local2._y = hero.chute.y;
}
};
mainLoop = function () {
if (game.pauze != true) {
game.tel++;
doExplosions();
if (game.startSequence == false) {
if (game.heroReleased != true) {
releaseListener();
}
doScroll();
heroENT();
if (game.blobsLanded == false) {
doBlobAI();
} else if (game.gameover != true) {
loopAfterJump();
}
var _local2 = 0;
while (_local2 < game.blobs.length) {
var _local1 = game.blobs[_local2];
if (_local1.active != false) {
if (_local1.released == true) {
blobENT(_local1);
if (_local1.chuteUit == false) {
if (_local1.stuiter != true) {
updateObject(_local1, true);
if (_local1.p0.y > 360) {
if (_local1 == hero) {
chuteListener();
}
}
} else {
updateObject(_local1);
}
} else {
doChute(_local1.chute);
updateObject(_local1);
blobBengel(_local1);
}
}
}
_local2++;
}
} else if (game.exam == true) {
examSequence();
} else {
startSequence();
}
draw();
}
};
startgame = function (optie) {
root = this;
savedProgress = _global.savedGame.progressObj;
spelHouder = root.createEmptyMovieClip("spelHouder", "spelHouder", 0);
var _local5 = root.attachMovie("mcMask", "mcMask", 1);
spelHouder.setMask(_local5);
main = spelHouder.createEmptyMovieClip("mainContainer", 0);
hud = spelHouder.createEmptyMovieClip("hudContainer", 1);
var _local3 = main.createEmptyMovieClip("backGroundContainer", 0);
var _local10 = (terrainContainer = main.createEmptyMovieClip("terrainContainer", 1));
main.createEmptyMovieClip("stringContainer", 2);
var _local11 = main.createEmptyMovieClip("blobContainer", 3);
var _local15 = (actionContainer = main.createEmptyMovieClip("actionContainer", 4));
game = {tel:0, keypressed:false, gameover:false, g:2};
if (_global.savedGame.examPassed == false) {
game.exam = true;
game.examPassed = false;
game.timeToBeat = 90;
} else {
game.exam = false;
}
main.onEnterFrame = function () {
mainLoop();
};
game.heroReleased = false;
game.bg = _local3.attachMovie("mcBg", "mcBg", 0);
game.bgTop = _local3.attachMovie("mcBgTop", "mcBgTop", 1);
game.sW = 300;
game.sH = 400;
game.heroScrollPos = 200;
game.endHeroScrollPos = 100;
game.countDown.step = 0;
game.countDown = {active:true, step:0, nextStep:getNextStep()};
game.falseStart = false;
game.lastExplosionTime = getTimer();
game.endGame = false;
game.startSequence = true;
game.userReady = false;
game.gold = savedProgress.gold;
game.health = savedProgress.health;
if (savedProgress.wins == null) {
savedProgress.wins = 0;
}
game.wins = savedProgress.wins;
game.aantJumps = 0;
game.numTries = savedProgress.numTries;
game.totalPoints = savedProgress.totalPoints;
game.blobsLanded = false;
game.reactieScore = 0;
game.attachHoogte = 120;
game.gameBeaten = false;
game.roundMessagePlayed = false;
game.jumpInitialized = false;
game.lastScrollCalled = false;
game.explosionObjects = new Array();
resetBlobStats();
if (_global.savedGame.examPassed == false) {
var _local6 = 0;
} else {
var _local6 = savedProgress.level;
}
if (_global.savedGame.difficulty == 0) {
game.hard = false;
} else {
game.hard = true;
}
initLeague(_local6);
game.landHoogte = game.levelHoogte - 30;
trace(game.hard + " set hard");
makeBlobs();
attachPaneel();
initPaneel();
updatePlayerInfo();
attachMuteButton();
game.volgBlob = hero;
everyTwoSecInt = setInterval(everyTwoSec, 2000);
game.bgTop._y = game.levelHoogte;
main._y = -(game.levelHoogte - game.sH);
var _local4 = (-main._y) + game.sH;
game.bg._y = (_local4 + game.levelHoogte) / 2;
};
everyTwoSec = function () {
randomSFX();
};
checkTerrainCollisions = function (obj) {
var _local5 = 0;
while (_local5 < aTerrain.length) {
var _local3 = aTerrain[_local5];
var _local9 = (_local3.p0.x + _local3.p1.x) / 2;
var _local8 = (_local3.p0.y + _local3.p1.y) / 2;
if ((Math.abs(obj.p1.x - _local9) < 80) && (Math.abs(obj.p1.y - _local8) < 80)) {
var _local2 = findIntersection(obj, _local3);
_local2 = updateVector(_local2, false);
var _local4 = obj.r - _local2.len;
if (_local4 >= 0) {
obj.p1.x = obj.p1.x + (_local2.dx * _local4);
obj.p1.y = obj.p1.y + (_local2.dy * _local4);
if ((obj.type == "rots") || (obj.type == "mijn")) {
obj.mc.rotplus = 10 - (Math.random() * 20);
}
if (obj.stuiter == true) {
var _local7 = {dx:_local2.lx, dy:_local2.ly, lx:_local2.dx, ly:_local2.dy, b:obj.b, f:_local3.f};
var _local6 = bounce(obj, _local7);
obj.vx = _local6.vx;
obj.vy = _local6.vy;
} else {
obj.speed = obj.speed * 0.6;
}
}
}
_local5++;
}
};
checkStageBounds = function (obj) {
if (obj.p1.x > (sW - obj.r)) {
obj.p1.x = sW - obj.r;
obj.vx = -obj.vx;
} else if (obj.p1.x < obj.r) {
obj.p1.x = obj.r;
obj.vx = -obj.vx;
}
if (obj.p1.y > (sH - obj.r)) {
obj.p1.y = sH - obj.r;
obj.vy = -obj.vy;
} else if (obj.p1.y < obj.r) {
obj.p1.y = obj.r;
obj.vy = -obj.vy;
}
};
updateObject = function (v, optieSlowdown) {
if (v.zinkt != true) {
if (optieSlowdown == true) {
v.vy = v.vy + (game.g / (1 + (v.vy / 3)));
var _local2 = game.league.blobs[v.blobNr].maxVal;
if (v.vy > _local2) {
v.vy = _local2;
}
} else {
v.vy = v.vy + game.g;
}
}
v.p1 = {};
v.p1.x = v.p0.x + v.vx;
v.p1.y = v.p0.y + v.vy;
v.p0 = v.p1;
v.len = Math.sqrt((v.vx * v.vx) + (v.vy * v.vy));
v.dx = v.vx / v.len;
v.dy = v.vy / v.len;
v.rx = -v.vy;
v.ry = v.vx;
v.lx = v.vy;
v.ly = -v.vx;
};
testWallHit = function (obj) {
var _local1 = false;
if (obj.x > sW) {
_local1 = true;
} else if (obj.x < 0) {
_local1 = true;
} else if (obj.y > sH) {
_local1 = true;
} else if (obj.y < 0) {
_local1 = true;
}
if (hittestWalls.hitTest(obj.x, obj.y + hudHoogte, true)) {
_local1 = true;
}
return(_local1);
};
checkBoundaries = function () {
if ((hero.p1.x + hero.r) > sW) {
hero.p1.x = sW - hero.r;
} else if ((hero.p1.x - hero.r) < 0) {
hero.p1.x = 0 + hero.r;
}
if ((hero.p1.y + hero.r) > sH) {
hero.p1.y = sH - hero.r;
} else if ((hero.p1.y - hero.r) < 0) {
hero.p1.y = 0 + hero.r;
}
};
lineOfSight = function (mc, x1, y1, x2, y2, sr) {
var _local9 = x1 - x2;
var _local8 = y1 - y2;
var _local7 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local3 = _local7 / sr;
var _local10 = _local7 / _local3;
var _local4 = (_local9 / _local7) * _local10;
var _local5 = (_local8 / _local7) * _local10;
while (_local3-- , _local3 > -1) {
if (mc.hitTest(x1, y1, true)) {
return(false);
}
x1 = x1 - _local4;
y1 = y1 - _local5;
}
return(true);
};
handleCollisions = function () {
var _local14 = 0.75;
var _local9 = game.ballen.length - 1;
while (_local9 >= 1) {
var _local2 = game.ballen[_local9];
var _local13 = _local2.p0.x;
var _local12 = _local2.p0.y;
var _local6 = _local9 - 1;
while (_local6 >= 0) {
var _local1 = game.ballen[_local6];
var _local5 = _local1.p0.x - _local13;
var _local4 = _local1.p0.y - _local12;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local3 < (_local2.r + _local1.r)) {
var _local10 = ball2ball(_local1, _local2);
var _local11 = (_local1.r + _local2.r) - _local10.len;
if (_local11 >= 0) {
}
var _local7 = Math.sqrt((_local2.vx * _local2.vx) + (_local2.vy * _local2.vy));
var _local8 = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
_local1.vx = (_local7 * _local5) / _local3;
_local1.vy = (_local7 * _local4) / _local3;
_local2.vx = -((_local8 * _local5) / _local3);
_local2.vy = -((_local8 * _local4) / _local3);
_local1.mc.rotplus = 10 - (Math.random() * 20);
_local2.mc.rotplus = 10 - (Math.random() * 20);
}
_local6--;
}
_local9--;
}
};
botsObjecten = function (obj1, obj2) {
var _local11 = obj1.p0.x;
var _local10 = obj1.p0.y;
var _local6 = obj2.p0.x - _local11;
var _local5 = obj2.p0.y - _local10;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (game.demo == true) {
if (Math.round(obj1.vx) == 0) {
obj1.vx = -2;
}
if (Math.round(obj1.vy) == 0) {
obj1.vy = 2;
}
if (Math.round(obj2.vx) == 0) {
obj2.vx = -1;
}
if (Math.round(obj2.vy) == 0) {
obj2.vy = 1;
}
} else {
if (Math.round(obj1.vx) == 0) {
obj1.vx = 3 - (Math.random() * 6);
}
if (Math.round(obj1.vy) == 0) {
obj1.vy = 3 - (Math.random() * 6);
}
if (Math.round(obj2.vx) == 0) {
obj2.vx = 3 - (Math.random() * 6);
}
if (Math.round(obj2.vy) == 0) {
obj2.vy = 3 - (Math.random() * 6);
}
}
var _local3 = Math.sqrt((obj1.vx * obj1.vx) + (obj1.vy * obj1.vy));
var _local4 = Math.sqrt((obj2.vx * obj2.vx) + (obj2.vy * obj2.vy));
if (game.demo == true) {
if (_local3 == 0) {
_local3 = 1;
}
if (_local4 == 0) {
_local4 = -1;
}
} else {
if (_local3 == 0) {
_local3 = 2 - (Math.random() * 4);
}
if (_local4 == 0) {
_local4 = 2 - (Math.random() * 4);
}
}
var _local9 = (obj1.r / obj2.r) / 1.4;
var _local8 = (obj2.r / obj1.r) / 1.4;
obj2.vx = ((_local3 * _local6) / _local7) * _local9;
obj2.vy = ((_local3 * _local5) / _local7) * _local9;
obj1.vx = (-((_local4 * _local6) / _local7)) * _local8;
obj1.vy = (-((_local4 * _local5) / _local7)) * _local8;
if (obj2.type == "rots") {
}
};
doChute = function (obj) {
obj.y = obj.y + obj.vy;
obj.vy = obj.vy * 0.95;
if (obj.vy < obj.speed) {
obj.vy = obj.speed;
}
obj.mc._x = obj.x;
obj.mc._y = obj.y;
};
makeBlobs = function () {
game.blobs = new Array();
var _local9 = 50;
var _local3 = 0;
while (_local3 < game.aantBlobs) {
var _local4 = main.blobContainer.attachMovie("mcBlob", "mcBlob" + _local3, _local3);
_local4.statisch = false;
if ((savedProgress.level == 6) && (_local3 == 1)) {
_local4.attachMovie("mcKroon", "mcKroon", 0);
}
var _local2 = {mc:_local4, speed:0, tel:0, maxSpeed:4, r:12, type:"hero", valSnelheid:0, landed:false, stuiter:false, chuteUit:false, chuteAfst:45, blobNr:_local3};
if (_local3 != 0) {
_local2.ai = true;
}
_local2.g = 5.5;
_local2.g = 2;
_local2.k = 0.13;
_local2.damp = 0.86;
if (_local3 == 0) {
var _local8 = 1;
} else if (_local3 == 1) {
var _local8 = 2;
} else if (_local3 == 2) {
var _local8 = 0;
} else if (_local3 == 3) {
var _local8 = 3;
}
if (_local8 == 0) {
_local2.mc.pos = "left";
} else if (_local8 == 3) {
_local2.mc.pos = "right";
} else {
_local2.mc.pos = "center";
}
if (savedProgress.level == 6) {
if (_local3 == 1) {
_local2.pos = "right";
} else if (_local3 == 0) {
_local2.pos = "left";
}
} else if (game.exam == true) {
_local2.pos = "center";
}
var _local6 = (game.sW - (_local9 * 2)) / (game.aantBlobs - 1);
if (game.aantBlobs == 2) {
_local9 = (game.sW / 2) - 150;
_local6 = 100;
} else if (game.exam == true) {
_local9 = game.sW / 2;
_local6 = 0;
}
var _local10 = _local9 + (_local8 * _local6);
_local2.p0 = {x:_local10, y:80};
_local2.p1 = {x:_local10, y:80};
_local2.vx = 0;
_local2.vy = 0;
_local2.memY = _local2.p0.y;
game.blobs[_local3] = _local2;
if (_local3 == 0) {
}
var _local11 = new Color(_local4.skinColor);
var _local5 = game.league.blobs[_local3].color;
if (_local3 != 0) {
if (_local5 == _global.savedGame.heroColor) {
_local5 = 16776960 /* 0xFFFF00 */;
game.league.blobs[_local3].color = 16776960 /* 0xFFFF00 */;
}
}
_local11.setRGB(_local5);
var _local7 = actionContainer.attachMovie("mcPlatform", "mcPlatform" + _local3, _local3);
_local7._x = _local2.p0.x;
_local7._y = _local2.p0.y + 15.3;
_local2.platformMc = _local7;
_local3++;
}
hero = game.blobs[0];
};
getRemFrames = function (a, b, g) {
var _local2 = Math.log(a / b);
var _local1 = Math.log(g);
return(_local2 / _local1);
};
heroENT = function () {
var _local1 = hero;
};
blobENT = function (obj) {
if ((obj.p0.y + obj.r) > game.landHoogte) {
obj.stuiter = true;
obj.p0.y = game.landHoogte - obj.r;
obj.p1.y = game.landHoogte - obj.r;
obj.vy = obj.vy * -0.95;
if (obj.landed != true) {
if (obj.chuteUit == true) {
obj.chuteUit = false;
obj.chute.mc.gotoAndPlay("ontvouwd");
if (obj == hero) {
speelSimpelSFX("hit_ground", "luid");
} else {
speelSimpelSFX("hit_ground");
}
obj.mc.aktie = "geland";
if (obj == hero) {
if (obj.valSnelheid > hero.chute.speed) {
if (obj.valSnelheid >= game.league.blobs[obj.blobNr].maxVal) {
game.health = game.health - 100;
} else {
var _local5 = (obj.valSnelheid * obj.valSnelheid) / 3;
}
if (game.hard == false) {
var _local5 = _local5 * 0.7;
}
game.health = game.health - Math.round(_local5);
}
initHealthbar();
}
} else if (obj == hero) {
game.health = game.health - 100;
initHealthbar();
}
var _local3 = telBlobsLanded();
obj.landPos = _local3 + 1;
obj.landed = true;
var _local4 = actionContainer.attachMovie("mcPositions", "mcPositions" + _local3, actionContainer.getNextHighestDepth());
_local4._x = obj.p0.x;
_local4._y = obj.p0.y - 14;
_local4.gotoAndStop(_local3 + 1);
if ((game.exam == true) && (game.examPassed == false)) {
var _local6 = game.tel - game.startTimer;
if ((_local6 <= game.timeToBeat) && (game.health > 0)) {
game.examPassed = true;
_global.savedGame.examPassed = true;
} else {
_global.savedGame.examPassed = false;
game.aantJumps = 0;
}
}
if (obj == hero) {
if (game.health <= 0) {
hero.stuiter = true;
createExplosion(hero.p1.x, hero.p1.y);
if (game.exam == true) {
game.aantJumps = 0;
game.health = 100;
}
hero.mc.removeMovieClip();
}
}
}
}
var _local7 = obj.p0.y - obj.memY;
obj.valSnelheid = _local7;
obj.memY = obj.p0.y;
obj.landAfst = game.landHoogte - obj.p0.y;
};
blobBengel = function (obj) {
var _local4 = obj.p0.x - obj.chute.x;
var _local3 = obj.p0.y - obj.chute.y;
var _local2 = Math.atan2(_local3, _local4);
var _local7 = Math.round((_local2 * 180) / Math.PI);
obj.mc._rotation = (_local7 / 2) - 45;
var _local6 = obj.chute.x + (Math.cos(_local2) * obj.chuteAfst);
var _local5 = obj.chute.y + (Math.sin(_local2) * obj.chuteAfst);
obj.vx = obj.vx + ((_local6 - obj.p0.x) * obj.k);
if ((obj.p0.y - obj.chute.y) > obj.chuteAfst) {
obj.vy = obj.vy + ((_local5 - obj.p0.y) * obj.k);
}
obj.vx = obj.vx * obj.damp;
obj.vy = obj.vy * obj.damp;
};
updatePlayerInfo = function () {
hud.mcPaneel.player_info.gold = game.gold;
stopTickGold();
};
addToGold = function () {
var _local1 = hud.mcPaneel.player_info.gold;
if (_local1 < game.gold) {
var _local2 = _local1 + 2;
if (_local2 > game.gold) {
_local2 = game.gold;
}
hud.mcPaneel.player_info.gold = _local2;
}
if ((game.tickPlaying != true) && (_local1 < game.gold)) {
startTickGold();
}
if (_local1 >= game.gold) {
stopTickGold();
}
};
saveProgress = function (optie) {
savedProgress.gold = game.gold;
savedProgress.numTries = game.numTries;
savedProgress.totalPoints = game.totalPoints;
savedProgress.wins = game.wins;
if (optie != "nohealth") {
savedProgress.health = game.health;
}
trace("SAVEPROGRESS");
trace("______________");
trace((((((savedProgress.gold + " gold ") + savedProgress.numTries) + " tries ") + savedProgress.totalPoints) + " health ") + savedProgress.health);
trace(" ");
};
deleteProgress = function () {
_global.savedGame.progressObj = null;
};
doScroll = function () {
if (game.lastScrollCalled != true) {
if (game.volgBlob.chuteUit == true) {
var _local1 = game.volgBlob.chute.y;
} else {
var _local1 = game.volgBlob.p0.y;
}
if (_local1 > game.heroScrollPos) {
if (game.heroScrollPos > game.endHeroScrollPos) {
if ((game.volgBlob == hero) && (game.falseStart == hero)) {
} else {
game.heroScrollPos = game.heroScrollPos - 2;
}
}
main._y = -(_local1 - game.heroScrollPos);
if (main._y < (-(game.levelHoogte - game.sH))) {
if (game.heroReleased == true) {
game.lastScrollCalled = true;
}
main._y = -(game.levelHoogte - game.sH);
}
}
var _local2 = (-main._y) + game.sH;
game.bg._y = (_local2 + game.levelHoogte) / 2;
}
};
draw = function () {
var _local3 = main.stringContainer;
_local3.clear();
_local3.lineStyle(1, "0xFFFFFF");
var _local2 = 0;
while (_local2 < game.blobs.length) {
var _local1 = game.blobs[_local2];
_local1.mc._x = _local1.p0.x;
_local1.mc._y = _local1.p0.y;
if (_local1.chuteUit == true) {
_local3.moveTo(_local1.p0.x, _local1.p0.y);
_local3.lineTo(_local1.chute.x + _local1.chute.mc.ballon1._x, _local1.chute.y + _local1.chute.mc.ballon1._y);
_local3.moveTo(_local1.p0.x, _local1.p0.y);
_local3.lineTo(_local1.chute.x + _local1.chute.mc.ballon2._x, _local1.chute.y + _local1.chute.mc.ballon2._y);
}
_local2++;
}
};
attachPaneel = function () {
var _local2 = hud.attachMovie("mcPaneel", "mcPaneel", 0);
_local2._x = 300;
if (game.exam == true) {
_local2.gotoAndStop(2);
_local2.next.onRelease = function () {
game.afterLeagueMessageDone = false;
setFade(60);
game.userReady = true;
hud.mcBeforeLeagueMessage.removeMovieClip();
if (game.examFailed == true) {
hud.mcPaneel.examText.gotoAndStop(5);
} else {
hud.mcPaneel.examText.gotoAndStop("goodluck");
}
hud.mcPaneel.examText.profi.baard.gotoAndStop(1);
hud.mcPaneel.examText.mask.gotoAndPlay(1);
sfx_exam.stop();
};
}
_local2.exit.onRelease = function () {
gotoMainMenu();
};
if (_global.savedGame.leagueProfi != true) {
_local2.profi._visible = false;
} else {
_global.savedGame.leagueProfi = true;
}
};
sortBlobsByPoints = function () {
var _local3 = [game.keepBlobStats.blob0, game.keepBlobStats.blob1, game.keepBlobStats.blob2, game.keepBlobStats.blob3];
var _local4 = null;
var _local6 = [];
var _local5 = 0;
while (_local5 < game.aantBlobs) {
var _local2 = -1;
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local3[_local1] != "geweest") {
if (game.keepBlobStats["blob" + _local1].points > _local2) {
_local2 = game.keepBlobStats["blob" + _local1].points;
_local4 = _local1;
}
}
_local1++;
}
_local6.push(_local4);
_local3[_local4] = "geweest";
_local5++;
}
return(_local6);
};
doExplosions = function () {
var _local2 = 0;
while (_local2 < game.explosionObjects.length) {
var _local1 = game.explosionObjects[_local2];
if (_local1.inactive == true) {
_local1.mc.removeMovieClip();
game.explosionObjects.splice(_local2, 1);
} else {
_local1.vy = _local1.vy + (2 * _local1.mass);
_local1.vx = _local1.vx * 0.95;
_local1.x = _local1.x + _local1.vx;
_local1.y = _local1.y + _local1.vy;
_local1.mc._x = _local1.x;
_local1.mc._y = _local1.y;
trace(_local1.y);
if (_local1.rotplus) {
_local1.mc._rotation = _local1.mc._rotation + _local1.rotplus;
}
if (_local1.y > (((-main._y) + game.sH) - 30)) {
_local1.inactive = true;
} else if (_local1.mc.remove == true) {
_local1.inactive = true;
}
}
_local2++;
}
};
createExplosion = function (x, y) {
speelSimpelSFX("blob_exp");
var _local21 = game.lastExplosionTime;
game.lastExplosionTime = getTimer();
if ((game.lastExplosionTime - _local21) > 200) {
speelSimpelSFX("explosion");
shake = 10;
var _local12 = x;
var _local11 = y;
var _local15 = 0;
var _local13 = 0;
var _local22 = 20;
var _local10 = actionContainer.getNextHighestDepth();
var _local20 = actionContainer.attachMovie("mcExpCloud", "cloud" + _local10, _local10);
var _local6 = {x:_local12, y:_local11 - 10, vx:0, vy:-3, mc:_local20, mass:0.01};
game.explosionObjects.push(_local6);
var _local2 = 0;
while (_local2 < 3) {
var _local3 = (_local10 + 2) + _local2;
var _local9 = random(2) + 1;
var _local4 = actionContainer.attachMovie("mcExpFire" + _local9, "fire" + _local3, _local3);
_local4._rotation = random(360);
var _local8 = 5 - random(11);
var _local7 = (Math.random() * -5) - 3;
_local6 = {x:_local12, y:_local11, vx:_local8, vy:_local7, mc:_local4, mass:0.2};
game.explosionObjects.push(_local6);
_local2++;
}
var _local19 = 4;
_local2 = 0;
while (_local2 < _local19) {
var _local3 = (_local10 + 5) + _local2;
var _local1 = actionContainer.attachMovie("mcExpSmoke", "smoke" + _local3, _local3);
_local1._rotation = random(360);
var _local8 = 5 - random(11);
var _local7 = (Math.random() * -5) - 4;
var _local5 = 40 + random(40);
_local1._xscale = (_local1._yscale = _local5);
_local6 = {x:_local12, y:_local11, vx:_local8, vy:_local7, mc:_local1, mass:0.04};
game.explosionObjects.push(_local6);
_local2++;
}
}
};
initMenuLicensed = function (step) {
if (step == 1) {
root = this;
var m = root.attachMovie("mcControlCenter", "mcControlCenter", 0);
var m = root.attachMovie("mcControlCenter", "mcControlCenter", 0);
initMuteButton(m.muteBtn);
var _local7 = root.attachMovie("mcMask", "mcMask", 1);
m.setMask(_local7);
if (_global.savedGame.progressObj == null) {
m.menuBtns.gotoAndStop(1);
m.menuBtns.new_game.onRelease = function () {
initMenuLicensed(3);
};
} else {
m.menuBtns.gotoAndStop(2);
m.menuBtns.new_game.onRelease = function () {
initMenuLicensed(3);
};
m.menuBtns.continue_game.onRelease = function () {
root.gotoAndStop("start");
};
}
m.credits.onRelease = function () {
var _local2 = m.attachMovie("mcCredits", "mcCredits", 0);
_local2._x = 242;
_local2._y = 150;
m.menuBtns._visible = false;
_local2.ok.onRelease = function () {
this._parent._parent.menuBtns._visible = true;
this._parent.removeMovieClip();
};
};
} else if (step == 2) {
root.mcControlCenter.gotoAndStop(2);
root.mcControlCenter.new_game.onRelease = function () {
initMenuLicensed(3);
};
if (_global.savedGame.progressObj == null) {
root.mcControlCenter.continue_game.gotoAndStop(3);
} else {
root.mcControlCenter.continue_game.onRelease = function () {
root.gotoAndStop("start");
};
}
root.mcControlCenter.back.onRelease = function () {
this._parent.gotoAndStop(1);
initMenuLicensed(1);
};
} else if (step == 3) {
trace("STEP 3");
root.mcControlCenter.gotoAndStop(3);
var mc = root.mcControlCenter.createPlayer;
aHeroColors = getHeroColorArray();
var _local8 = mc.hero;
var _local3 = 0;
if (_global.savedGame.heroColorFrame != null) {
_local3 = _global.savedGame.heroColorFrame;
}
var _local6 = new Color(_local8.skinColor);
_local6.setRGB(aHeroColors[_local3]);
_global.savedGame.heroColor = aHeroColors[_local3];
mc.hero.arrayNr = _local3;
mc.hero.onRelease = function () {
this.arrayNr++;
var _local3 = new Color(this.skinColor);
_local3.setRGB(aHeroColors[this.arrayNr]);
_global.savedGame.heroColor = aHeroColors[this.arrayNr];
_global.savedGame.heroColorFrame = this.arrayNr;
if (this.arrayNr >= aHeroColors.length) {
this.arrayNr = 0;
}
};
if (_global.savedGame.heroName != null) {
mc.heroName.text = _global.savedGame.heroName;
}
mc.ok.onRelease = function () {
_global.savedGame.progressObj = {level:1, gold:0, health:100, numTries:0, totalPoints:0, wins:0};
_global.savedGame.difficulty = 0;
_global.savedGame.heroName = mc.heroName.text;
if (_global.savedGame.examPassed == false) {
_global.savedGame.leagueProfi = true;
} else {
_global.savedGame.leagueProfi = false;
}
if (_global.savedGame.examPassed == false) {
_global.savedGame.difficulty = 0;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
} else {
initMenuLicensed(4);
}
};
trace("set back" + root.mcControlCenter.back);
root.mcControlCenter.back.onRelease = function () {
this._parent.gotoAndStop(1);
initMenuLicensed(1);
};
} else if (step == 4) {
root.mcControlCenter.gotoAndStop(4);
var mc = root.mcControlCenter.selectDifficulty;
mc.yes.onRelease = function () {
_global.savedGame.difficulty = 1;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
};
mc.no.onRelease = function () {
_global.savedGame.difficulty = 0;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
};
mc.back.onRelease = function () {
this._parent.gotoAndStop(2);
initMenuLicensed(2);
};
mc.back.onRelease = function () {
this._parent.gotoAndStop(2);
initMenuLicensed(2);
};
}
};
initMenu = function (step) {
if (step == 1) {
root = this;
var m = root.attachMovie("mcControlCenter", "mcControlCenter", 0);
initMuteButton(m.muteBtn);
var _local7 = root.attachMovie("mcMask", "mcMask", 1);
m.setMask(_local7);
m.new_game.onRelease = function () {
initMenu(2);
};
m.addgames.onRelease = function () {
getURL ("http://www.bubblebox.com/freecontent.htm", "_blank");
};
m.credits.onRelease = function () {
var _local2 = m.attachMovie("mcCredits", "mcCredits", 0);
_local2._x = 242;
_local2._y = 150;
m.new_game._visible = false;
m.highscores._visible = false;
_local2.ok.onRelease = function () {
this._parent._parent.new_game._visible = true;
this._parent._parent.highscores._visible = true;
this._parent.removeMovieClip();
};
};
m.play_more_games.onRelease = function () {
getURL ("http://www.bubblebox.com", "_blank");
};
m.highscores.onRelease = function () {
initMenu(5);
};
} else if (step == 2) {
root.mcControlCenter.gotoAndStop(2);
root.mcControlCenter.new_game.onRelease = function () {
initMenu(3);
};
if (_global.savedGame.progressObj == null) {
root.mcControlCenter.continue_game.gotoAndStop(3);
} else {
root.mcControlCenter.continue_game.onRelease = function () {
root.gotoAndStop("start");
};
}
root.mcControlCenter.back.onRelease = function () {
this._parent.gotoAndStop(1);
initMenu(1);
};
} else if (step == 3) {
root.mcControlCenter.gotoAndStop(3);
var mc = root.mcControlCenter.createPlayer;
aHeroColors = getHeroColorArray();
var _local8 = mc.hero;
var _local3 = 0;
if (_global.savedGame.heroColorFrame != null) {
_local3 = _global.savedGame.heroColorFrame;
}
var _local6 = new Color(_local8.skinColor);
_local6.setRGB(aHeroColors[_local3]);
_global.savedGame.heroColor = aHeroColors[_local3];
mc.hero.arrayNr = _local3;
mc.hero.onRelease = function () {
this.arrayNr++;
var _local3 = new Color(this.skinColor);
_local3.setRGB(aHeroColors[this.arrayNr]);
_global.savedGame.heroColor = aHeroColors[this.arrayNr];
_global.savedGame.heroColorFrame = this.arrayNr;
if (this.arrayNr >= aHeroColors.length) {
this.arrayNr = 0;
}
};
if (_global.savedGame.heroName != null) {
mc.heroName.text = _global.savedGame.heroName;
}
mc.ok.onRelease = function () {
_global.savedGame.progressObj = {level:1, gold:0, health:100, numTries:0, totalPoints:0, wins:0};
_global.savedGame.difficulty = 0;
_global.savedGame.heroName = mc.heroName.text;
if (_global.savedGame.examPassed == false) {
_global.savedGame.leagueProfi = true;
} else {
_global.savedGame.leagueProfi = false;
}
if (_global.savedGame.examPassed == false) {
_global.savedGame.difficulty = 0;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
} else {
initMenu(4);
}
};
mc.back.onRelease = function () {
this._parent.gotoAndStop(2);
initMenu(2);
};
} else if (step == 4) {
root.mcControlCenter.gotoAndStop(4);
var mc = root.mcControlCenter.selectDifficulty;
mc.yes.onRelease = function () {
_global.savedGame.difficulty = 1;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
};
mc.no.onRelease = function () {
_global.savedGame.difficulty = 0;
root.mcControlCenter.removeMovieClip();
root.mcMask.removeMovieClip();
root.gotoAndStop("start");
};
mc.back.onRelease = function () {
this._parent.gotoAndStop(2);
initMenu(2);
};
mc.back.onRelease = function () {
this._parent.gotoAndStop(2);
initMenu(2);
};
} else if (step == 5) {
root.mcControlCenter.gotoAndStop(5);
root.mcControlCenter.back.onRelease = function () {
this._parent.gotoAndStop(1);
initMenu(1);
};
}
};
gotoMainMenu = function () {
var _local2 = 100000 /* 0x0186A0 */;
while (_local2--) {
clearInterval(_local2);
}
_global.inGame = false;
stopTickGold();
main.removeMovieClip();
root.gotoAndPlay("begin");
};
gotoSavescores = function () {
var _local3 = 100000 /* 0x0186A0 */;
while (_local3--) {
clearInterval(_local3);
}
_global.inGame = false;
stopTickGold();
main.removeMovieClip();
hud.removeMovieClip();
root.gotoAndStop("savescore");
root.ok.onRelease = function () {
this._parent.gotoAndPlay("begin");
};
};
clearAll = function () {
var _local2 = 100000 /* 0x0186A0 */;
while (_local2--) {
clearInterval(_local2);
}
_global.inGame = false;
stopTickGold();
main.removeMovieClip();
};
_global.doElas = function (mc, doel, inertia, k) {
mc.move = true;
var _local2 = doel;
_local2 = (-mc._xscale) + doel;
mc.elas = (mc.elas * inertia) + (_local2 * k);
mc._xscale = mc._xscale + mc.elas;
mc._yscale = mc._yscale + mc.elas;
};
testEindeKingSpel = function () {
if (savedProgress.level == 6) {
if ((game.keepBlobStats.blob0.points > 1) || (game.keepBlobStats.blob1.points > 1)) {
return(true);
}
return(false);
}
return(false);
};
checkKingBeaten = function () {
var _local2 = testEindeKingSpel();
if ((game.aantJumps == 3) || (_local2 == true)) {
var _local1 = sortBlobsByPoints();
if (_local1[0] == 0) {
return(true);
}
return(false);
}
return(false);
};
startSequence = function () {
if (game.userReady != false) {
var _local3 = -main._y;
var _local5 = (_local3 / 10) + 1;
if (_local3 > 0) {
if (_local5 < 30) {
_local3 = _local3 - _local5;
} else {
_local3 = _local3 - 30;
}
}
if (_local3 <= 0) {
_local3 = 0;
game.startSequence = false;
}
main._y = -_local3;
var _local8 = (-main._y) + game.sH;
game.bg._y = (_local8 + game.levelHoogte) / 2;
} else if (game.aantJumps == 0) {
main._y = -(game.levelHoogte - game.sH);
var _local8 = (-main._y) + game.sH;
game.bg._y = (_local8 + game.levelHoogte) / 2;
if (game.healthTakenCareOf == false) {
if (!hud.mcHealthcare) {
if ((game.health < 100) && (game.gold >= 50)) {
var _local4 = hud.attachMovie("mcHealthcare", "mcHealthcare", hud.getNextHighestDepth());
game.healthCare = true;
_local4.tel = 0;
_local4._x = game.sW / 2;
_local4._y = game.attachHoogte;
_local4.league_text.gotoAndStop(savedProgress.level);
_local4.press_any_key._alpha = 0;
_local4._alpha = 0;
_local4.medikit.onRelease = function () {
if (game.gold >= 50) {
if (game.health < 100) {
game.health = game.health + 10;
if (game.health > 100) {
game.health = 100;
}
game.gold = game.gold - 50;
initHealthbar();
updatePlayerInfo();
}
}
if ((game.gold < 50) || (game.health >= 100)) {
this.gotoAndStop(3);
}
};
} else {
game.healthTakenCareOf = true;
}
}
var _local6 = hud.mcHealthcare;
if (_local6._alpha < 100) {
_local6._alpha = _local6._alpha + 10;
}
if (hud.mcHealthcare.tel >= 50) {
if (hud.mcHealthcare.press_any_key._alpha < 100) {
hud.mcHealthcare.press_any_key._alpha = hud.mcHealthcare.press_any_key._alpha + 10;
}
if (Key.isDown(Key.getCode())) {
hud.mcHealthcare.removeMovieClip();
game.healthTakenCareOf = true;
}
} else {
hud.mcHealthcare.tel++;
}
} else if (game.scoreTakenCareOf == false) {
if ((game.numTries == null) || (game.numTries == 0)) {
game.scoreTakenCareOf = true;
} else {
if (!hud.mcScoreMessage) {
var _local4 = hud.attachMovie("mcScoreMessage", "mcScoreMessage", hud.getNextHighestDepth());
_local4.tel = 0;
_local4._x = game.sW / 2;
_local4._y = game.attachHoogte;
_local4.press_any_key._alpha = 0;
_local4._alpha = 0;
var _local9 = getScore();
_local4.score = "Total score: " + _local9;
}
var _local2 = hud.mcScoreMessage;
if (_local2._alpha < 100) {
_local2._alpha = _local2._alpha + 10;
}
if (_local2.tel >= 20) {
if (_local2.press_any_key._alpha < 100) {
_local2.press_any_key._alpha = _local2.press_any_key._alpha + 10;
}
if (Key.isDown(Key.getCode())) {
game.scoreTakenCareOf = true;
_local2.removeMovieClip();
}
} else {
_local2.tel++;
}
}
} else {
if (!hud.mcBeforeLeagueMessage) {
initPaneel();
var _local4 = hud.attachMovie("mcBeforeLeagueMessage", "mcBeforeLeagueMessage", hud.getNextHighestDepth());
_local4.tel = 0;
_local4._x = game.sW / 2;
_local4._y = game.attachHoogte;
_local4.league_text.gotoAndStop(savedProgress.level);
_local4.press_any_key._alpha = 0;
_local4._alpha = 0;
}
var _local7 = hud.mcBeforeLeagueMessage;
if (_local7._alpha < 100) {
_local7._alpha = _local7._alpha + 10;
}
if (hud.mcBeforeLeagueMessage.tel >= 20) {
if (hud.mcBeforeLeagueMessage.press_any_key._alpha < 100) {
hud.mcBeforeLeagueMessage.press_any_key._alpha = hud.mcBeforeLeagueMessage.press_any_key._alpha + 10;
}
if (Key.isDown(Key.getCode())) {
hud.mcPaneel.profi._visible = false;
hud.mcBeforeLeagueMessage.removeMovieClip();
game.userReady = true;
}
} else {
hud.mcBeforeLeagueMessage.tel++;
}
}
} else {
game.userReady = true;
}
stopTickGold();
};
examSequence = function () {
if (game.userReady != false) {
var _local1 = -main._y;
var _local3 = (_local1 / 10) + 1;
if (_local1 > 0) {
if (_local3 < 30) {
_local1 = _local1 - _local3;
} else {
_local1 = _local1 - 30;
}
}
if (_local1 <= 0) {
_local1 = 0;
game.startSequence = false;
}
main._y = -_local1;
var _local5 = (-main._y) + game.sH;
game.bg._y = (_local5 + game.levelHoogte) / 2;
} else {
main._y = -(game.levelHoogte - game.sH);
var _local5 = (-main._y) + game.sH;
game.bg._y = (_local5 + game.levelHoogte) / 2;
if (game.examTel == null) {
setFade(18);
initPaneel();
game.examTel = 0;
game.examSpeechStep = 1;
var _local2 = hud.mcPaneel.examText._currentframe;
speelSimpelSFX("exam", _local2);
c._alpha = 0;
}
var _local4 = hud.mcBeforeLeagueMessage;
if (_local4._alpha < 100) {
_local4._alpha = _local4._alpha + 10;
}
if (game.examTel >= 20) {
var _local2 = hud.mcPaneel.examText._currentframe + 1;
var _local6 = false;
if (_local2 <= 4) {
if (game.examSpeechStep == _local2) {
_local6 = true;
}
}
if (game.examSpeechStep >= 5) {
if (!hud.mcBeforeLeagueMessage) {
var c = hud.attachMovie("mcBeforeLeagueMessage", "mcBeforeLeagueMessage", hud.getNextHighestDepth());
c.tel = 0;
c._alpha = 0;
c._x = game.sW / 2;
c._y = game.attachHoogte;
c.league_text.gotoAndStop(7);
}
if (hud.mcBeforeLeagueMessage.press_any_key._alpha < 100) {
hud.mcBeforeLeagueMessage.press_any_key._alpha = hud.mcBeforeLeagueMessage.press_any_key._alpha + 10;
}
if (Key.isDown(Key.getCode())) {
_local6 = true;
}
}
if (_local6 == true) {
hud.mcBeforeLeagueMessage.removeMovieClip();
if (_local2 > 4) {
setFade(36);
game.userReady = true;
hud.mcBeforeLeagueMessage.removeMovieClip();
if (game.examFailed == true) {
hud.mcPaneel.examText.gotoAndStop(5);
} else {
hud.mcPaneel.examText.gotoAndStop("goodluck");
}
hud.mcPaneel.examText.mask.gotoAndPlay(1);
} else {
hud.mcPaneel.examText.gotoAndStop(_local2);
hud.mcPaneel.examText.mask.gotoAndPlay(1);
game.examTel = 0;
speelSimpelSFX("exam", _local2);
}
}
} else {
game.examTel++;
}
}
stopTickGold();
};
getNextStep = function () {
if (game.countDown.step < 1) {
var _local1 = 40;
} else {
var _local1 = 30 + random(60);
}
return(_local1);
};
doBlobAI = function () {
if (game.falseStart != false) {
if (game.falseStart.active != false) {
if (hero.p0.y > actionContainer.mcVaas._y) {
actionContainer.mcVaas.occupado = true;
if (hero.zinkt != true) {
speelSimpelSFX("splash");
}
hero.zinkt = true;
hero.vy = hero.vy / 1.5;
if (hero.vy < 0.3) {
game.falseStart.active = false;
speelSimpelSFX("false_start");
}
}
}
}
if (game.countDown.active == true) {
if (game.roundMessagePlayed == false) {
game.roundMessagePlayed = true;
if (game.exam == true) {
speelSimpelSFX("good_luck");
} else {
speelSimpelSFX("round", game.aantJumps + 1);
}
}
if (game.heroReleased == true) {
if (game.countDown.step < 3) {
if (!actionContainer.mcVaas) {
var _local6 = actionContainer.attachMovie("mcVaas", "mcVaas", actionContainer.getNextHighestDepth());
_local6._x = hero.p0.x;
_local6._y = hero.p1.y + 100;
}
}
game.falseStart = hero;
}
if (game.tel > game.countDown.nextStep) {
if (game.countDown.step < 3) {
speelSimpelSFX("beep1");
game.countDown.nextStep = game.tel + getNextStep();
game.countDown.step++;
hud.mcReadySetGo.removeMovieClip();
var _local5 = hud.attachMovie("mcReadySetGo", "mcReadySetGo", hud.getNextHighestDepth());
_local5._x = game.sW / 2;
_local5._y = 260;
_local5.txt.gotoAndStop(game.countDown.step);
}
}
if (game.countDown.step == 3) {
speelSimpelSFX("beep2");
if (game.exam == true) {
game.startTimer = game.tel;
}
game.countDown.active = false;
game.telReactie = game.tel;
var _local2 = 1;
while (_local2 < game.blobs.length) {
var _local1 = game.blobs[_local2];
var _local3 = Math.round((120 - game.difficulty) / 4);
var _local4 = Math.round(game.league.blobs[_local2].minWait / 10);
_local1.releaseTime = Math.round((game.tel + _local4) + random(_local3));
_local2++;
}
}
} else {
var _local2 = 1;
while (_local2 < game.blobs.length) {
var _local1 = game.blobs[_local2];
if (_local1.released != true) {
if (game.tel >= _local1.releaseTime) {
_local1.released = true;
_local1.mc.aktie = "val";
_local1.platformMc.removeMovieClip();
if (game.falseStart == hero) {
if (game.volgBlob.ai != true) {
game.volgBlob = _local1;
}
}
}
} else if ((_local1.chuteUit == false) && (_local1.stuiter == false)) {
checkChuteUit(_local1);
}
_local2++;
}
if (game.falseStart == false) {
var _local7 = game.aantBlobs;
} else {
var _local7 = game.aantBlobs - 1;
}
if (telBlobsLanded() >= _local7) {
game.blobsLanded = true;
}
}
};
loopAfterJump = function () {
if (game.jumpInitialized == false) {
game.jumpInitialized = true;
initAfterJump();
}
var _local4 = hud.mcPaneel.scorebord;
if (_local4.mask.klein != true) {
_local4.mask._xscale = _local4.mask._xscale - ((_local4.mask._xscale / 4) + 2);
if (_local4.mask._xscale <= 0) {
initPaneel("zonder_goud");
_local4.mask.klein = true;
}
} else if (_local4.mask._xscale < 100) {
_local4.mask._xscale = _local4.mask._xscale + 10;
if (_local4.mask._xscale >= 100) {
_local4.mask._xscale = 100;
}
}
var _local9 = testEindeKingSpel();
if (((game.aantJumps < 3) && (_local9 != true)) || (game.health <= 0)) {
if (!hud.mcPressAnyKey) {
var _local7 = hud.attachMovie("mcPressAnyKey", "mcPressAnyKey", hud.getNextHighestDepth());
_local7._x = game.sW / 2;
_local7._y = game.attachHoogte;
hud.mcPaneel.scorebord.mask.klein = false;
if (game.exam == true) {
if (_global.savedGame.examPassed == true) {
_local7.gotoAndStop("congratulations");
} else {
_local7.gotoAndStop("try_again");
}
} else {
_local7.gotoAndStop(1);
}
}
if ((_local4.mask.klein == true) || (game.exam == true)) {
if (Key.isDown(Key.getCode())) {
trace("WEG");
hud.mcPaneel.profi._visible = false;
hud.mcPressAnyKey.removeMovieClip();
initNextJump();
_local4.mask._xscale = 100;
if (game.exam == true) {
game.userReady = true;
hud.mcPaneel.examText.profi.baard.gotoAndStop(1);
hud.mcBeforeLeagueMessage.removeMovieClip();
if (game.examFailed == true) {
hud.mcPaneel.examText.gotoAndStop(5);
} else {
hud.mcPaneel.examText.gotoAndStop("goodluck");
}
hud.mcPaneel.examText.mask.gotoAndPlay(1);
sfx_exam.stop();
}
}
}
} else if (game.afterLeagueMessageDone == false) {
if (!hud.mcAfterLeague) {
var _local5 = sortBlobsByPoints();
var _local6 = null;
var _local2 = 0;
while (_local2 < _local5.length) {
if (_local5[_local2] == 0) {
_local6 = _local2;
}
_local2++;
}
hud.mcPaneel.scorebord.mask.klein = false;
var _local3 = hud.attachMovie("mcAfterLeague", "mcAfterLeague", hud.getNextHighestDepth());
if (savedProgress.level == 6) {
if (_local6 == 0) {
_local3.gotoAndStop(2);
} else {
_local3.gotoAndStop(3);
}
} else {
_local3.league_text.gotoAndStop(savedProgress.level);
if (_local6 == 0) {
_local3.finished_congrats.gotoAndStop(2);
} else {
_local3.finished_congrats.gotoAndStop(1);
}
_local3.league_pos.gotoAndStop(_local6 + 1);
if (_local6 == 0) {
_local3.promotion.gotoAndStop(1);
speelSimpelSFX("promoted");
} else if (_local6 == 3) {
_local3.promotion.gotoAndStop(2);
if (savedProgress.level != 1) {
speelSimpelSFX("relegated");
}
} else {
_local3.promotion._visible = false;
}
if ((savedProgress.level == 1) && (_local6 == 3)) {
_local3.promotion._visible = false;
}
}
_local3.tel = 0;
_local3._x = game.sW / 2;
_local3._y = game.attachHoogte;
_local3.press_any_key._alpha = 0;
_local3._alpha = 0;
}
var _local8 = hud.mcAfterLeague;
if (_local8._alpha < 100) {
_local8._alpha = _local8._alpha + 10;
}
if (hud.mcAfterLeague.tel >= 50) {
if (_local8.press_any_key._alpha < 100) {
_local8.press_any_key._alpha = _local8.press_any_key._alpha + 10;
}
if (Key.isDown(Key.getCode())) {
hud.mcAfterLeague.removeMovieClip();
game.afterLeagueMessageDone = true;
hud.mcPressAnyKey.removeMovieClip();
initNextJump();
_local4.mask._xscale = 100;
}
} else {
hud.mcAfterLeague.tel++;
}
}
if (game.health > 0) {
addToGold();
}
};
endGame = function (diff) {
game.endGame = true;
};
checkChuteUit = function (blob) {
var _local5 = 0.95;
var _local9 = 2;
var _local4 = Math.round(getRemFrames(_local9, blob.valSnelheid, _local5));
if (((_local4 > 0) && (_local4 < 1000)) && (_local4 != null)) {
var _local3 = 0;
var _local2 = blob.valSnelheid;
n = 1;
while (n <= _local4) {
_local3 = _local3 + _local2;
_local2 = _local2 * _local5;
n++;
}
_local3 = _local3 + blob.chuteAfst;
if (blob.afwijking == null) {
var _local10 = 60;
var _local8 = random(_local10);
if (random(150) > (20 + game.difficulty)) {
blob.afwijking = _local8;
} else {
blob.afwijking = -_local8;
}
blob.afwijking = blob.afwijking + ((100 - game.difficulty) / 3);
}
_local3 = _local3 + blob.afwijking;
if (blob.landAfst <= _local3) {
blob.afwijking = null;
blob.chuteUit = true;
blob.chute = {x:blob.p1.x, y:blob.p1.y, vy:blob.vy, speed:2};
var _local6 = actionContainer.getNextHighestDepth();
var _local7 = (blob.chute.mc = actionContainer.attachMovie("mcChute", "mcChute" + _local6, _local6));
_local7._x = blob.chute.x;
_local7._y = blob.chute.y;
}
}
};
telBlobsLanded = function () {
var _local3 = 0;
var _local1 = 0;
while (_local1 < game.blobs.length) {
var _local2 = game.blobs[_local1];
if (_local2.landed == true) {
_local3++;
}
_local1++;
}
return(_local3);
};
initLeague = function (leagueNr) {
if (game.hard == true) {
var _local4 = 1;
var _local2 = 0;
var _local3 = 1;
} else {
trace("makkelijk");
var _local4 = 0.62;
var _local2 = 0.2;
var _local3 = 1.16;
}
switch (leagueNr) {
case 0 :
game.levelHoogte = 1000;
var _local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
game.league = {blobs:[_local7]};
game.difficulty = 20 * _local4;
game.aantBlobs = 1;
break;
case 1 :
game.levelHoogte = 1200;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
var _local6 = {name:"Jet", color:7143276, health:100, weight:100, maxVal:18.2 - _local2, minWait:50 * _local3};
var _local5 = {name:"Paco", color:16750899, health:100, weight:100, maxVal:17.6 - _local2, minWait:68 * _local3};
var _local8 = {name:"Daveth", color:8684799, health:100, weight:100, maxVal:17.9 - _local2, minWait:48 * _local3};
game.league = {blobs:[_local7, _local6, _local5, _local8]};
game.difficulty = 20 * _local4;
game.aantBlobs = 4;
break;
case 2 :
game.levelHoogte = 1400;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
_local6 = {name:"Doc", color:14867695, health:100, weight:100, maxVal:18 - _local2, minWait:44 * _local3};
_local5 = {name:"Gemeniah", color:9599307, health:100, weight:100, maxVal:17.8 - _local2, minWait:60 * _local3};
_local8 = {name:"Beorn", color:1118719, health:100, weight:100, maxVal:18.1 - _local2, minWait:48 * _local3};
game.league = {blobs:[_local7, _local6, _local5, _local8]};
game.difficulty = 40 * _local4;
game.aantBlobs = 4;
break;
case 3 :
game.levelHoogte = 1300;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
_local6 = {name:"Lipstick", color:16555770, health:100, weight:100, maxVal:18.3 - _local2, minWait:34 * _local3};
_local5 = {name:"Mo", color:7052785, health:100, weight:100, maxVal:17.8 - _local2, minWait:38 * _local3};
_local8 = {name:"Kilimanjaro", color:11814147, health:100, weight:100, maxVal:18.4 - _local2, minWait:42 * _local3};
game.league = {blobs:[_local7, _local6, _local5, _local8]};
game.difficulty = 60 * _local4;
game.aantBlobs = 4;
break;
case 4 :
game.levelHoogte = 1250;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
_local6 = {name:"Birdman", color:13421670, health:100, weight:100, maxVal:18.5 - _local2, minWait:24 * _local3};
_local5 = {name:"Evander", color:10092288, health:100, weight:100, maxVal:18.2 - _local2, minWait:17 * _local3};
_local8 = {name:"Ethiopiah", color:3239842, health:100, weight:100, maxVal:18 - _local2, minWait:28 * _local3};
game.league = {blobs:[_local7, _local6, _local5, _local8]};
game.difficulty = 80 * _local4;
game.aantBlobs = 4;
break;
case 5 :
game.levelHoogte = 1400;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
_local6 = {name:"Nano", color:3381657, health:100, weight:100, maxVal:18.2 - _local2, minWait:12 * _local3};
_local5 = {name:"Bonzo", color:4014998, health:100, weight:100, maxVal:18.5 - _local2, minWait:8 * _local3};
_local8 = {name:"Rajinder", color:16724838, health:100, weight:100, maxVal:18.1 - _local2, minWait:24 * _local3};
game.league = {blobs:[_local7, _local6, _local5, _local8]};
game.difficulty = 90 * _local4;
game.aantBlobs = 4;
break;
case 6 :
game.levelHoogte = 1320;
_local7 = {name:_global.savedGame.heroName, color:_global.savedGame.heroColor, health:100, weight:100, maxVal:18};
_local6 = {name:"The King", color:3359999, health:100, weight:100, maxVal:18.2 - _local2, minWait:2 * _local3};
game.league = {blobs:[_local7, _local6]};
game.difficulty = 100 * _local4;
game.aantBlobs = 2;
}
};
resetBlobStats = function () {
bObj0 = {points:0};
bObj1 = {points:0};
bObj2 = {points:0};
bObj3 = {points:0};
game.keepBlobStats = {blob0:bObj0, blob1:bObj1, blob2:bObj2, blob3:bObj3};
};
getHeroColorArray = function () {
var _local1 = [14170844, 14867695, 9599307, 1118719, 16555770, 11814147, 13421670, 10092288, 3239842, 3381657, 4014998, 16724838, 7143276, 16750899, 16777028, 8684799];
return(_local1);
};
initPaneel = function (optie) {
initHealthbar();
if (optie != "zonder_goud") {
updatePlayerInfo();
}
var _local2 = hud.mcPaneel.scorebord;
if (savedProgress.level == 6) {
_local2.mask._height = 86;
_local2._parent.bord.gotoAndStop(2);
} else {
_local2.mask._height = 200;
_local2._parent.bord.gotoAndStop(1);
}
hud.mcPaneel.leagueNr = savedProgress.level;
if (game.aantJumps == 0) {
var _local1 = 0;
while (_local1 < 4) {
var _local4 = _local2["blob" + (_local1 + 1)];
_local2["naam" + (_local1 + 1)].naam = game.league.blobs[_local1].name;
var _local5 = new Color(_local4.skinColor);
_local5.setRGB(game.league.blobs[_local1].color);
_local1++;
}
} else {
var _local6 = sortBlobsByPoints();
var _local1 = 0;
while (_local1 < 4) {
var _local3 = _local6[_local1];
var _local4 = _local2["blob" + (_local1 + 1)];
_local2["naam" + (_local1 + 1)].naam = game.keepBlobStats["blob" + _local3].points;
var _local5 = new Color(_local4.skinColor);
_local5.setRGB(game.league.blobs[_local3].color);
_local1++;
}
}
};
initHealthbar = function () {
var _local2 = hud.mcPaneel.player_info.healthbar;
var _local1 = game.health;
trace(_local1);
if (_local1 < 0) {
_local1 = 0;
}
_local2.groen._xscale = _local1;
};
initAfterJump = function () {
game.aantJumps++;
var _local1 = 0;
while (_local1 < game.blobs.length) {
var _local2 = game.blobs[_local1];
if (game.aantBlobs == 2) {
if (_local2.landPos == 1) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 1;
} else if (_local2.landPos == 2) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 0;
}
} else {
if (_local2.landPos == 1) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 10;
game.wins++;
} else if (_local2.landPos == 2) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 7;
}
if (_local2.landPos == 3) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 4;
}
if (_local2.landPos == 4) {
game.keepBlobStats["blob" + _local1].points = game.keepBlobStats["blob" + _local1].points + 0;
}
}
_local1++;
}
if (game.exam == true) {
if (game.examPassed == true) {
game.gold = game.gold + 100;
}
} else if (game.health > 0) {
switch (hero.landPos) {
case 1 :
game.gold = game.gold + 100;
break;
case 2 :
game.gold = game.gold + 75;
break;
case 3 :
game.gold = game.gold + 50;
break;
case 4 :
game.gold = game.gold + 25;
}
}
};
doEndGame_Highscores = function (optie) {
game.gameover = true;
deleteProgress();
var mc = hud.attachMovie("mcGameOver", "mcGameOver", hud.getNextHighestDepth());
if (optie == "kingBeaten") {
mc.gotoAndStop(2);
}
mc._x = game.sW / 2;
mc._y = 80;
var _local2 = getScore();
mc.final_score.score = "Final score: " + _local2;
mc.back_to_main.onRelease = function () {
gotoMainMenu();
};
mc.submit_score.onRelease = function () {
mc.gotoAndStop(3);
var _local1 = getScore();
gotoSavescores();
};
mc._alpha = 0;
mc.onEnterFrame = function () {
this._alpha = this._alpha + 10;
if (this._alpha >= 100) {
delete this.onEnterFrame;
}
};
};
initNextJump = function () {
if (savedProgress.level == 6) {
var _local3 = checkKingBeaten();
} else {
var _local3 = false;
}
if (game.health <= 0) {
doEndGame_Highscores();
} else if (_local3 == true) {
game.gameBeaten = true;
doEndGame_Highscores("kingBeaten");
} else {
var _local4 = testEindeKingSpel();
if ((game.aantJumps == 3) || (_local4 == true)) {
var _local2 = sortBlobsByPoints();
if (savedProgress.level == 6) {
if (_local2[0] == 0) {
savedProgress.level++;
} else if (_local2[1] == 0) {
savedProgress.level--;
}
} else if (_local2[0] == 0) {
savedProgress.level++;
} else if (_local2[3] == 0) {
if (savedProgress.level > 1) {
savedProgress.level--;
}
}
game.totalPoints = game.totalPoints + game.keepBlobStats.blob0.points;
saveProgress();
game.aantJumps = 0;
resetBlobStats();
initLeague(savedProgress.level);
game.bgTop._y = game.levelHoogte;
game.bg._y = game.levelHoogte;
game.lastScrollCalled = false;
doScroll();
game.landHoogte = game.levelHoogte - 30;
}
if (game.exam == true) {
if (_global.savedGame.examPassed == true) {
clearAll();
game.exam = false;
saveProgress("nohealth");
startgame();
} else {
game.examFailed = true;
}
}
game.userReady = false;
game.keypressed = false;
game.gameover = false;
game.countDown.step = 0;
game.countDown = {active:true, step:0, nextStep:getNextStep()};
game.falseStart = false;
game.falseStartTimer = null;
game.lastExplosionTime = getTimer();
game.endGame = false;
game.startSequence = true;
game.userReady = false;
game.heroReleased = false;
game.endGame = false;
game.blobsLanded = false;
game.healthTakenCareOf = false;
game.scoreTakenCareOf = false;
game.afterLeagueMessageDone = false;
game.jumpInitialized = false;
game.lastScrollCalled = false;
game.heroScrollPos = 200;
game.endHeroScrollPos = 100;
game.roundMessagePlayed = false;
makeBlobs();
game.volgBlob = hero;
updatePlayerInfo();
actionContainer.mcVaas.removeMovieClip();
}
};
getScore = function () {
var _local3 = savedProgress.level - 1;
if (_local3 == 0) {
trace("LEVEL 0");
var _local2 = game.gold;
_local2 = _local2 + (game.wins * 51);
if (game.hard == true) {
_local2 = _local2 * 2;
}
trace((((((game.gold + " gold ") + game.wins) + " ") + game.hard) + " ") + _local2);
return(_local2);
}
trace(((((((((game.gold + " gold ") + game.wins) + " ") + game.hard) + " ") + _local3) + " ") + game.numTries) + " ");
if ((_local3 == undefined) || (_local3 == NaN)) {
_local3 = 1;
}
if ((game.numTries == undefined) || (game.numTries == NaN)) {
game.numTries = 10;
}
if ((game.gold == undefined) || (game.gold == NaN)) {
game.gold = 0;
}
if ((game.wins == undefined) || (game.wins == NaN)) {
game.wins = 0;
}
var _local4 = (_local3 * 25000) * (_local3 / 2);
_local4 = _local4 / (game.numTries * 3);
var _local2 = _local4;
_local2 = _local2 + game.gold;
if ((game.reactieScore != null) && (game.reactieScore != undefined)) {
_local2 = _local2 + game.reactieScore;
}
_local2 = _local2 + (game.wins * 51);
if (game.gameBeaten == true) {
_local2 = _local2 + 10000;
}
if (game.hard == true) {
_local2 = _local2 * 2;
}
_local2 = _local2 * 1.5;
_local2 = Math.round(_local2);
_root.score = _local2;
return(_local2);
};
startHighscores = function (clip, score) {
setOnLoads();
var _local1 = "?rand=" + random(100);
highScoresObj = {playerScore:score, mc:clip, path:"", verwerkFile:"http://www.bubblebox.com/includes/highscores/verwerk_score.php" + _local1, get_topFile:"http://www.bubblebox.com/includes/highscores/get_top.php" + _local1, playerScore:0};
setHS_panel(1);
};
setCancelBtn = function (highscores) {
highscores.stop_op._visible = false;
highscores.tel = 0;
highscores.memFrame = highscores._currentframe;
highscores.onEnterFrame = function () {
this.tel++;
if ((this.tel > 400) || (this._currentframe != this.memFrame)) {
this.stop_op._visible = true;
this.stop_op.onRelease = function () {
setHS_panel(4);
};
delete this.onEnterFrame;
}
};
};
setHS_panel = function (stap, passObj) {
var highscores = highScoresObj.mc;
if (stap == 1) {
setCancelBtn(highscores);
determineTopPos(highScoresObj.playerScore, _global.game_id);
delete highscores.proceed.onRelease;
} else if (stap == 2) {
highscores.gotoAndStop(2);
highscores.score.text = highScoresObj.playerScore;
if (passObj.alltime == "yup") {
highScoresObj.doAlltime = 1;
} else {
highScoresObj.doAlltime = 0;
}
if (passObj.weekly == "yup") {
highScoresObj.doWeekly = 1;
} else {
highScoresObj.doWeekly = 0;
}
if (highScoresObj.doAlltime == 1) {
highscores.made_it.text = "Congratulations, you've made it into the all-time highscores!";
} else if (highScoresObj.doWeekly == 1) {
highscores.made_it.text = "Congratulations, you've made it into the weekly highscores.";
} else {
highscores.made_it.text = "You did not make it into the weekly or alltime highscores.";
highscores.submit._visible = false;
highscores.mcExit.text.gotoAndStop(2);
}
highscores.submit.onRelease = function () {
highscores.gotoAndStop(3);
setHS_panel(3);
};
highscores.mcExit.onRelease = function () {
gotoMainMenu();
};
} else if (stap == 3) {
highscores.score.text = highScoresObj.playerScore;
highscores.message.text = "Please enter your name";
highscores.name.text = _global.savedGame.heroName;
highscores.submit.onRelease = function () {
if (highscores.name.text != "") {
insertRecord(highScoresObj.playerScore, highscores.name.text, _global.game_id);
delete highscores.submit.onRelease;
var _local3 = this._parent;
_local3.gotoAndStop(1);
setCancelBtn(_local3);
}
};
} else if (stap == 4) {
highscores.gotoAndStop(5);
highscores.mcExit.text.gotoAndStop(2);
highscores.mcExit.onRelease = function () {
gotoMainMenu();
};
highscores.try_again.onRelease = function () {
setHS_panel(1);
};
} else {
highscores.gotoAndStop(4);
highscores.mcExit.text.gotoAndStop(2);
highscores.score.text = highScoresObj.playerScore;
if (passObj.weeklyScorepos != "none") {
var _local5 = ("You are ranked nr " + passObj.weeklyScorepos) + " in the weekly scores";
}
if (passObj.alltimeScorepos != "none") {
var _local5 = _local5 + ((" and nr " + passObj.alltimeScorepos) + " in the alltime scores");
}
if (passObj.success == true) {
highscores.message.text = "Your score has been added. " + _local5;
} else {
highscores.message.text = "There has been an error while submitting your score.";
}
highscores.mcExit.onRelease = function () {
gotoMainMenu();
};
}
};
initMusic = function () {
sound.createEmptyMovieClip("loop", 0);
initSFX();
if (_global.savedGame.music == true) {
playLoop();
}
};
playLoop = function () {
music_loop = new Sound(sound.loop);
music_loop.attachSound("loop");
music_loop.start(0, 0);
music_loop.onSoundComplete = function () {
this.start(0, 0);
};
music_loop.setVolume(60);
};
stopLoop = function () {
music_loop.stop();
};
attachMuteButton = function () {
var _local1 = hud.attachMovie("mcMute", "mcMute", hud.getNextHighestDepth());
_local1._x = 454;
_local1._y = 6;
initMuteButton(_local1);
};
initMuteButton = function (btn) {
if (_global.noSound == true) {
btn.gotoAndStop(2);
}
btn.onRelease = function () {
trace("doemute");
if (_global.noSound == true) {
unMuteSound();
this.gotoAndStop(1);
} else {
muteSound();
this.gotoAndStop(2);
}
};
};
muteSound = function () {
trace("mute");
stopLoop();
stopAllSounds();
_global.noSound = true;
};
unMuteSound = function () {
playLoop();
_global.noSound = false;
};
fadeLoop = function (doel) {
if (music_loop.getVolume() > doel) {
music_loop.setVolume(music_loop.getVolume() - 1);
} else if (music_loop.getVolume() < doel) {
music_loop.setVolume(music_loop.getVolume() + 1);
}
if (music_loop.getVolume() == doel) {
clearInterval(_global.fadeLoopInt);
}
};
setFade = function (doel) {
_global.fadeLoopInt = setInterval(fadeLoop, 60, doel);
};
startTickGold = function () {
if (_global.noSound != true) {
game.tickPlaying = true;
sfx_tick_gold.start(0, 0);
sfx_tick_gold.onSoundComplete = function () {
if (game.tickPlaying == true) {
this.start(0, 0);
}
};
}
};
stopTickGold = function () {
game.tickPlaying = false;
sfx_tick_gold.stop();
};
initSFX = function () {
sound.createEmptyMovieClip("omgeving", 1);
omgeving_bird = new Sound(sound.omgeving);
omgeving_bird.attachSound("bird");
power_up = new Sound(sound.omgeving);
power_up.attachSound("powerup");
sound.createEmptyMovieClip("gameaktie", 2);
sound.createEmptyMovieClip("hit_ground_zacht", 3);
sound.createEmptyMovieClip("tick_gold", 4);
sound.createEmptyMovieClip("voices", 5);
sfx_exam = new Sound(sound.voices);
sfx_round = new Sound(sound.voices);
sfx_promoted = new Sound(sound.voices);
sfx_promoted.attachSound("promoted");
sfx_relegated = new Sound(sound.voices);
sfx_relegated.attachSound("relegated");
sfx_become_king = new Sound(sound.voices);
sfx_become_king.attachSound("become_king");
sfx_blob_exp = new Sound(sound.gameaktie);
sfx_blob_exp.attachSound("blob_exp");
sfx_beep1 = new Sound(sound.gameaktie);
sfx_beep1.attachSound("beep1");
sfx_beep2 = new Sound(sound.gameaktie);
sfx_beep2.attachSound("beep2");
sfx_hit_ground = new Sound(sound.gameaktie);
sfx_hit_ground.attachSound("hit_ground");
sfx_false_start = new Sound(sound.voices);
sfx_false_start.attachSound("false_start");
sfx_good_luck = new Sound(sound.voices);
sfx_good_luck.attachSound("good_luck");
sfx_hit_ground_zacht = new Sound(sound.hit_ground_zacht);
sfx_hit_ground_zacht.attachSound("hit_ground");
sfx_hit_ground_zacht.setVolume(30);
sfx_tick_gold = new Sound(sound.tick_gold);
sfx_tick_gold.attachSound("tick_gold");
sfx_bird = new Sound(sound.omgeving);
sfx_bird.attachSound("bird");
sfx_splash = new Sound(sound.gameaktie);
sfx_splash.attachSound("splash_small");
};
randomSFX = function () {
if (_global.noSound != true) {
if (Math.random() > 0.8) {
sfx_bird.start();
}
}
};
menuSounds = function (mc, optiestop) {
if (_global.noSound != true) {
if (optiestop != true) {
mc.createEmptyMovieClip("loop", mc.getNextHighestDepth());
music = new Sound(mc.loop);
trace("musin " + music);
music.attachSound("menuloop");
music.setVolume(60);
music.start(0, 0);
music.onSoundComplete = function () {
this.start(0, 0);
};
} else {
music.stop();
}
}
};
speelSimpelSFX = function (naam, passOptie) {
if (_global.noSound != true) {
switch (naam) {
case "blob_exp" :
sfx_blob_exp.start();
break;
case "beep1" :
sfx_beep1.start();
break;
case "beep2" :
sfx_beep2.start();
break;
case "round" :
var _local2 = "round" + passOptie;
sfx_round.attachSound(_local2);
sfx_round.start();
break;
case "exam" :
_local2 = "exam" + passOptie;
sfx_exam.attachSound(_local2);
sfx_exam.start();
sfx_exam.setVolume(200);
hud.mcPaneel.examText.profi.baard.play();
sfx_exam.onSoundComplete = function () {
game.examSpeechStep++;
hud.mcPaneel.examText.profi.baard.gotoAndStop(1);
game.examTel = 0;
};
break;
case "splash" :
sfx_splash.start();
break;
case "good_luck" :
sfx_good_luck.start();
hud.mcPaneel.examText.profi.baard.play();
sfx_good_luck.onSoundComplete = function () {
hud.mcPaneel.examText.profi.baard.gotoAndStop(1);
};
break;
case "false_start" :
sfx_false_start.start();
break;
case "hit_ground" :
if (passOptie == "luid") {
sfx_hit_ground.start();
} else {
sfx_hit_ground_zacht.start();
}
break;
case "powerup" :
power_up.start();
power_up.onSoundComplete = function () {
speelSimpelSFX("powerup_voice");
};
break;
case "promoted" :
sfx_promoted.start();
break;
case "relegated" :
sfx_relegated.start();
break;
case "become_king" :
if (_global.kingPlayed == true) {
break;
}
_global.kingPlayed = true;
sfx_become_king.start();
}
}
};
sfxCounters = function () {
mini_aanval.counter--;
sfx_raathit.counter1--;
sfx_raathit.counter2--;
};
manageSoundFx = function (naam, difOptie) {
switch (naam) {
case "schild" :
schild_commander.start();
break;
case "mini_attack" :
if (mini_aanval.counter <= 0) {
mini_aanval.counter = 3;
var _local1 = random(aAanvalVoices.length - 1);
mini_aanval.attachSound(aAanvalVoices[_local1]);
mini_aanval.start();
}
break;
case "sfx_raathit" :
if (aCounters["raat" + difOptie] >= getTimer()) {
break;
}
aCounters["raat" + difOptie] = getTimer() + 2000;
sfx_raathit.start();
sfx_raathit2.start();
}
};
stopSound = function () {
_global.musicPlaying = 0;
music.stop;
delete music.onEnterFrame;
delete music;
stopAllSounds();
};
Frame 6
var \x01 = 97;
// swfAction0x03 // Unknown action
Frame 7
!!!ERROR
Frame 8
!!!ERROR
Frame 9
!!!ERROR
Instance of Symbol 400 MovieClip "comHighscores" in Frame 9
//component parameters
onClipEvent (construct) {
!!!ERROR
Symbol 7 MovieClip [mcExpFire2] Frame 66
!!!ERROR
Symbol 15 MovieClip Frame 1
!!!ERROR
Symbol 20 Button
on (release) {
!!!ERROR
Symbol 25 MovieClip Frame 2
!!!ERROR
Symbol 25 MovieClip Frame 4
!!!ERROR
Symbol 25 MovieClip Frame 12
!!!ERROR
Symbol 35 MovieClip Frame 1
!!!ERROR
Symbol 35 MovieClip Frame 100
!!!ERROR
Symbol 37 MovieClip Frame 1
!!!ERROR
Symbol 37 MovieClip Frame 12
!!!ERROR
Symbol 41 Button
on (release) {
!!!ERROR
Symbol 42 MovieClip Frame 2
!!!ERROR
Symbol 42 MovieClip Frame 13
!!!ERROR
Symbol 58 MovieClip Frame 1
!!!ERROR
Symbol 58 MovieClip Frame 60
!!!ERROR
Symbol 58 MovieClip Frame 121
!!!ERROR
Symbol 59 MovieClip Frame 1
!!!ERROR
Instance of Symbol 15 MovieClip "mcIntro" in Symbol 59 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Symbol 59 MovieClip Frame 2
!!!ERROR
Instance of Symbol 37 MovieClip "mcLoadingAnimated" in Symbol 59 MovieClip Frame 2
onClipEvent (load) {
!!!ERROR
Symbol 59 MovieClip Frame 3
!!!ERROR
Symbol 59 MovieClip Frame 5
!!!ERROR
Symbol 65 MovieClip Frame 9
!!!ERROR
Symbol 72 MovieClip [mcExpSmoke] Frame 49
!!!ERROR
Symbol 79 MovieClip [mcExpFire1] Frame 62
!!!ERROR
Symbol 85 MovieClip [mcExpCloud] Frame 33
!!!ERROR
Symbol 89 MovieClip Frame 1
!!!ERROR
Symbol 107 MovieClip Frame 1
!!!ERROR
Symbol 113 MovieClip Frame 1
!!!ERROR
Symbol 115 Button
on (release) {
!!!ERROR
Symbol 129 MovieClip Frame 1
!!!ERROR
Symbol 129 MovieClip Frame 6
!!!ERROR
Symbol 129 MovieClip Frame 9
!!!ERROR
Symbol 129 MovieClip Frame 17
!!!ERROR
Symbol 129 MovieClip Frame 18
!!!ERROR
Symbol 132 MovieClip Frame 1
!!!ERROR
Symbol 132 MovieClip Frame 9
!!!ERROR
Symbol 138 MovieClip Frame 1
!!!ERROR
Symbol 138 MovieClip Frame 20
!!!ERROR
Symbol 138 MovieClip Frame 30
!!!ERROR
Symbol 138 MovieClip Frame 45
!!!ERROR
Symbol 138 MovieClip Frame 55
!!!ERROR
Symbol 138 MovieClip Frame 70
!!!ERROR
Symbol 138 MovieClip Frame 80
!!!ERROR
Symbol 138 MovieClip Frame 95
!!!ERROR
Symbol 138 MovieClip Frame 105
!!!ERROR
Symbol 146 MovieClip Frame 1
!!!ERROR
Symbol 150 MovieClip Frame 1
!!!ERROR
Symbol 154 MovieClip Frame 5
!!!ERROR
Symbol 160 MovieClip Frame 1
!!!ERROR
Symbol 161 MovieClip Frame 1
!!!ERROR
Symbol 170 MovieClip Frame 1
!!!ERROR
Symbol 173 MovieClip Frame 1
!!!ERROR
Symbol 174 MovieClip Frame 1
!!!ERROR
Symbol 181 MovieClip Frame 25
!!!ERROR
Symbol 194 MovieClip Frame 1
!!!ERROR
Symbol 199 MovieClip Frame 1
!!!ERROR
Symbol 200 MovieClip [mcPaneel] Frame 1
!!!ERROR
Symbol 203 MovieClip [mcVaas] Frame 10
!!!ERROR
Symbol 213 MovieClip Frame 1
!!!ERROR
Symbol 213 MovieClip Frame 2
!!!ERROR
Symbol 213 MovieClip Frame 3
!!!ERROR
Symbol 218 MovieClip [mcPressAnyKey] Frame 1
!!!ERROR
Symbol 218 MovieClip [mcPressAnyKey] Frame 2
!!!ERROR
Symbol 218 MovieClip [mcPressAnyKey] Frame 3
!!!ERROR
Symbol 223 MovieClip [mcPositions] Frame 1
!!!ERROR
Symbol 229 MovieClip Frame 1
!!!ERROR
Symbol 233 MovieClip Frame 1
!!!ERROR
Symbol 234 MovieClip [mcMute] Frame 1
!!!ERROR
Symbol 234 MovieClip [mcMute] Frame 2
!!!ERROR
Symbol 238 MovieClip Frame 1
!!!ERROR
Symbol 242 MovieClip Frame 1
!!!ERROR
Symbol 253 MovieClip Frame 1
!!!ERROR
Symbol 255 MovieClip Frame 1
!!!ERROR
Symbol 259 MovieClip Frame 1
!!!ERROR
Symbol 266 MovieClip Frame 1
!!!ERROR
Symbol 276 MovieClip Frame 1
!!!ERROR
Symbol 277 MovieClip Frame 1
!!!ERROR
Symbol 277 MovieClip Frame 2
!!!ERROR
Symbol 277 MovieClip Frame 3
!!!ERROR
Symbol 277 MovieClip Frame 4
!!!ERROR
Symbol 277 MovieClip Frame 5
!!!ERROR
Symbol 278 MovieClip [mcGameOver] Frame 1
!!!ERROR
Symbol 278 MovieClip [mcGameOver] Frame 3
!!!ERROR
Symbol 287 MovieClip Frame 1
!!!ERROR
Symbol 287 MovieClip Frame 3
!!!ERROR
Symbol 320 MovieClip [mcAfterLeague] Frame 1
!!!ERROR
Symbol 332 MovieClip Frame 1
!!!ERROR
Symbol 337 MovieClip Frame 1
!!!ERROR
Symbol 341 MovieClip Frame 1
!!!ERROR
Symbol 345 MovieClip Frame 1
!!!ERROR
Symbol 351 MovieClip Frame 1
!!!ERROR
Symbol 356 MovieClip Frame 1
!!!ERROR
Symbol 356 MovieClip Frame 3
!!!ERROR
Symbol 357 MovieClip Frame 1
!!!ERROR
Symbol 367 MovieClip Frame 1
!!!ERROR
Symbol 370 MovieClip Frame 1
!!!ERROR
Symbol 382 MovieClip Frame 1
!!!ERROR
Symbol 386 MovieClip Frame 1
!!!ERROR
Symbol 389 MovieClip Frame 1
!!!ERROR
Symbol 398 Button
on (release) {
!!!ERROR
Symbol 400 MovieClip Frame 1
!!!ERROR
Instance of Symbol 389 MovieClip "mcHighscores" in Symbol 400 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Symbol 400 MovieClip Frame 2
!!!ERROR
Symbol 400 MovieClip Frame 3
!!!ERROR
Symbol 401 MovieClip [mcControlCenter] Frame 1
!!!ERROR
Symbol 401 MovieClip [mcControlCenter] Frame 2
!!!ERROR
Symbol 401 MovieClip [mcControlCenter] Frame 3
!!!ERROR
Symbol 401 MovieClip [mcControlCenter] Frame 4
!!!ERROR
Symbol 401 MovieClip [mcControlCenter] Frame 5
!!!ERROR
Instance of Symbol 400 MovieClip "comHighscores" in Symbol 401 MovieClip [mcControlCenter] Frame 5
//component parameters
onClipEvent (construct) {
!!!ERROR
Symbol 404 MovieClip Frame 1
!!!ERROR
Symbol 404 MovieClip Frame 25
!!!ERROR
Symbol 410 MovieClip [mcCCMasked] Frame 1
!!!ERROR
Symbol 412 MovieClip Frame 1
!!!ERROR
Symbol 413 MovieClip [mcChute] Frame 16
!!!ERROR
Symbol 413 MovieClip [mcChute] Frame 28
!!!ERROR
Symbol 440 MovieClip Frame 1
!!!ERROR
Symbol 444 MovieClip Frame 1
!!!ERROR
Symbol 446 MovieClip [mcCredits] Frame 1
!!!ERROR