Frame 2
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
pfixEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(pfixEnd, domain.length);
if (((domain == "bubblebox.com") || (domain == "bigdino.com")) || (domain == "coolmath-games.com")) {
this.wrongDomainText._visible = false;
this.play();
} else {
stop();
this.wrongDomainText._visible = true;
}
Frame 3
stop();
play_btn._visible = false;
this.loaderMc.ft = 0;
this.loaderMc.fakePerc = 0;
this.loaderMc.onEnterFrame = function () {
this.ft++;
if ((this.ft % 3) == 0) {
simWavePreloader(seaContainer);
simWavePreloader(seaContainer2);
}
this.fakePerc++;
if (this.fakePerc > 100) {
this.fakePerc = 100;
}
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
var _local3 = Math.round(getPercent * 100);
if (_local3 > this.fakePerc) {
_local3 = this.fakePerc;
}
if ((bytes_loaded == bytes_total) && (this.fakePerc >= 100)) {
this.go._visible = true;
this._parent.play_btn._visible = true;
this._parent.mc_load._visible = false;
this._parent.play();
}
};
Frame 4
stop();
Frame 6
function initVector(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 getIntersection(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 bounce(v1, v2) {
var _local5 = projectVector(v1, v2.dx, v2.dy);
var _local1 = projectVector(v1, v2.lx, v2.ly);
var _local4 = {};
_local1.len = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
_local1.vx = v2.lx * _local1.len;
_local1.vy = v2.ly * _local1.len;
_local4.vx = ((v1.f * v2.f) * _local5.vx) + ((v1.b * v2.b) * _local1.vx);
_local4.vy = ((v1.f * v2.f) * _local5.vy) + ((v1.b * v2.b) * _local1.vy);
return(_local4);
}
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 ball2ball(b1, b2) {
var _local1 = {};
_local1.vx = b1.p1.x - b2.p0.x;
_local1.vy = b1.p1.y - b2.p0.y;
_local1.len = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
_local1.dx = _local1.vx / _local1.len;
_local1.dy = _local1.vy / _local1.len;
return(_local1);
}
function insertRecord(hs_score, hs_name, game_id) {
var _local3 = new LoadVars();
_local3.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 {
var _local4 = ((((((((((highScoresObj.path + highScoresObj.verwerkFile) + "&score=") + hs_score) + "&game_id=") + game_id) + "&naam=") + hs_name) + "&do_alltime=") + highScoresObj.doAlltime) + "&do_weekly=") + highScoresObj.doWeekly;
trace(_local4);
_local3.load(_local4, "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 {
var _local4 = ((((highScoresObj.path + highScoresObj.get_topFile) + "&score=") + hs_score) + "&game_id=") + game_id;
_local2.load(_local4, "post");
}
}
getPosition = function (obj, raftPos) {
var _local2 = obj.raft.occupants.length;
if (obj.raft == game.raft1) {
var _local1 = -1;
} else {
var _local1 = 1;
}
if (_local2 == 1) {
return(obj.raft.cannonPoint + (100 * _local1));
}
if (_local2 == 2) {
return(obj.raft.cannonPoint + (((raftPos + 1) * 100) * _local1));
}
};
createOverig = function (xPosition, yPosition, charType) {
if (charType == "hond") {
var _local5 = main.pinguinContainer.getNextHighestDepth();
var _local1 = game.objectsOverig.length;
var _local2 = main.pinguinContainer.attachMovie("hond", "hond", _local5);
var _local10 = "stand";
var _local7 = 1;
game.objectsOverig[_local1] = {f:1, m:1, r:30, type:charType, overig:true, b:0.8, airf:0.99, arrayNr:_local1, mc:_local2, speed:1.1, penguin:false};
var _local4 = xPosition;
var _local3 = yPosition;
game.objectsOverig[_local1].p0 = {x:_local4, y:_local3};
game.objectsOverig[_local1].raftPos = {x:_local4, y:_local3};
game.objectsOverig[_local1].vx = 0;
game.objectsOverig[_local1].vy = 0;
_local2._x = _local4;
_local2._y = _local3;
}
};
findOverig = function (rockObj, xPosition, specialMc) {
if (specialMc == null) {
var _local6 = rockObj.mc;
} else {
var _local6 = specialMc;
}
if (optionAI == true) {
var _local9 = game.aantFriendly;
}
for (var _local7 in _local6) {
var _local1 = _local6[_local7];
var _local4 = _local1._name;
var _local2 = _local4.split("_");
if (_local2[0] == "hond") {
var _local5 = xPosition + _local1._x;
var _local3 = game.raftLevel + _local1._y;
createOverig(_local5, _local3 - 10, "hond");
}
}
};
createPenguins = function (rockObj, xPosition, charType, optionAI, specialMc) {
if (specialMc == null) {
var _local22 = rockObj.mc;
} else {
var _local22 = specialMc;
}
if (optionAI == true) {
var _local46 = game.aantFriendly;
} else {
var _local45 = 0;
var _local46 = 0;
}
for (var _local48 in _local22) {
var _local9 = _local22[_local48];
var _local17 = _local9._name;
var _local3 = _local17.split("_");
if (_local3[0] == "p") {
var _local20 = _local3[1] - 1;
var _local1 = _local46 + _local20;
var _local24 = main.pinguinContainer.getNextHighestDepth();
var _local4 = main.pinguinContainer.attachMovie("char_" + charType, "p" + _local1, _local1);
var _local25 = _local3[2];
if (_local3[3] == "high") {
var _local19 = true;
} else {
var _local19 = false;
}
var _local18 = false;
if (_local3[4] == "sit") {
var _local11 = "sit";
} else {
var _local11 = "stand";
}
if (_local3[5] == "front") {
var _local16 = true;
} else {
var _local16 = false;
}
if (_local16 == true) {
trace(_local4 + " WEG");
_local4.removeMovieClip();
_local4 = main.pinguinContainerVoor.attachMovie("char_" + charType, "p" + _local1, _local1);
}
_local4.penguin.frameNr = _local25;
if ((optionAI != true) && (_local25 == 2)) {
var _local31 = "simon";
} else if ((optionAI != true) && (_local3[3] == "broer")) {
var _local31 = "broer";
} else {
var _local31 = "noname";
}
game.objects[_local1] = {f:1, m:1, r:30, b:0.8, airf:0.99, arrayNr:_local1, mc:_local4.penguin, pose:_local11, raft:rockObj, speed:1.1, health:100, hitpoints:0, penguin:true, naam:_local31, aimHigh:_local19, noBB:_local18, frameNr:_local25, geraakt:false, vanPlaats:false};
var _local8 = xPosition + _local9._x;
var _local7 = game.raftLevel + _local9._y;
game.objects[_local1].p0 = {x:_local8, y:_local7 - 10};
game.objects[_local1].raftPos = {x:_local8, y:_local7 - 1};
game.objects[_local1].vx = 0;
game.objects[_local1].vy = 0;
_local4.penguin._x = _local8;
_local4.penguin._y = _local7;
_local4.penguin.gotoAndStop(_local11);
if (optionAI == true) {
_local4.penguin.weapon._visible = false;
} else {
_local4.penguin.bazooka._visible = false;
}
if (optionAI == true) {
game.objects[_local1].opponent = true;
} else {
game.objects[_local1].opponent = false;
_local45++;
}
if (optionAI == true) {
var _local15 = _local3[1];
var _local2 = main.raftsVoor.raftBeweegruimte["man" + _local15];
var _local14 = _local2._parent._x;
var _local13 = _local2._parent._y;
var _local21 = (_local14 + _local2._x) + _local2._width;
var _local10 = _local14 + _local2._x;
var _local6 = _local13 + _local2._y;
var _local12 = (_local13 + _local2._y) - _local2._height;
trace((((((((((main.raftsVoor.raftBeweegruimte + " ") + _local2) + " ") + _local10) + " ") + _local6) + " ") + _local12) + " ") + _local6);
game.objects[_local1].bXmax = _local21;
game.objects[_local1].bYmax = _local6;
game.objects[_local1].bXmin = _local10;
game.objects[_local1].bYmin = _local12;
}
}
}
if (optionAI != true) {
game.aantFriendly = _local45;
}
};
deleteGameMcs = function () {
_root.skyContainer.removeMovieClip();
_root.mainContainer.removeMovieClip();
_root.hudContainer.removeMovieClip();
_root.whiteFlash.removeMovieClip();
_root.mask.removeMovieClip();
};
start = function () {
root = this;
saveP = _global.saveProgress;
currentLevel = _global.progress.level;
levelInit();
_global.baddieID = level.opponent;
_global.progress.tries++;
playLoop("loop");
trace(saveP.grenades + " granades");
sky = this.createEmptyMovieClip("skyContainer", 1);
main = this.createEmptyMovieClip("mainContainer", 2);
hud = this.createEmptyMovieClip("hudContainer", 3);
whiteFlash = this.createEmptyMovieClip("whiteFlash", 11);
background = main.createEmptyMovieClip("achtergrond", 0);
background = main.createEmptyMovieClip("achtergrondStrand", 1);
raftsAchter = main.createEmptyMovieClip("raftsAchter", 2);
raftsVoor = main.createEmptyMovieClip("raftsVoor", 5);
main.createEmptyMovieClip("pinguinContainer", 3);
main.createEmptyMovieClip("pinguinContainerVoor", 6);
actionContainer = main.createEmptyMovieClip("actionContainer", 4);
seaContainer = main.createEmptyMovieClip("seaContainer", 7);
main.createEmptyMovieClip("haaiContainer", 8);
seaContainer2 = main.createEmptyMovieClip("seaContainer2", 9);
main.createEmptyMovieClip("cC", 10);
root.attachMovie("mask", "mask", 100);
root.setMask(root.mask);
main.createEmptyMovieClip("staticMcs", 11);
if (_global.twoPlayer == true) {
var _local9 = _global.countTurns % 2;
} else {
var _local9 = 0;
}
if (_global.detail == "low") {
raftLeft.cacheAsBitmap = true;
oppRaft.cacheAsBitmap = true;
}
game = {sW:640, sH:480, mapWidth:level.mapWidth, maxV:9, g:0.5, mc:main, cC:main.cC, raftHeight:30, raftLevel:380, turn:_local9, ballSelected:1, ammoChosen:"snowball", startSequence:true, endOfGame:false, userReady:false, shotsFired:0};
game.particleObjects = [];
game.explosionObjects = [];
game.raftMcs = [];
game.raftStartPos = 80;
game.seaLevel = game.sH - 90;
initAchtergrond();
var _local32 = sky.attachMovie("mcSky", "mcSky", 0);
var _local10 = sky.attachMovie("clouds", "clouds", 1);
_local10._x = 100;
aTerrain = [];
var _local4 = 0;
while (_local4 < level.aRafts.length) {
var _local7 = level.aRafts[_local4];
var _local8 = main.raftsVoor.getNextHighestDepth();
var _local3 = main.raftsVoor.attachMovie(_local7, "raft1", _local8);
_local3.cacheAsBitmap = true;
game.raftMcs.push(_local3);
if (level.endLevel == true) {
_local3.gotoAndStop(1);
} else {
_local3.gotoAndStop(saveP.raftUpgrade);
}
createRock(_local3, false, true);
_local4++;
}
_local4 = 0;
while (_local4 < level.aOppRafts.length) {
var _local7 = level.aOppRafts[_local4];
var _local6 = main["rafts" + level.aOppRaftsDepthInfo[_local4]];
var _local8 = _local6.getNextHighestDepth();
if (_local4 == 0) {
var _local11 = "raft2";
} else {
var _local11 = "raft2_" + (_local4 + 1);
}
var _local3 = _local6.attachMovie(_local7, _local11, _local8);
_local3.cacheAsBitmap = true;
game.raftMcs.push(_local3);
if (_local4 == 0) {
createRock(_local3, true, true);
} else {
createRock(_local3, true, false);
}
if (level.endLevel == true) {
if (saveP.raftUpgrade < 3) {
_local3.buurjochie._visible = false;
}
}
_local4++;
}
_local4 = 0;
while (_local4 < aTerrain.length) {
initVector(aTerrain[_local4], true);
_local4++;
}
trace(" achter " + main.raftsAchter);
game.raft1 = {refPoint:aTerrain[0].p0, mc:main.raftsVoor.raft1, t:0, a:3.2, T:4, w:2.0943951023932, bPos:aTerrain[0].p0.y, cannonPoint:aTerrain[0].p1.x, raftnr:1};
var _local17 = (game.raft1.mc._x = game.raftX);
game.raft1.mc._y = game.seaLevel;
game.raft1.occupants = [];
game.raft2 = {refPoint:aTerrain[1].p0, mc:main["rafts" + level.aOppRaftsDepthInfo[0]].raft2, mc2:main["rafts" + level.aOppRaftsDepthInfo[1]].raft2_2, mc3:main["rafts" + level.aOppRaftsDepthInfo[2]].raft2_3, t:0, a:3.2, T:4, w:2.0943951023932, bPos:aTerrain[0].p0.y, cannonPoint:aTerrain[1].p0.x, raftnr:2};
var _local16 = (game.raft2.mc._x = game.oppRaftX);
game.raft2.mc._y = game.seaLevel;
game.raft2.occupants = [];
var _local7 = level.raftBeweegruimte;
trace(_local7);
var _local6 = main.raftsVoor;
var _local8 = _local6.getNextHighestDepth();
var _local11 = "raftBeweegruimte";
var _local5 = _local6.attachMovie(_local7, _local11, _local8);
_local5._x = game.oppRaftX;
_local5._y = game.seaLevel;
trace((((((_local7 + " ") + _local6) + " ") + _local5) + " d ") + _local8);
game.objects = [];
game.objectsOverig = [];
createPenguins(game.raft1, game.raftX, "hero", false, null);
if (_global.twoPlayer == true) {
createPenguins(game.raft2, game.oppRaftX, "left", null);
} else {
createPenguins(game.raft2, game.oppRaftX, "baddie", true, null);
}
if (game.raft2.mc2 != undefined) {
game.raft2.mc2._x = game.oppRaftX;
game.raft2.mc2._y = game.seaLevel;
createPenguins(game.raft2, game.oppRaftX, "baddie", true, game.raft2.mc2);
}
if (game.raft2.mc3 != undefined) {
game.raft2.mc3._x = game.oppRaftX;
game.raft2.mc3._y = game.seaLevel;
createPenguins(game.raft2, game.oppRaftX, "baddie", true, game.raft2.mc3);
}
main.raftsVoor.raftBeweegruimte.removeMovieClip();
findOverig(game.raft1, game.raftX, null);
if (_global.twoPlayer == true) {
findOverig(game.raft2, game.oppRaftX, null);
} else {
findOverig(game.raft2, game.oppRaftX, null);
}
if (game.raft2.mc2 != undefined) {
findOverig(game.raft2, game.oppRaftX, game.raft2.mc2);
}
if (game.raft2.mc3 != undefined) {
findOverig(game.raft2, game.oppRaftX, game.raft2.mc3);
}
_local4 = 0;
while (_local4 < game.objects.length) {
game.objects[_local4].mc.gotoAndStop(game.objects[_local4].pose);
initObject(game.objects[_local4]);
_local4++;
}
_local4 = 0;
while (_local4 < game.objectsOverig.length) {
initObject(game.objectsOverig[_local4]);
_local4++;
}
game.cannonBalls = [];
resetArrayNrs();
game.sea = {width:game.mapWidth + 100, points:48};
seaContainer._x = -30;
seaContainer._y = game.seaLevel;
makeWave(seaContainer, game.sH, 5606534, 4, 0.1, game.sea.points, game.sea.width);
seaContainer2._x = -30;
seaContainer2._y = game.seaLevel + 30;
makeWave(seaContainer2, game.sH, 6132622, 4, 0.1, game.sea.points - 4, game.sea.width);
seaInt = setInterval(simWave, 50, seaContainer);
seaInt2 = setInterval(simWave, 50, seaContainer2);
particleInt = setInterval(moveParticleObjects, 40);
explosionInt = setInterval(doExplosions, 30);
animInt = setInterval(animatePenguins, 500);
twicePerSecInt = setInterval(twicePerSec, 500);
init();
attachHaai();
if (_global.quiet != true) {
playSea("sealoop");
}
displayHealthBars(false);
main.onEnterFrame = function () {
mainLoop();
};
if (_global.twoPlayer != true) {
attachBeginMessage();
} else {
game.userReady = true;
game.beginTimer = getTimer();
}
draw();
simWave();
};
attachHaai = function () {
var _local1 = main.haaiContainer.attachMovie("haai", "haai", 0);
_local1._x = random(game.mapWidth);
_local1._y = game.sH - 50;
_local1.mcYPos = _local1._y;
_local1.richting = 1;
if (Math.random() > 0.5) {
_local1.richting = -1;
}
if (_local1.richting == 1) {
_local1.gotoAndStop(2);
}
_local1.speed = 3;
};
createRock = function (rockMc, optionRight, optionMainRock) {
var _local11 = game.raftLevel;
var _local22 = game.raftHeight;
var _local19 = null;
var _local2 = rockMc;
var _local10 = 0;
for (var _local20 in _local2) {
var _local5 = _local2[_local20]._name;
if (_local5.split("_")[0] == "pt") {
_local10++;
} else if (_local5 == "sep") {
_local19 = _local20;
}
}
var _local21 = _local2["pt_" + _local10]._x - _local2.pt_1._x;
var _local9;
if (optionMainRock == true) {
if (optionRight == true) {
_local9 = (game.oppRaftX = (game.mapWidth - game.raftX) - _local21);
} else {
_local9 = (game.raftX = game.raftStartPos);
}
} else {
_local9 = game.oppRaftX;
}
rockMc.mcYPos = _local2.pt_1._y;
var _local1 = 1;
while (_local1 < _local10) {
var _local4 = _local9 + _local2["pt_" + _local1]._x;
var _local7 = _local11 + _local2["pt_" + _local1]._y;
var _local3 = _local9 + _local2["pt_" + (_local1 + 1)]._x;
var _local6 = _local11 + _local2["pt_" + (_local1 + 1)]._y;
var _local8 = {p0:{x:_local4, y:_local7}, p1:{x:_local3, y:_local6}, b:1, f:0.9, rockMc:_local2};
if (Math.abs(_local4 - _local3) < 160) {
aTerrain.push(_local8);
}
_local1++;
}
if (_local19 != null) {
level.sep = _local9 + _local2[_local19]._x;
}
};
scrollGame = function () {
var _local4 = game.sW;
var _local2 = cannonBallToFollow;
var _local3 = _local2.p0.x;
trace(_local3 + " \u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7 cannonX");
if (_local3 > -10000) {
scrollPlus = (_local3 - (_local4 / 2)) - scrollPos;
var _local1 = _local3 - (_local4 / 2);
if (_local1 < 0) {
_local1 = 0;
} else if (_local1 > (game.mapWidth - _local4)) {
_local1 = game.mapWidth - _local4;
}
if (_local2.sb == true) {
if ((_local1 < (_local2.fireScrollPos + 560)) && (_local2.dir == "right")) {
_local1 = null;
} else if ((_local1 > (_local2.fireScrollPos - 560)) && (_local2.dir == "left")) {
_local1 = null;
}
}
if (_local1 != null) {
scrollPos = _local1;
main._x = -scrollPos;
}
if (Math.abs(scrollPlus) > (maxScroll * 4)) {
var _local5 = game.cannonBalls[0].p0.x;
if ((_local5 > 200) && (_local5 < (game.mapWidth - 200))) {
simWave(seaContainer);
simWave(seaContainer2);
}
}
}
};
shakeMain = function () {
if (Math.abs(shake) > 1) {
main._y = main._y + shake;
shake = shake * -0.8;
} else {
shake = 0;
main._y = 0;
}
};
doeRotation = function (ob) {
};
mainLoop = function () {
game.tel++;
if ((game.tel % 15) == 0) {
rand500 = Math.random();
}
if (shake != 0) {
shakeMain();
}
handleCollisions();
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local1 = game.objects[_local2];
initObject(_local1);
maxSpeed(game.objects[_local2]);
checkStageBounds(_local1);
checkTerrainCollisions(_local1);
_local2++;
}
_local2 = 0;
while (_local2 < game.objectsOverig.length) {
var _local1 = game.objectsOverig[_local2];
initObject(_local1);
maxSpeed(game.objectsOverig[_local2]);
checkStageBounds(_local1);
checkTerrainCollisions(_local1);
_local2++;
}
_local2 = 0;
while (_local2 < game.cannonBalls.length) {
var _local1 = game.cannonBalls[_local2];
initObject(_local1);
checkStageBounds(_local1);
checkTerrainCollisions(_local1);
doeRotation(_local1);
cannonBallEffects(_local1);
_local2++;
}
if (callTurnScroll == true) {
switchTurns();
}
if (game.startSequence == true) {
if (game.turn == 0) {
startSequence();
} else {
startSequenceLeft();
}
} else if ((enemySequence != true) && (readyForScroll != true)) {
scrollGame();
}
if (game.tussenscherm != true) {
renderBackground();
}
if (game.doeAIshot == true) {
doeAIshot();
}
checkMinorPosDiff();
draw();
moveRaft();
};
maakRaftTussenscherm = function (raftNr) {
playLoop("menuloop");
raftsAchter = main.createEmptyMovieClip("raftsAchter", 2);
raftsVoor = main.createEmptyMovieClip("raftsVoor", 5);
main.createEmptyMovieClip("pinguinContainer", 3);
aTerrain = [];
var _local2 = 0;
while (_local2 < level.aRafts.length) {
var _local4 = level.aRafts[_local2];
var _local3 = main.raftsVoor.getNextHighestDepth();
var _local1 = main.raftsVoor.attachMovie(_local4, "raft1", _local3);
game.raftMcs.push(_local1);
_local1.gotoAndStop(raftNr);
createRock(_local1, false, true);
_local2++;
}
_local2 = 0;
while (_local2 < aTerrain.length) {
initVector(aTerrain[_local2], true);
_local2++;
}
game.raft1 = {refPoint:aTerrain[0].p0, mc:main.raftsVoor.raft1, t:0, a:3.2, T:4, w:2.0943951023932, bPos:aTerrain[0].p0.y, cannonPoint:aTerrain[0].p1.x, raftnr:1};
var _local9 = (game.raft1.mc._x = game.raftX);
game.raft1.mc._y = game.raft1.refPoint.y;
game.raft1.occupants = [];
game.objects = [];
game.objectsOverig = [];
createPenguins(game.raft1, game.raftX, "hero", false, null);
findOverig(game.raft1, game.raftX, null);
_local2 = 0;
while (_local2 < game.objects.length) {
game.objects[_local2].mc.gotoAndStop(game.objects[_local2].pose);
initObject(game.objects[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < game.objectsOverig.length) {
initObject(game.objectsOverig[_local2]);
_local2++;
}
};
checkMinorPosDiff = function () {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local1 = game.objects[_local2];
if (Math.abs(_local1.vx) < 1) {
var _local3 = Math.abs(_local1.p1.x - _local1.raftPos.x);
if ((_local3 > 0) && (_local3 < 1)) {
_local1.p1.x = (_local1.p0.x = _local1.raftPos.x);
_local1.vx = 0;
}
}
_local2++;
}
_local2 = 0;
while (_local2 < game.objectsOverig.length) {
var _local1 = game.objectsOverig[_local2];
if (Math.abs(_local1.vx) < 1) {
var _local3 = Math.abs(_local1.p1.x - _local1.raftPos.x);
if ((_local3 > 0) && (_local3 < 1)) {
_local1.p1.x = (_local1.p0.x = _local1.raftPos.x);
_local1.vx = 0;
}
}
_local2++;
}
};
startGameComplete = function () {
game = {sW:640, sH:480, tel:0};
game.sea = {width:700, points:20};
scrollPos = 0;
maxScroll = 0;
var _local3 = _root.gameComplete.seaContainer.createEmptyMovieClip("seaContainer", 1);
_root.gameComplete.seaContainer.createEmptyMovieClip("haaiContainer", 2);
var _local4 = _root.gameComplete.seaContainer.createEmptyMovieClip("seaContainer2", 3);
_local3._x = 0;
_local3._y = game.sH - 350;
makeWave(_local3, game.sH, 5606534, 2, 0.1, game.sea.points - 6, game.sea.width);
_local4._x = 0;
_local4._y = game.sH - 310;
makeWave(_local4, game.sH, 6132622, 5, 0.1, game.sea.points, game.sea.width);
_local3.onEnterFrame = function () {
game.tel++;
if ((game.tel % 4) == 0) {
simWave(this);
}
};
_local4.onEnterFrame = function () {
if ((game.tel % 4) == 0) {
simWave(this);
}
};
};
startIntro = function () {
game = {sW:640, sH:480, tel:0};
game.sea = {width:700, points:20};
scrollPos = 0;
maxScroll = 0;
var _local3 = _root.intro.seaContainer.createEmptyMovieClip("seaContainer", 1);
_root.intro.seaContainer.createEmptyMovieClip("haaiContainer", 2);
var _local4 = _root.intro.seaContainer.createEmptyMovieClip("seaContainer2", 3);
_local3._x = 0;
_local3._y = game.sH - 350;
makeWave(_local3, game.sH, 5606534, 2, 0.1, game.sea.points - 6, game.sea.width);
_local4._x = 0;
_local4._y = game.sH - 310;
makeWave(_local4, game.sH, 6132622, 5, 0.1, game.sea.points, game.sea.width);
simWave(_local3);
simWave(_local4);
_local3.onEnterFrame = function () {
game.tel++;
if ((game.tel % 4) == 0) {
simWave(this);
}
};
_local4.onEnterFrame = function () {
if ((game.tel % 4) == 0) {
simWave(this);
}
};
};
_global.maakVakjeZee = function (mc, breedte, kleur, points, golf) {
game = {sW:breedte, sH:480, tel:0};
game.sea = {width:breedte, points:14};
scrollPos = 0;
maxScroll = 0;
mc.breedte = breedte;
var _local2 = mc;
makeWave(_local2, game.sH, kleur, golf, 0.1, points, breedte);
_local2.tel = 0;
_local2.onEnterFrame = function () {
this.tel++;
if ((this.tel % 4) == 0) {
game.sW = (game.sea.width = this.breedte);
simWave(this);
}
};
game.sW = (game.sea.width = this.breedte);
simWave(_local2);
};
startTussenscherm = function () {
root = this;
currentLevel = 1;
levelInit();
saveP = _global.saveProgress;
sky = this.createEmptyMovieClip("skyContainer", 1);
main = this.createEmptyMovieClip("mainContainer", 2);
hud = this.createEmptyMovieClip("hudContainer", 3);
whiteFlash = this.createEmptyMovieClip("whiteFlash", 4);
raftsAchter = main.createEmptyMovieClip("raftsAchter", 2);
raftsVoor = main.createEmptyMovieClip("raftsVoor", 5);
main.createEmptyMovieClip("pinguinContainer", 3);
actionContainer = main.createEmptyMovieClip("actionContainer", 4);
seaContainer = main.createEmptyMovieClip("seaContainer", 6);
main.createEmptyMovieClip("haaiContainer", 7);
seaContainer2 = main.createEmptyMovieClip("seaContainer2", 8);
main.createEmptyMovieClip("cC", 9);
main.createEmptyMovieClip("achtergrond", 0);
main.createEmptyMovieClip("achtergrondStrand", 1);
main.createEmptyMovieClip("staticMcs", 10);
if (_global.twoPlayer == true) {
var _local3 = _global.countTurns % 2;
} else {
var _local3 = 0;
}
if (_global.detail == "low") {
raftLeft.cacheAsBitmap = true;
oppRaft.cacheAsBitmap = true;
}
game = {sW:640, sH:480, mapWidth:2000, maxV:9, g:0.5, mc:main, cC:main.cC, raftHeight:30, raftLevel:305, turn:_local3, ballSelected:1, ammoChosen:"snowball", startSequence:true, endOfGame:false, userReady:false, shotsFired:0};
game.particleObjects = [];
game.explosionObjects = [];
game.raftMcs = [];
game.raftStartPos = 150;
game.tussenscherm = true;
game.seaLevel = game.sH - 90;
initAchtergrond();
var _local4 = sky.attachMovie("mcSky", "mcSky", 0);
_local4._width = game.sW;
maakRaftTussenscherm(saveP.raftUpgrade);
game.cannonBalls = [];
resetArrayNrs();
game.sea = {width:game.mapWidth, points:48};
seaContainer._x = 0;
seaContainer._y = game.sH - 170;
makeWave(seaContainer, game.sH, 5606534, 4, 0.1, game.sea.points, game.sea.width);
seaContainer2._x = 0;
seaContainer2._y = game.sH - 140;
makeWave(seaContainer2, game.sH, 6132622, 4, 0.1, game.sea.points - 4, game.sea.width);
seaInt = setInterval(simWave, 50, seaContainer);
seaInt2 = setInterval(simWave, 50, seaContainer2);
particleInt = setInterval(moveParticleObjects, 40);
explosionInt = setInterval(doExplosions, 30);
animInt = setInterval(animatePenguins, 500);
twicePerSecInt = setInterval(twicePerSec, 500);
init();
attachHaai();
game.startSequence = false;
scrollPos = 0;
main.onEnterFrame = function () {
mainLoop();
doeHaai();
};
attachTussenscherm();
draw();
simWave();
scrollPos = 500;
renderBackground();
scrollPos = 0;
main.achtergrond._y = main.achtergrond._y - 100;
main.achtergrondStrand._y = main.achtergrondStrand._y - 55;
main.achtergrond._x = main.achtergrond._x - 500;
main.achtergrondStrand._x = main.achtergrondStrand._x - 500;
};
attachTussenscherm = function () {
hud.attachMovie("tussenscherm", "tussenscherm", 0);
initTussenscherm();
};
getDeg = function (obj) {
var _local1 = (Math.atan2(obj.vy, obj.vx) * 180) / Math.PI;
return(_local1);
};
getDistancePts = function (obj0x, obj0y, obj1x, obj1y) {
var _local2 = obj0x - obj1x;
var _local1 = obj0y - obj1y;
return(Math.round(Math.sqrt((_local2 * _local2) + (_local1 * _local1))));
};
getDegPts = function (x1, x2, y1, y2) {
var _local1 = (Math.atan2(x1 - x2, y1 - y2) * 180) / Math.PI;
return(_local1);
};
clearIntervals = function () {
clearInterval(seaInt);
clearInterval(seaInt2);
clearInterval(particleInt);
clearInterval(explosionInt);
clearInterval(animInt);
clearInterval(twicePerSecInt);
};
twicePerSec = function () {
if (game.cannonBalls[0].type == "grenade") {
speelSimpelSFX("grenade_tick");
}
rand500 = Math.random();
if (rand500 < 0.07) {
playRandomSound();
}
};
endOfGameMessage = function (raftNr) {
_global.setFadeMusic();
_global.loopPlaying = "";
var _local3 = hud.attachMovie("mcFinishMessage", "mcFinishMessage", 1000);
_local3._x = game.sW / 2;
_local3._y = 20;
if (_global.twoPlayer == true) {
_local3.gotoAndStop("twoPlayer");
} else if (game.winner == 2) {
_local3.gotoAndStop("lose");
} else {
_local3.gotoAndStop("win");
var _local8 = Math.round((game.endTimer - game.beginTimer) / 1000);
var _local9 = game.shotsFired;
var _local7 = ((level.par - _local9) * 300) + 300;
if (_local7 < 0) {
_local7 = 0;
}
var _local6 = ((level.par * 30) - _local8) * 2;
if (_local6 < 0) {
_local6 = 0;
}
_local3.time_used = (((("time used: " + _local8) + " secs ") + "-> ") + _local6) + " bonus credits";
_local3.fired = (((((("shots fired: " + _local9) + " (par ") + level.par) + ")") + " -> ") + _local7) + " credits";
var _local4 = (_local7 + _local6) + 500;
if ((_local4 == null) || (_local4 == undefined)) {
_local4 = 0;
}
_local3.score = "credits earned: " + _local4;
_global.progress.points = _global.progress.points + _local4;
_global.saveProgress.money = _global.saveProgress.money + _local4;
_local3.totalScore = "total score: " + _global.progress.points;
_global.progress.level++;
if ((_global.progress.level == null) || (_global.progress.level == undefined)) {
_global.progress.level = 1;
}
if (_global.saveProgress.level < _global.progress.level) {
_global.saveProgress.level = _global.progress.level;
}
}
_local3.raftNr = raftNr;
_local3._visible = false;
_local3.memScrollPos = scrollPos;
_local3.onEnterFrame = function () {
var _local3 = getMostLeftPenguin(this.raftNr);
var _local2 = _local3.p0.x - (game.sW / 2);
if (_local2 > (game.mapWidth - game.sW)) {
_local2 = game.mapWidth - game.sW;
} else if (_local2 < 0) {
_local2 = 0;
}
if (this.step2 != true) {
if (Math.abs(_local2 - scrollPos) < 2) {
this.step2 = true;
}
} else if (this._visible == false) {
this._visible = true;
delete this.onEnterFrame;
this.mouseclick.gotoAndPlay(2);
this.onEnterFrame = function () {
if (this.readyForClick == true) {
initMouseListener("finishMessage");
delete this.onEnterFrame;
}
};
}
};
};
maxSpeed = function (obj) {
if (obj.vx > game.maxV) {
obj.vx = game.maxV;
} else if (obj.vx < (-game.maxV)) {
obj.vx = -game.maxV;
}
if (obj.vy > game.maxV) {
obj.vy = game.maxV;
} else if (obj.vy < (-game.maxV)) {
obj.vy = -game.maxV;
}
};
doDistances = function () {
var _local2 = game.objects[0];
var _local1 = game.objects[1];
var _local5 = _local1.p1.x - _local2.p1.x;
var _local4 = _local1.p1.y - _local2.p1.y;
var _local3 = Math.atan2(_local4, _local5);
_local1.p1.x = _local2.p1.x + (Math.cos(_local3) * afst);
_local1.p1.y = _local2.p1.y + (Math.sin(_local3) * afst);
};
resetNoColl = function () {
var _local1 = 0;
while (_local1 < game.objects.length) {
game.objects[_local1].noColl = null;
_local1++;
}
_local1 = 0;
while (_local1 < game.objects.length) {
game.objectsOverig[_local1].noColl = null;
_local1++;
}
};
hitTestBounds = function (mc, doelMc) {
var _local1 = mc.getBounds(doelMc);
mc.yMin = _local1.yMin;
mc.yMax = _local1.yMax;
mc.xMax = _local1.xMax;
mc.xMin = _local1.xMin;
};
exitGame = function () {
stopSound();
clearIntervals();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
root.mask.removeMovieClip();
Mouse.removeListener(_global.mouseListener);
root.gotoAndStop("begin");
};
exitBattle = function () {
trace("CALL EXITBATTLE");
if (_global.twoPlayer != true) {
if (game.winner != 1) {
_global.progress.lives--;
}
_global.saveProgress.rockets = level.player1.rockets;
_global.saveProgress.grenades = level.player1.grenades;
}
stopSound();
clearIntervals();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
root.mask.removeMovieClip();
Mouse.removeListener(_global.mouseListener);
if (_global.twoPlayer == true) {
root.gotoAndStop("overview2p");
} else if ((_global.progress.level == 11) && (game.winner == 1)) {
deleteGameMcs();
playLoop("menuloop");
root.gotoAndStop("endtro");
} else if ((_global.progress.level > 11) || (_global.callExit == true)) {
_global.callExit = false;
playLoop("menuloop");
root.gotoAndStop("gamecomplete");
} else if (_global.progress.level == 11) {
start();
} else {
root.gotoAndStop("overview");
}
};
initObject = function (v) {
v.vy = v.vy + (game.g * v.m);
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));
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.vy;
v.ry = v.vx;
v.lx = v.vy;
v.ly = -v.vx;
v.vx = v.vx * v.airf;
v.vy = v.vy * v.airf;
};
setDamage = function (obj, damage) {
obj.hitpoints = obj.hitpoints + (damage * 2);
if (obj.hitpoints > 100) {
obj.hitpoints = 100;
}
};
draw = function () {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local1 = game.objects[_local2];
_local1.mc._x = _local1.p1.x;
var _local3 = _local1.p1.y;
if (_local1.opponent == true) {
_local3 = _local3 + 6;
}
_local1.mc._y = _local3;
_local2++;
}
_local2 = 0;
while (_local2 < game.objectsOverig.length) {
var _local1 = game.objectsOverig[_local2];
_local1.mc._x = _local1.p1.x;
_local1.mc._y = _local1.p1.y;
_local2++;
}
_local2 = 0;
while (_local2 < game.cannonBalls.length) {
var _local1 = game.cannonBalls[_local2];
if ((_local1.type != "grenade") || (_local1.type != "snowball")) {
_local1.mc._x = _local1.p1.x;
_local1.mc._y = _local1.p1.y + 12;
} else {
_local1.mc._x = _local1.p1.x;
_local1.mc._y = _local1.p1.y;
}
_local2++;
}
};
getDistance = function (obj0, obj1) {
var _local2 = obj0.p0.x - obj1.p0.x;
var _local1 = obj0.p0.y - obj1.p0.y;
return(Math.round(Math.sqrt((_local2 * _local2) + (_local1 * _local1))));
};
getDistanceOUD = function (obj0, obj1) {
return(Math.sqrt(Math.pow(obj0.p1.x - obj1.p1.x, 2) + Math.pow(obj0.p1.y - obj1.p1.y, 2)));
};
makeWave = function (mc, deep, clr, jit, turbProb, points, seawidth) {
mc.pts = [];
mc.springs = [];
mc.clr = clr;
mc.jit = jit;
mc.turbProb = turbProb;
mc.deep = deep;
mc.stiffK = 0.3;
mc.kDamp = 0.85;
var _local3 = (seawidth + 100) / points;
var _local1 = 0;
while (_local1 < points) {
mc.pts[_local1] = {x:-50 + (_local1 * _local3), y:0, fx:0, fy:0, vx:0, vy:0, restLen:0.5 * _local3, jy:0};
_local1++;
}
};
simWaveOrig = function (mc) {
var _local2;
_local2 = 0;
while (_local2 < mc.pts.length) {
mc.pts[_local2].fx = 0;
if (Math.random() < mc.turbProb) {
mc.pts[_local2].fy = (Math.random() * mc.jit) - (mc.jit / 2);
} else {
mc.pts[_local2].fy = 0;
}
_local2++;
}
_local2 = 0;
while (_local2 < (mc.pts.length - 1)) {
var _local4 = mc.pts[_local2];
var _local5 = mc.pts[_local2 + 1];
var _local7 = _local5.x - _local4.x;
var _local6 = _local5.y - _local4.y;
var _local8 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local11 = mc.stiffK * (_local8 - _local4.restLen);
var _local12 = (_local11 * _local7) / _local8;
var _local10 = (_local11 * _local6) / _local8;
if (_local2 != 0) {
_local4.fx = _local4.fx + _local12;
_local4.fy = _local4.fy + _local10;
}
if (_local2 != (mc.pts.length - 2)) {
_local5.fx = _local5.fx - _local12;
_local5.fy = _local5.fy - _local10;
}
_local2++;
}
mc.clear();
mc.beginFill(mc.clr, 100);
var _local14 = null;
var _local13 = null;
var _local9 = false;
_local2 = 1;
while (_local2 < (mc.pts.length - 1)) {
_local9 = false;
var _local3 = mc.pts[_local2];
if (_local13 == null) {
if (_local3.x >= (scrollPos - (maxScroll * 4))) {
if (_local14 == null) {
_local14 = _local2;
mc.moveTo(mc.pts[_local2].x, mc.pts[_local2].y);
}
if (_local3.x >= ((scrollPos + game.sW) + (maxScroll * 4))) {
if (_local13 == null) {
_local13 = _local2;
}
} else {
_local9 = true;
}
}
}
if (_local9 == true) {
_local3.vx = _local3.vx * mc.kDamp;
_local3.vy = _local3.vy * mc.kDamp;
_local3.vx = _local3.vx + _local3.fx;
_local3.vy = _local3.vy + _local3.fy;
_local3.x = _local3.x + _local3.vx;
_local3.y = _local3.y + _local3.vy;
mc.lineTo(_local3.x, _local3.y);
}
_local2++;
}
_local2 = _local13;
mc.lineTo(mc.pts[_local2].x, mc.pts[_local2].y);
mc.lineTo(mc.pts[_local2].x, mc.deep);
mc.lineTo(mc.pts[_local14].x, mc.deep);
mc.lineTo(mc.pts[_local14].x, mc.pts[_local14].y);
mc.endFill();
};
simWave = function (mc) {
var _local12 = seaContainer;
var _local11;
lastLine = null;
firstLine = null;
_local11 = 0;
while (_local11 < (mc.pts.length - 1)) {
var _local2 = mc.pts[_local11];
_local2.draw = false;
if (lastLine == null) {
if (_local2.x >= (scrollPos - (maxScroll * 4))) {
if (firstLine == null) {
firstLine = _local11;
mc.moveTo(_local2.x, _local2.y);
}
if (_local2.x >= ((scrollPos + game.sW) + (maxScroll * 4))) {
if (lastLine == null) {
lastLine = _local11;
}
} else {
_local2.draw = true;
mc.pts[_local11].fx = 0;
if (Math.random() < mc.turbProb) {
mc.pts[_local11].fy = (Math.random() * mc.jit) - (mc.jit / 2);
} else {
mc.pts[_local11].fy = 0;
}
}
}
}
_local11++;
}
_local11 = 0;
while (_local11 < (mc.pts.length - 1)) {
var _local3 = mc.pts[_local11];
var _local4 = mc.pts[_local11 + 1];
var _local6 = _local4.x - _local3.x;
var _local5 = _local4.y - _local3.y;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local9 = mc.stiffK * (_local7 - _local3.restLen);
var _local10 = (_local9 * _local6) / _local7;
var _local8 = (_local9 * _local5) / _local7;
if (_local11 != 0) {
_local3.fx = _local3.fx + _local10;
_local3.fy = _local3.fy + _local8;
}
if (_local11 != (mc.pts.length - 2)) {
_local4.fx = _local4.fx - _local10;
_local4.fy = _local4.fy - _local8;
}
_local11++;
}
mc.clear();
mc.beginFill(mc.clr, 100);
_local11 = 1;
while (_local11 < (mc.pts.length - 1)) {
var _local2 = mc.pts[_local11];
if (_local2.draw == true) {
_local2.vx = _local2.vx * mc.kDamp;
_local2.vy = _local2.vy * mc.kDamp;
_local2.vx = _local2.vx + _local2.fx;
_local2.vy = _local2.vy + _local2.fy;
_local2.x = _local2.x + _local2.vx;
_local2.y = _local2.y + _local2.vy;
mc.lineTo(_local2.x, _local2.y);
}
_local11++;
}
if (lastLine == null) {
lastLine = mc.pts.length - 1;
}
_local11 = lastLine;
mc.lineTo(mc.pts[_local11].x, mc.pts[_local11].y);
mc.lineTo(mc.pts[_local11].x, mc.deep);
mc.lineTo(mc.pts[firstLine].x, mc.deep);
mc.lineTo(mc.pts[firstLine].x, mc.pts[firstLine].y);
mc.endFill();
};
simWaveTitle = function (mc) {
var _local11;
lastLine = null;
firstLine = null;
_local11 = 0;
while (_local11 < (mc.pts.length - 1)) {
var _local2 = mc.pts[_local11];
mc.pts[_local11].fx = 0;
if (Math.random() < mc.turbProb) {
mc.pts[_local11].fy = (Math.random() * mc.jit) - (mc.jit / 2);
} else {
mc.pts[_local11].fy = 0;
}
_local11++;
}
_local11 = 0;
while (_local11 < (mc.pts.length - 1)) {
var _local3 = mc.pts[_local11];
var _local4 = mc.pts[_local11 + 1];
var _local6 = _local4.x - _local3.x;
var _local5 = _local4.y - _local3.y;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local9 = mc.stiffK * (_local7 - _local3.restLen);
var _local10 = (_local9 * _local6) / _local7;
var _local8 = (_local9 * _local5) / _local7;
if (_local11 != 0) {
_local3.fx = _local3.fx + _local10;
_local3.fy = _local3.fy + _local8;
}
if (_local11 != (mc.pts.length - 2)) {
_local4.fx = _local4.fx - _local10;
_local4.fy = _local4.fy - _local8;
}
_local11++;
}
mc.clear();
mc.beginFill(mc.clr, 100);
mc.moveTo(mc.pts[0].x, mc.pts[0].y);
_local11 = 1;
while (_local11 < (mc.pts.length - 1)) {
var _local2 = mc.pts[_local11];
_local2.vx = _local2.vx * mc.kDamp;
_local2.vy = _local2.vy * mc.kDamp;
_local2.vx = _local2.vx + _local2.fx;
_local2.vy = _local2.vy + _local2.fy;
_local2.x = _local2.x + _local2.vx;
_local2.y = _local2.y + _local2.vy;
mc.lineTo(_local2.x, _local2.y);
_local11++;
}
lastLine = mc.pts.length - 1;
_local11 = lastLine;
mc.lineTo(mc.pts[_local11].x, mc.pts[_local11].y);
mc.lineTo(mc.pts[_local11].x, mc.deep);
mc.lineTo(mc.pts[firstLine].x, mc.deep);
mc.lineTo(mc.pts[firstLine].x, mc.pts[firstLine].y);
mc.endFill();
};
init = function () {
if (game.turn == 0) {
scrollPos = game.mapWidth - game.sW;
} else {
scrollPos = 0;
}
maxScroll = 30;
maxS = 0;
starMargin = 100;
readyForScroll = false;
waitForScroll = 25;
waitBeforeHealthCheck = 0;
repositioning = false;
cannonBallCollTime = 0;
lastExplosionTime = 0;
minCollAnim = 6;
firstOpp = 2;
healthBarsVisible = true;
enemySequence = null;
callTurnScroll = null;
showLevelComplete = false;
screenShootPos = 0.36;
rand500 = Math.random();
if (rand500 < 0.3) {
playRandomSound();
}
M_ABS = Math.abs;
game.dontShoot = false;
game.fire = {schietmannetje:null, schietEpox:null, rockNr:null};
game.launchDegrees = 0;
game.launchPower = 0;
game.activeSupersoaker = null;
game.maxMapWidth = 4500;
game.doeAIshot = false;
game.cannonMc = null;
game.AIshootObj = null;
game.setAIshotTime = null;
game.drumRollPlayed = false;
game.AIshotsFired = 0;
if (currentLevel > 6) {
game.AIbeginAfwStappen = random(2);
} else if (currentLevel < 3) {
game.AIbeginAfwStappen = 2 + random(2);
} else {
game.AIbeginAfwStappen = 1 + random(2);
}
game.extraScroll = 0;
game.tel = 0;
if (level.hippo == true) {
game.hippoPos = (game.mapWidth / 2) - 150;
}
rand500 = Math.random();
game.simonBeginTekstKlaar = false;
game.instructionsStarted = false;
if (_global.doeInstructions == true) {
game.instructionsDone = false;
game.InstructionsXmouse = [305, 305, 305, 305, 305, 305, 305, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 309, 307, 306, 306, 306, 306, 306, 307, 307, 308, 310, 310, 310, 310, 310, 308, 305, 300, 296, 291, 288, 286, 283, 281, 275, 274, 270, 268, 265, 265, 265, 265, 265, 267, 270, 272, 277, 278, 280, 282, 286, 289, 293, 297, 301, 303, 304, 304, 304, 306, 311, 318, 324, 330, 334, 338, 346, 354, 359, 368, 376, 380, 386, 392, 396, 396, 396, 396, 396, 394, 386, 377, 370, 361, 351, 343, 339, 328, 326, 324, 315, 309, 305, 301, 299, 299, 299, 299, 301, 309, 319, 326, 331, 340, 346, 354, 357, 357, 357, 357, 357, 358, 359, 359, 359, 360, 361, 366, 370, 377, 379, 382, 386, 389, 391, 392, 394, 397, 398, 399, 399, 399, 399, 399, 398, 396, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394];
game.InstructionsYmouse = [302, 302, 302, 302, 302, 302, 301, 304, 305, 311, 312, 315, 319, 324, 329, 332, 338, 347, 354, 359, 361, 363, 365, 367, 367, 367, 365, 361, 356, 350, 342, 334, 328, 322, 314, 307, 299, 293, 289, 285, 281, 271, 268, 265, 263, 261, 261, 261, 261, 262, 267, 271, 275, 281, 286, 291, 297, 304, 309, 316, 322, 330, 333, 335, 335, 335, 334, 330, 325, 320, 312, 308, 305, 300, 293, 290, 283, 279, 275, 271, 267, 264, 262, 262, 262, 262, 262, 264, 267, 267, 267, 267, 268, 270, 274, 274, 275, 281, 283, 284, 285, 285, 285, 285, 284, 282, 279, 275, 271, 268, 262, 257, 252, 250, 250, 250, 250, 250, 251, 256, 269, 273, 275, 276, 278, 280, 284, 287, 294, 296, 296, 296, 296, 296, 293, 290, 287, 285, 285, 285, 285, 285, 285, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286];
_global.doeInstructions = false;
} else {
game.instructionsDone = true;
}
game.InstructionsFrameArrayNr = 0;
game.InstructionsShotFired = false;
};
levelInit = function () {
var _local17 = ["mcRaft"];
if (_global.twoPlayer != true) {
switch (currentLevel) {
case 1 :
var _local7 = ["mcRock3", "mcRock3_2", "mcRock3_3"];
var _local6 = "rock3Beweegruimte";
var _local15 = ["Voor", "Voor", "Voor"];
level = {opponent:"pirate", par:6, mapWidth:2400 + random(400), aRafts:_local17, aOppRafts:_local7, hippo:false, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true};
break;
case 2 :
_local7 = ["mcRock4", "mcRock4_2"];
_local15 = ["Voor", "Voor"];
_local6 = "rock4Beweegruimte";
level = {opponent:"viking", par:6, mapWidth:2400 + random(400), aRafts:_local17, aOppRafts:_local7, hippo:false, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true};
break;
case 3 :
_local7 = ["mcRock7", "mcRock7_2"];
_local6 = "rock7Beweegruimte";
_local15 = ["Voor", "Achter"];
level = {explosiefProjectiel:false, opponent:"gang", par:5, mapWidth:2500 + random(4), hippo:true, aRafts:_local17, aOppRafts:_local7, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true};
break;
case 4 :
_local7 = ["mcRock8", "mcRock8_2", "mcRock8_3"];
_local15 = ["Achter", "Achter", "Voor"];
_local6 = "rock8Beweegruimte";
level = {opponent:"neighbour", par:7, aRafts:_local17, aOppRafts:_local7, hippo:false, ouders:true, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 5 :
_local7 = ["mcRock2"];
_local15 = ["Voor"];
_local6 = "rock2Beweegruimte";
level = {opponent:"chinees", par:5, aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 6 :
_local7 = ["mcRock1", "mcRock1_2", "mcRock1_3"];
_local6 = "rock1Beweegruimte";
_local15 = ["Voor", "Voor", "Voor"];
level = {opponent:"pirate", par:5, aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 7 :
_local7 = ["mcRock5"];
_local15 = ["Voor"];
_local6 = "rock5Beweegruimte";
level = {explosiefProjectiel:true, par:5, opponent:"savage", aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 8 :
_local7 = ["mcRock10", "mcRock10_2"];
_local15 = ["Voor", "Voor"];
_local6 = "rock10Beweegruimte";
level = {opponent:"viking", par:5, aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 9 :
_local7 = ["mcRock9", "mcRock9_2", "mcRock9_3"];
_local6 = "rock9Beweegruimte";
_local15 = ["Achter", "Voor", "Voor"];
level = {explosiefProjectiel:true, par:5, opponent:"gang", aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:false, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 10 :
_local7 = ["mcRock6", "mcRock6_2"];
_local15 = ["Achter", "Achter"];
_local6 = "rock6Beweegruimte";
level = {explosiefProjectiel:true, opponent:"neighbour", par:7, aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:true, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
break;
case 11 :
_local7 = ["mcRock11", "mcRock11_2"];
_local15 = ["Achter", "Achter"];
_local6 = "rock11Beweegruimte";
level = {opponent:"ouder", par:5, endLevel:true, aRafts:_local17, aOppRafts:_local7, hippo:true, ouders:true, raftBeweegruimte:_local6, aOppRaftsDepthInfo:_local15, rockLevel:true, rockets:2, grenades:2, mapWidth:2500 + random(600)};
}
level.rockets = _global.saveProgress.rockets;
level.grenades = _global.saveProgress.grenades;
level.player1 = {rockets:level.rockets, grenades:level.grenades};
} else {
switch (currentLevel) {
case 1 :
level = {mc1:"mcRock1", mc2:"mcRock1", rockLevel:true, rockets:1, grenades:1, par:4, mapWidth:2300 + random(700)};
break;
case 2 :
level = {mc1:"mcRock2", mc2:"mcRock2", rockLevel:true, rockets:2, grenades:2, par:3, mapWidth:2800 + random(400)};
break;
case 3 :
level = {mc1:"mcRock3", mc2:"mcRock3", rockLevel:true, rockets:2, grenades:2, par:5, mapWidth:2700 + random(500)};
break;
case 4 :
level = {mc1:"mcRock4", mc2:"mcRock4", rockLevel:true, rockets:2, grenades:2, par:5, mapWidth:2500 + random(700)};
break;
case 5 :
level = {mc1:"mcRock5", mc2:"mcRock5", rockLevel:true, rockets:3, grenades:3, par:5, mapWidth:3000 + random(300)};
break;
case 6 :
level = {mc1:"mcRock6", mc2:"mcRock6", rockLevel:true, rockets:2, grenades:2, par:5, mapWidth:2500 + random(600)};
break;
case 7 :
level = {mc1:"mcRock7", mc2:"mcRock7", rockLevel:true, rockets:2, grenades:2, par:5, mapWidth:2400 + random(700)};
break;
case 8 :
level = {mc1:"mcRock8", mc2:"mcRock8", rockLevel:true, rockets:2, grenades:2, par:5, mapWidth:2400 + random(400)};
break;
case 9 :
level = {mc1:"mcRock9", mc2:"mcRock9", rockLevel:true, rockets:3, grenades:3, par:5, mapWidth:2700 + random(400)};
break;
case 10 :
level = {mc1:"mcRock10", mc2:"mcRock10", rockLevel:true, rockets:3, grenades:3, par:5, mapWidth:2700 + random(400)};
}
level.player1 = {rockets:level.rockets, grenades:level.grenades};
level.player2 = {rockets:level.rockets, grenades:level.grenades};
}
};
oppGrrr = function (ob) {
var _local2 = ob.mc.attachMovie("oppGrrr", "oppGrrr", ob.mc.getNextHighestDepth());
_local2._x = 4;
_local2._y = -75;
_local2.tel = 70;
_local2.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else {
this.removeMovieClip();
}
};
};
startSequence = function () {
if (game.userReady != false) {
if (showLevelComplete != true) {
var _local6 = 0;
} else {
var _local8 = getMostLeftPenguin(1);
var _local6 = _local8.p0.x - (game.sW * (1 - screenShootPos));
if (_local6 < 0) {
_local6 = 0;
}
}
var _local9 = getMostLeftPenguin(2);
var _local7 = _local9.p0.x;
if (scrollPos > (_local7 - (game.sW / 2))) {
maxS = maxS + (((maxScroll / 4) - maxS) / 20);
} else {
maxS = maxS + ((maxScroll - maxS) / 40);
}
var _local5 = (_local6 - scrollPos) / 8;
if (_local5 > maxS) {
_local5 = maxS;
} else if (_local5 < (-maxS)) {
_local5 = -maxS;
}
scrollPos = scrollPos + _local5;
if ((Math.abs(scrollPos - _local6) < 1) && (showLevelComplete == true)) {
game.startSequence = false;
operateCannon(1);
scrollPos = _local6;
}
if ((Math.floor(scrollPos) <= 0) && (showLevelComplete != true)) {
if (game.instructionsDone != true) {
if (game.instructionsStarted != true) {
operateCannonInstructions(1);
game.instructionsStarted = true;
}
} else {
showLevelComplete = true;
playVoice("start_battle");
var _local4 = 0;
while (_local4 < game.objects.length) {
var _local3 = game.objects[_local4];
if (_local3.naam == "broer") {
var _local2 = _local3.mc.attachMovie("broer_beginTekst", "broer_beginTekst", _local3.mc.getNextHighestDepth());
_local2.gotoAndStop(currentLevel);
_local2._x = 4;
_local2._y = -60;
if (_local2.leeg == true) {
_local2.tel = 0;
} else {
_local2.tel = 58;
}
_local2.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else {
var _local4 = 0;
while (_local4 < game.objects.length) {
var _local3 = game.objects[_local4];
if (_local3.naam == "simon") {
var _local2 = _local3.mc.attachMovie("simon_beginTekst", "simon_beginTekst", _local3.mc.getNextHighestDepth());
trace((("attach SIMON " + _local2) + " ") + _local3.mc);
_local2.gotoAndStop(currentLevel);
_local2._x = 4;
_local2._y = -60;
_local2.tel = 100;
_local2.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else {
this.removeMovieClip();
game.simonBeginTekstKlaar = true;
}
};
}
_local4++;
}
this.removeMovieClip();
}
};
}
_local4++;
}
}
}
main._x = -scrollPos;
}
};
startSequenceLeft = function () {
if (game.userReady != false) {
if (showLevelComplete != true) {
var _local2 = game.mapWidth - game.sW;
} else {
var _local5 = getMostLeftPenguin(2);
var _local2 = _local5.p0.x - (game.sW * (1 - screenShootPos));
if (_local2 > (game.mapWidth - sw)) {
_local2 = game.mapWidth - sw;
}
}
var _local4 = getMostLeftPenguin(1);
var _local3 = _local4.p0.x;
if (scrollPos < (_local3 - (game.sW / 2))) {
maxS = maxS + (((maxScroll / 4) - maxS) / 20);
} else {
maxS = maxS + ((maxScroll - maxS) / 40);
}
var _local1 = (_local2 - scrollPos) / 8;
if (_local1 > maxS) {
_local1 = maxS;
} else if (_local1 < (-maxS)) {
_local1 = -maxS;
}
scrollPos = scrollPos + _local1;
if ((Math.abs(scrollPos - _local2) < 1) && (showLevelComplete == true)) {
game.startSequence = false;
operateCannon(2);
scrollPos = _local2;
}
if ((Math.ceil(scrollPos) >= (game.mapWidth - game.sW)) && (showLevelComplete != true)) {
showLevelComplete = true;
playVoice("start_battle");
}
main._x = -scrollPos;
}
};
initMouseListener = function (option) {
if (option == "beginMessage") {
_global.mouseListener = new Object();
_global.mouseListener.onMouseDown = function () {
game.userReady = true;
game.beginTimer = getTimer();
hud.mcBeginMessage.removeMovieClip();
stopMouseListener();
};
Mouse.addListener(_global.mouseListener);
} else if (option == "finishMessage") {
_global.mouseListener = new Object();
_global.mouseListener.onMouseDown = function () {
stopMouseListener();
hud.mcFinishMessage.removeMovieClip();
exitBattle();
};
Mouse.addListener(_global.mouseListener);
}
};
stopMouseListener = function () {
Mouse.removeListener(_global.mouseListener);
};
attachBeginMessage = function () {
main._x = -scrollPos;
var _local2 = hud.attachMovie("mcBeginMessage", "mcBeginMessage", hud.getNextHighestDepth());
_local2._y = 20;
_local2._x = game.sW / 2;
_local2.levelnr = "level " + currentLevel;
_local2.par = ("par: " + level.par) + " shots";
_local2.onEnterFrame = function () {
if (this.readyForClick == true) {
initMouseListener("beginMessage");
delete this.onEnterFrame;
}
};
};
attachSnowball = function (loopMc, ai, optie) {
var _local3;
var _local8;
var _local9;
var _local6;
var _local20 = false;
if (ai == true) {
if ((game.ammoChosen == "explosiefProjectiel") && (level.opponent != "savage")) {
_local3 = "mcTurtle";
} else {
_local3 = "ammo_" + level.opponent;
}
if (game.ammoChosen == "explosiefProjectiel") {
_local20 = true;
}
_local8 = 0.99;
_local9 = 0.88;
_local6 = 0.8;
if (((level.opponent == "savage") || (level.opponent == "chinees")) || (level.opponent == "viking")) {
speelSimpelSFX("launch_arrow");
} else {
speelSimpelSFX("snowball");
}
} else if (game.ammoChosen == "snowball") {
_local3 = "mcSnowball";
_local8 = 0.995;
_local9 = 1.1;
_local6 = 0.8;
speelSimpelSFX("snowball");
} else if (game.ammoChosen == "grenade") {
_local20 = true;
_local3 = "mcGrenade";
_local8 = 0.994;
_local9 = 1.2;
_local6 = 0.7;
speelSimpelSFX("grenade");
} else if (game.ammoChosen == "rocket") {
_local20 = true;
_local3 = "mcRocket";
_local8 = 0.995;
_local9 = 0.9;
_local6 = 0.8;
speelSimpelSFX("rocket");
}
if (ai == true) {
var _local14 = _global.oppCannonRotation;
} else {
var _local14 = _global.cannonRotation;
}
var _local12 = main.actionContainer.getNextHighestDepth();
var _local5 = main.actionContainer.attachMovie(_local3, "ball" + _local12, _local12);
var _local2 = (game.cannonBalls[0] = {f:1, m:_local9, r:24, b:_local6, rot:rot, stopTerrainHittest:false, airf:_local8, arrayNr:0, mc:_local5, sb:true, timesColl:0, idNm:_local3, timesHitAnything:0, explosief:_local20, type:game.ammoChosen, fireScrollPos:scrollPos, aantMannetjeHits:0});
if (optie != "instructions") {
cannonBallToFollow = _local2;
}
_local2.mannetjeGeraakt = false;
if (ai == true) {
_local2.aiShot = true;
} else {
_local2.aiShot = false;
}
var _local4 = _local14 * (Math.PI/180);
var _local18 = _global.cannonPower * Math.cos(_local4);
var _local17 = _global.cannonPower * Math.sin(_local4);
var _local13 = _local18 / 3;
var _local15 = _local17 / 3;
_local2.vx = _local13;
_local2.vy = _local15;
trace((((((((((((((((("SNOWBALL " + _local2.vx) + " ") + _local2.vy) + " ") + _local4) + " ") + loopMc) + " ") + _local5) + " nw==> ") + _local3) + " ") + _local14) + " ") + _global.cannonPower) + " ") + _local4);
_local2.rot = 0.3 + (Math.random() * 0.7);
if (_local13 < 0) {
_local2.rot = _local2.rot * -1;
}
if (_local2.type == "grenade") {
_local2.counter = 115;
_local2.rot = _local2.rot * 40;
} else if (_local2.type == "snowball") {
_local2.rot = _local2.rot * 40;
_local2.nrOfSnowballCollisions = 0;
} else {
_local2.rot = _local2.rot * 5;
}
if (_local2.vx > 0) {
_local2.dir = "right";
} else {
_local2.dir = "left";
}
hitTestBounds(loopMc.loopPoint, main);
var _local7 = loopMc.loopPoint.xMin;
var _local11 = loopMc.loopPoint.yMin;
trace(((" loopX " + _local7) + " ") + loopMc.loopPoint);
_local7 = _local7 + (Math.cos(_local4) * 20);
_local11 = _local11 + (Math.sin(_local4) * 20);
_local2.p0 = {x:_local7, y:_local11};
_local5._x = _local7;
_local5._y = _local11;
_local5._rotation = getDeg(_local2);
initObject(_local2);
resetNoColl();
};
resetArrayNrs = function () {
game.raft1.occupants = [];
game.raft2.occupants = [];
var _local1 = 0;
while (_local1 < game.objects.length) {
var _local2 = game.objects[_local1];
_local2.arrayNr = _local1;
if (_local2.raft == game.raft1) {
game.raft1.occupants.push(_local1);
} else if (_local2.raft == game.raft2) {
game.raft2.occupants.push(_local1);
}
_local1++;
}
};
removeObject = function (obj, optie) {
if ((obj.sb == true) && (optie != "instructions")) {
manageTurnSwitch();
}
if (obj.sb == true) {
obj.mc.removeMovieClip();
game.cannonBalls.splice(obj.arrayNr, 1);
} else if (obj.overig == true) {
obj.mc.removeMovieClip();
game.objectsOverig.splice(obj.arrayNr, 1);
} else {
obj.mc._parent.removeMovieClip();
game.objects.splice(obj.arrayNr, 1);
resetArrayNrs();
}
};
selectBall = function (nr) {
var _local1 = 1;
while (_local1 < 4) {
cannon["selectBall" + _local1].selectedBg._visible = false;
_local1++;
}
cannon["selectBall" + nr].selectedBg._visible = true;
};
calcPower = function (power) {
var _local1 = power * (1 + ((power / 90) * 3));
_local1 = _local1 * 0.08;
if (_local1 < 20) {
_local1 = 20;
}
return(_local1);
};
calcLaunch = function () {
var _local3 = hud.mcKeu;
var _local9 = _local3._x;
var _local8 = _local3._y;
if (_local9 < 0) {
_local9 = 0;
}
if (_local8 > game.sH) {
_local8 = 0;
}
if (game.instructionsDone != true) {
var _local6 = game.InstructionsXmouse[game.InstructionsFrameArrayNr];
var _local7 = game.InstructionsYmouse[game.InstructionsFrameArrayNr];
hud.instructionsMuis._x = _local6;
hud.instructionsMuis._y = _local7;
} else {
var _local6 = _root._xmouse;
var _local7 = _root._ymouse;
}
var _local4 = getDegPts(_local3._x, _local6, _local3._y, _local7);
_local4 = (-_local4) - 90;
if (_local4 < -60) {
_local4 = -60;
} else if (_local4 > 60) {
_local4 = 60;
}
_local3._rotation = _local4;
var _local5 = getDistancePts(_local3._x, _local3._y, _local6, _local7);
if (_local5 > (game.maxV * 26)) {
_local5 = game.maxV * 26;
}
_local3.mask._x = Math.round(_local5 * 0.75);
_global.cannonPower = calcPower(_local5);
_global.cannonRotation = _local4;
};
doeMouseMoveKeu = function () {
calcLaunch();
var _local3 = game.fire.schietMannetje.mc.bazooka;
_local3._rotation = 180 + _global.cannonRotation;
_local3.penguin.head.head._rotation = (((_local3.headAngle * 4) + _global.cannonRotation) - _local3.flip) / 5;
hitTestBounds(_local3, main);
var _local4 = _local3.xMin;
if (game.instructionsDone != true) {
hud.mcKeu._visible = true;
} else if (_root._xmouse < _local4) {
hud.mcKeu._visible = false;
game.dontShoot = true;
} else {
game.dontShoot = false;
hud.mcKeu._visible = true;
}
};
exitInstructions = function () {
var _local1 = 0;
while (_local1 < game.cannonBalls.length) {
var _local2 = game.cannonBalls[_local1];
removeObject(_local2, "instructions");
_local1++;
}
hud.mcKeu.removeMovieClip();
game.instructionsDone = true;
cannonBallToFollow = null;
game.InstructionsShotFired = true;
hud.instructionsMuis.removeMovieClip();
hud.hudIntructions.removeMovieClip();
};
attachInitKeu = function (schietMannetje) {
_global.mouseListener = new Object();
var _local6 = hud.attachMovie("mcKeu", "mcKeu", hud.getNextHighestDepth());
_local6.schietMannetje = schietMannetje;
_local6.onEnterFrame = function () {
if (this.schietMannetje.bazooka != undefined) {
var _local5 = this.schietMannetje.bazooka._x;
var _local4 = this.schietMannetje.bazooka._y;
} else {
var _local5 = 0;
var _local4 = 0;
}
this._x = (this.schietMannetje.mc._x - scrollPos) + _local5;
this._y = this.schietMannetje.mc._y + _local4;
if (game.instructionsDone != true) {
if (game.InstructionsFrameArrayNr >= game.InstructionsXmouse.length) {
if (game.InstructionsShotFired != true) {
vuurSchot("instructions");
hud.mcKeu._visible = false;
game.InstructionsShotFired = true;
game.telAfterInstructionsShotFired = 50;
} else if (game.telAfterInstructionsShotFired > 0) {
game.telAfterInstructionsShotFired--;
if (game.telAfterInstructionsShotFired == 24) {
var _local2 = 0;
while (_local2 < game.cannonBalls.length) {
var _local3 = game.cannonBalls[_local2];
removeObject(_local3, "instructions");
_local2++;
}
}
} else if (hud.hudIntructions._alpha > 0) {
hud.hudIntructions._alpha = hud.hudIntructions._alpha - 4;
} else {
exitInstructions();
}
} else if (hud.hudIntructions._alpha < 100) {
hud.hudIntructions._alpha = hud.hudIntructions._alpha + 4;
} else {
doeMouseMoveKeu();
game.InstructionsFrameArrayNr++;
if (game.InstructionsFrameArrayNr == (game.InstructionsXmouse.length - 80)) {
hud.instructionsMuis.muis.play();
}
}
}
};
if (_local6.schietMannetje.bazooka != undefined) {
var _local11 = _local6.schietMannetje.bazooka._x;
var _local10 = _local6.schietMannetje.bazooka._y;
} else {
var _local11 = 0;
var _local10 = 0;
}
_local6._x = (_local6.schietMannetje.mc._x - scrollPos) + _local11;
_local6._y = _local6.schietMannetje.mc._y + _local10;
if (game.instructionsDone == true) {
_global.mouseListener.onMouseMove = function () {
doeMouseMoveKeu();
};
_global.mouseListener.onMouseDown = function () {
doeMouseMoveKeu();
var _local5 = true;
if (game.dontShoot == true) {
_local5 = false;
}
var _local4 = hud.mcShootCannon.nofire1;
var _local3 = hud.mcShootCannon.nofire2;
if ((_root._xmouse > _local4._x) && (_root._xmouse < (_local4._x + _local4._width))) {
if ((_root._ymouse > _local4._y) && (_root._ymouse < (_local4._y + _local4._height))) {
_local5 = false;
}
}
if ((_root._xmouse > _local3._x) && (_root._xmouse < (_local3._x + _local3._width))) {
if ((_root._ymouse > _local3._y) && (_root._ymouse < (_local3._y + _local3._height))) {
_local5 = false;
}
}
if (_local5 == true) {
vuurSchot();
Mouse.removeListener(_global.mouseListener);
hud.mcKeu.removeMovieClip();
}
};
Mouse.addListener(_global.mouseListener);
}
calcLaunch();
doeMouseMoveKeu();
};
vuurSchot = function (optie) {
var _local3 = game.fire.schietMannetje;
var _local2 = game.fire.schietMannetje.mc.bazooka;
var _local1 = game.fire.rockNr;
if (optie != "instructions") {
playVoice("place_shot");
if (game.ballSelected == 2) {
level["player" + _local1].grenades--;
} else if (game.ballSelected == 3) {
level["player" + _local1].rockets--;
}
game.currentShot = _local1;
cannonSequence = false;
}
_local2.play();
if (optie != "instructions") {
attachSnowball(_local2, false);
} else {
attachSnowball(_local2, false, "\u00EFnstructies");
}
if ((_local3.noBB != true) && (optie != "instructions")) {
if (_local1 == 1) {
var _local5 = -1;
} else {
var _local5 = 1;
}
_local3.vx = _local5;
}
_local3.vy = -2;
if (optie != "instructions") {
game.shotsFired++;
}
cannon.removeMovieClip();
};
initRadar = function () {
var _local7 = hud.mcShootCannon.radar;
var _local11 = _local7._width;
var _local10 = game.maxMapWidth;
var _local12 = game.mapWidth;
var _local8 = _local11 / _local10;
var _local9 = ((_local10 - _local12) / 2) * _local8;
var _local13 = main.pinguinContainer;
var _local2 = "geen";
var _local5 = 0;
while (_local5 < game.objects.length) {
var _local3 = game.objects[_local5];
var _local6 = _local7.getNextHighestDepth();
var _local1 = _local7.attachMovie("radar_char", "radar_char" + _local6, _local6);
if (_local3.opponent == true) {
_local1.pic.gotoAndStop(2);
} else {
_local1.pic.gotoAndStop(1);
}
_local1._x = _local9 + (_local3.p0.x * _local8);
_local1._y = -23;
if (_local2 != "geen") {
if (_local1._x < ((_local2._x + _local2._width) + 1)) {
_local1._x = (_local2._x + _local2._width) + 1;
}
}
_local2 = _local1;
_local1.pic.healthbar._visible = true;
var _local4 = _local1.pic.healthbar.bg._width * (_local3.health / 100);
if (_local4 < 1) {
_local4 = 0;
}
_local1.pic.healthbar.bar._width = _local4;
_local5++;
}
};
operateCannonInstructions = function (rockNr) {
var _local8 = game["raft" + rockNr];
initRadar();
displayHealthBars(false);
if (_global.quiet == false) {
cannon.loopBtn.red._visible = false;
} else {
cannon.loopBtn.red._visible = true;
}
cannon.selectBall1.gotoAndStop(1);
cannon.selectBall2.gotoAndStop(2);
cannon.selectBall3.gotoAndStop(3);
cannon.rockets_left.text = level["player" + rockNr].rockets;
cannon.grenades_left.text = level["player" + rockNr].grenades;
if (level["player" + rockNr].rockets <= 0) {
cannon.selectBall3.pic.gotoAndStop(2);
if (game.ballSelected == 3) {
game.ballSelected = 1;
}
} else {
cannon.selectBall3.onRelease = function () {
selectBall(3);
game.ballSelected = 3;
game.ammoChosen = "rocket";
};
}
if (level["player" + rockNr].grenades <= 0) {
cannon.selectBall2.pic.gotoAndStop(2);
if (game.ballSelected == 2) {
game.ballSelected = 1;
}
} else {
cannon.selectBall2.onRelease = function () {
selectBall(2);
game.ballSelected = 2;
game.ammoChosen = "grenade";
};
}
cannon.selectBall1.onRelease = function () {
selectBall(1);
game.ballSelected = 1;
game.ammoChosen = "snowball";
};
selectBall(game.ballSelected);
if (game.ballSelected == 1) {
game.ammoChosen = "snowball";
} else if (game.ballSelected == 2) {
game.ammoChosen = "grenade";
} else if (game.ballSelected == 3) {
game.ammoChosen = "rocket";
}
var _local5 = getMostLeftPenguin(rockNr);
cannon.fire.penguinObj = _local5;
cannon.fire.snowEpox = _local5.mc.bazooka;
cannon.fire.rockNr = rockNr;
game.fire.schietMannetje = _local5;
game.fire.schietEpox = _local5.mc.bazooka;
game.fire.rockNr = rockNr;
cannon.fire.onRelease = function () {
};
var _local4 = getMostLeftPenguin(rockNr);
var _local3 = _local4.mc.bazooka;
_local3._visible = true;
speelSimpelSFX("draw_weapon");
_local4.mc.gotoAndStop(_local4.pose);
if (rockNr == 1) {
_local3.flip = 0;
_local3.headAngle = 0;
} else {
_local3.flip = 180;
_local3.headAngle = 0;
}
_local4.active = true;
_local3.penguin = _local4.mc;
_local3.penguinObj = _local4;
game.activeSupersoaker = _local3;
var _local7 = hud.attachMovie("instructionsMuis", "instructionsMuis", hud.getNextHighestDepth());
_local7.muis.stop();
var _local6 = hud.attachMovie("hudIntructions", "hudIntructions", hud.getNextHighestDepth());
_local6._alpha = 0;
_local6.skip.onRelease = function () {
trace("exit 3 ");
trace("exit 3 ");
exitInstructions();
};
attachInitKeu(_local5);
};
operateCannon = function (rockNr) {
var _local7 = game["raft" + rockNr];
cannon = hud.attachMovie("mcShootCannon", "mcShootCannon", 0);
cannon.gotoAndStop(rockNr);
initRadar();
if (rockNr != 1) {
cannon._x = game.sW;
}
displayHealthBars(false);
cannon.exit.onRelease = function () {
exitBattle();
};
cannon.loopBtn.onRelease = function () {
if (_global.quiet == false) {
stopLoop();
_global.quiet = true;
_global.loopPlaying = "";
this.red._visible = true;
} else {
_global.quiet = false;
this.red._visible = false;
playLoop("loop");
}
};
if (_global.quiet == false) {
cannon.loopBtn.red._visible = false;
} else {
cannon.loopBtn.red._visible = true;
}
cannon.selectBall1.gotoAndStop(1);
cannon.selectBall2.gotoAndStop(2);
cannon.selectBall3.gotoAndStop(3);
cannon.rockets_left.text = level["player" + rockNr].rockets;
cannon.grenades_left.text = level["player" + rockNr].grenades;
if (level["player" + rockNr].rockets <= 0) {
cannon.selectBall3.pic.gotoAndStop(2);
if (game.ballSelected == 3) {
game.ballSelected = 1;
}
} else {
cannon.selectBall3.onRelease = function () {
selectBall(3);
game.ballSelected = 3;
game.ammoChosen = "rocket";
};
}
if (level["player" + rockNr].grenades <= 0) {
cannon.selectBall2.pic.gotoAndStop(2);
if (game.ballSelected == 2) {
game.ballSelected = 1;
}
} else {
cannon.selectBall2.onRelease = function () {
selectBall(2);
game.ballSelected = 2;
game.ammoChosen = "grenade";
};
}
cannon.selectBall1.onRelease = function () {
selectBall(1);
game.ballSelected = 1;
game.ammoChosen = "snowball";
};
selectBall(game.ballSelected);
if (game.ballSelected == 1) {
game.ammoChosen = "snowball";
} else if (game.ballSelected == 2) {
game.ammoChosen = "grenade";
} else if (game.ballSelected == 3) {
game.ammoChosen = "rocket";
}
var _local6 = getMostLeftPenguin(rockNr);
cannon.fire.penguinObj = _local6;
cannon.fire.snowEpox = _local6.mc.bazooka;
cannon.fire.rockNr = rockNr;
game.fire.schietMannetje = _local6;
game.fire.schietEpox = _local6.mc.bazooka;
game.fire.rockNr = rockNr;
cannon.fire.onRelease = function () {
};
var _local5 = getMostLeftPenguin(rockNr);
var _local4 = _local5.mc.bazooka;
_local4._visible = true;
speelSimpelSFX("draw_weapon");
_local5.mc.gotoAndStop(_local5.pose);
if (rockNr == 1) {
_local4.flip = 0;
_local4.headAngle = 0;
} else {
_local4.flip = 180;
_local4.headAngle = 0;
}
_local5.active = true;
_local4.penguin = _local5.mc;
_local4.penguinObj = _local5;
game.activeSupersoaker = _local4;
attachInitKeu(_local6);
};
checkSep = function (obj) {
if (obj.raftPos.x < level.sep) {
if (obj.p0.x > level.sep) {
obj.hitpoints = 100;
setHealth(obj);
}
} else if (obj.p0.x < level.sep) {
obj.hitpoints = 100;
setHealth(obj);
}
};
moveRaft = function () {
var _local4 = game.raft1;
var _local8 = aTerrain[0].p0.y;
var _local7 = _local4.bPos + (_local4.a * Math.sin(_local4.w * _local4.t));
var _local5 = _local7 - _local8;
var _local1 = 0;
while (_local1 < aTerrain.length) {
var _local3 = aTerrain[_local1];
if (_local3.rockMc.dobber != false) {
_local3.p0.y = _local3.p0.y + _local5;
}
_local1++;
}
var _local6 = random(14) + 22;
_local4.t = _local4.t + (1 / _local6);
_local1 = 0;
while (_local1 < game.raftMcs.length) {
var _local2 = game.raftMcs[_local1];
if (_local2.dobber != false) {
_local2._y = _local4.refPoint.y - _local4.mc.mcYPos;
}
_local1++;
}
var _local9 = main.haaiContainer.haai;
_local9._y = _local4.refPoint.y + 40;
if (level.hippo == true) {
_local9 = main.raftsAchter.hippo;
_local9._y = _local4.refPoint.y + 20;
}
};
displayHealthBars = function (option) {
if (option == true) {
if (healthBarsVisible == false) {
var _local1 = 0;
while (_local1 < game.objects.length) {
var _local2 = game.objects[_local1];
_local2.mc.healthbar._visible = true;
healthBarsVisible = true;
_local1++;
}
}
} else if (healthBarsVisible == true) {
var _local1 = 0;
while (_local1 < game.objects.length) {
var _local2 = game.objects[_local1];
_local2.mc.healthbar._visible = false;
healthBarsVisible = false;
_local1++;
}
}
};
switchTurns = function () {
var _local11 = game.sW;
if (readyForScroll != true) {
var _local12 = true;
if ((game.turn % 2) == 0) {
var _local10 = 2;
} else {
var _local10 = 1;
}
var _local5 = 0;
while (_local5 < game["raft" + _local10].occupants.length) {
var _local8 = game["raft" + _local10].occupants[_local5];
var _local2 = game.objects[_local8];
if ((Math.abs(_local2.vx) > 0.4) || (Math.abs(_local2.vy) > 0.4)) {
_local12 = false;
}
_local5++;
}
if (_local12 == true) {
waitBeforeHealthCheck++;
if (waitBeforeHealthCheck > 20) {
waitBeforeHealthCheck = 0;
waitForScroll = 25;
cannonBallToFollow = null;
readyForScroll = true;
cannonSequence = true;
arrayNrDeductPointsAttached = null;
checkForDamage = true;
displayHealthBars(true);
repositioning = true;
game.turn++;
if (((game.turn % 2) == 1) && (_global.twoPlayer != true)) {
enemySequence = true;
}
}
}
} else if (checkForDamage == true) {
if (pauzeScroll > 0) {
pauzeScroll--;
} else {
var _local9 = null;
var _local5 = 0;
while (_local5 < game.objects.length) {
var _local7 = game.objects[_local5];
if (_local9 == null) {
if (_local7.hitpoints > 0) {
_local9 = _local7;
}
}
_local5++;
}
if (_local9 == null) {
checkForDamage = false;
} else {
var _local7 = _local9;
var _local16 = _local7.p0.x - (_local11 / 2);
if (_local16 < 0) {
_local16 = 0;
}
if (_local16 > (game.mapWidth - _local11)) {
_local16 = game.mapWidth - _local11;
}
var _local14 = (_local16 - scrollPos) / 8;
if (_local14 > maxScroll) {
_local14 = maxScroll;
} else if (_local14 < (-maxScroll)) {
_local14 = -maxScroll;
}
scrollPos = scrollPos + _local14;
main._x = -scrollPos;
if (Math.abs(_local16 - scrollPos) < 1) {
if (arrayNrDeductPointsAttached != _local7.arrayNr) {
var _local19 = actionContainer.getNextHighestDepth();
var _local17 = actionContainer.attachMovie("mcDeductPoints", "mcDeductPoints" + _local19, _local19);
_local17.points.text = "- " + Math.ceil(_local7.hitpoints);
_local17._x = _local7.p0.x;
_local17._y = _local7.p0.y - 80;
arrayNrDeductPointsAttached = _local7.arrayNr;
var _local21 = _local7.health - _local7.hitpoints;
if ((_local7.hitpoints > 15) && (_local21 > 0)) {
if (_local7.opponent == true) {
oppGrrr(_local7);
} else {
playVoice("got_hit");
}
}
}
var _local15 = _local7.mc.healthbar.bg._width * ((_local7.health - _local7.hitpoints) / 100);
if (_local15 < 1) {
_local15 = 1;
}
_local7.mc.healthbar.bar._width = _local7.mc.healthbar.bar._width - 1;
if (_local7.mc.healthbar.bar._width <= _local15) {
_local7.mc.healthbar.bar._width = _local15;
setHealth(_local7);
if (_local7.health <= 0) {
pauzeScroll = 40;
}
}
}
}
}
} else {
if ((game.turn % 2) == 0) {
var _local18 = getMostLeftPenguin(1);
if (_local18 != null) {
var _local16 = _local18.p0.x - (game.sW * (1 - screenShootPos));
if (_local16 < 0) {
_local16 = 0;
}
_local16 = _local16 + game.extraScroll;
} else {
if (game.endOfGame == true) {
var _local20 = game.flagHolder;
} else {
var _local20 = getMostLeftPenguin(2);
}
var _local16 = _local20.p0.x - (game.sW / 2);
if (_local16 > (game.mapWidth - _local11)) {
_local16 = game.mapWidth - _local11;
}
if (game.endOfGame != true) {
game.winner = 2;
_local20.flag = true;
_local20.mc.gotoAndStop("flag");
game.flagHolder = _local20;
endOfGameMessage(2);
displayHealthBars(false);
game.endOfGame = true;
}
}
activeRaft = game.raft1;
} else {
var _local20 = getMostLeftPenguin(2);
if (_local20 != null) {
if (game.drumRollPlayed == false) {
speelSimpelSFX("drumroll");
game.drumRollPlayed = true;
}
var _local16 = _local20.p0.x - (game.sW * screenShootPos);
if (_local16 > (game.mapWidth - _local11)) {
_local16 = game.mapWidth - _local11;
}
} else {
if (game.endOfGame == true) {
var _local18 = game.flagHolder;
} else {
var _local18 = getMostLeftPenguin(1);
}
var _local16 = _local18.p0.x - (game.sW / 2);
if (_local16 < 0) {
_local16 = 0;
}
if (game.endOfGame != true) {
trace("speel vic");
speelSimpelSFX("victory");
game.endTimer = getTimer();
var _local18 = getMostLeftPenguin(1);
game.winner = 1;
_local18.mc.gotoAndStop("flag");
_local18.flag = true;
game.flagHolder = _local18;
endOfGameMessage(1);
displayHealthBars(false);
game.endOfGame = true;
}
}
activeRaft = game.raft2;
}
if (waitForScroll <= 0) {
var _local14 = (_local16 - scrollPos) / 5;
if (_local14 > maxScroll) {
_local14 = maxScroll;
} else if (_local14 < (-maxScroll)) {
_local14 = -maxScroll;
}
scrollPos = scrollPos + _local14;
main._x = -scrollPos;
if (repositioning == false) {
if (Math.abs(_local16 - scrollPos) < 1) {
if (game.endOfGame != true) {
repositionOppositePenguins();
if ((game.turn % 2) == 0) {
operateCannon(1);
} else if (_global.twoPlayer == true) {
operateCannon(2);
} else {
startAIshot();
}
}
readyForScroll = false;
callTurnScroll = false;
}
}
} else {
waitForScroll--;
}
var _local13 = true;
if ((game.turn % 2) == 0) {
var _local10 = 1;
} else {
var _local10 = 2;
}
var _local5 = 0;
while (_local5 < game["raft" + _local10].occupants.length) {
var _local8 = game["raft" + _local10].occupants[_local5];
var _local2 = game.objects[_local8];
if (_local2.deceased != true) {
var _local6 = _local2.raftPos.x;
var _local4 = _local2.p0.x;
if (Math.abs(_local4 - _local6) > 3) {
_local13 = false;
_local2.vanPlaats = true;
} else {
_local2.vanPlaats = false;
}
if (level.sep != null) {
checkSep(_local2);
}
var _local3 = (_local6 - _local4) / 20;
if (Math.abs(_local4 - _local6) < 6) {
_local2.vx = _local2.vx * 0.5;
_local2.vy = _local2.vy * 0.5;
} else if (_local3 > 0) {
if (_local3 > 3) {
_local3 = 3;
} else if (_local3 < 1) {
_local3 = 1;
}
} else if (_local3 < -3) {
_local3 = -3;
} else if (_local3 > -1) {
_local3 = -1;
}
_local2.vx = _local3;
if (_local3 > 0.2) {
if (_local2.pose == "stand") {
if (_local2.mc._currentframe != 2) {
_local2.mc.gotoAndStop("walkright");
}
} else if (_local2.mc._currentframe != 5) {
_local2.mc.gotoAndStop("walkright");
}
} else if (_local3 < -0.2) {
if (_local2.pose == "stand") {
if (_local2.mc._currentframe != 3) {
_local2.mc.gotoAndStop("walkleft");
}
} else if (_local2.mc._currentframe != 5) {
_local2.mc.gotoAndStop("walkleft");
}
} else {
if (_local2.mc._currentframe != 8) {
_local2.mc.gotoAndStop(_local2.pose);
}
if (_local2.active != true) {
_local2.mc.weapon._visible = false;
}
}
}
_local5++;
}
if (_local13 == true) {
repositioning = false;
}
}
};
repositionOppositePenguins = function () {
if ((game.turn % 2) == 0) {
if (scrollPos < (game.oppRaftX - 500)) {
var _local5 = 2;
}
} else if (scrollPos > (game.raftX + game.raft1.mc._width)) {
var _local5 = 1;
}
var _local3 = 0;
while (_local3 < game["raft" + _local5].occupants.length) {
var _local4 = game["raft" + _local5].occupants[_local3];
var _local1 = game.objects[_local4];
if (_local1.deceased != true) {
_local1.p0.x = _local1.raftPos.x;
_local1.p0.y = _local1.raftPos.y;
}
_local3++;
}
if (_local5 == 1) {
_local3 = 0;
while (_local3 < game.objectsOverig.length) {
var _local2 = game.objectsOverig[_local3];
_local2.p0.x = _local2.raftPos.x;
_local2.p0.y = _local2.raftPos.y;
_local3++;
}
}
};
setHealth = function (ob) {
ob.health = ob.health - ob.hitpoints;
if (ob.health <= 0) {
ob.health = 0;
ob.r = 0;
ob.deceased = true;
ob.mc.gotoAndStop("die");
if (ob.opponent == true) {
playVoice("see_you_later", true);
} else {
playVoice("see_you_later");
}
}
ob.hitpoints = 0;
};
getMostLeftPenguin = function (raftnr) {
if (raftnr == 1) {
var _local4 = -100000;
var _local6 = null;
var _local2 = 0;
while (_local2 < game["raft" + raftnr].occupants.length) {
var _local3 = game["raft" + raftnr].occupants[_local2];
var _local1 = game.objects[_local3];
if (_local1.p0.x > _local4) {
_local6 = _local1;
_local4 = _local1.p0.x;
}
_local2++;
}
} else {
raftnr = 2;
var _local4 = 100000 /* 0x0186A0 */;
var _local6 = null;
var _local2 = 0;
while (_local2 < game["raft" + raftnr].occupants.length) {
var _local3 = game["raft" + raftnr].occupants[_local2];
var _local1 = game.objects[_local3];
if (_local1.p0.x < _local4) {
_local6 = _local1;
_local4 = _local1.p0.x;
}
_local2++;
}
}
return(_local6);
};
startAIshot = function () {
game.AIshotsFired++;
trace(game.AIshotsFired + " shotsfires");
displayHealthBars(false);
if (level.rockLevel == true) {
var _local2 = getMostLeftPenguin(2);
var _local11 = _local2.p0.x;
var _local15 = game.raftLevel - _local2.p0.y;
var _local17 = (4000 - _local15) / 4000;
if (_local2.aimHigh == true) {
var _local18 = true;
} else {
var _local18 = false;
}
} else {
var _local11 = game.raft2.refPoint.x;
var _local17 = 1;
var _local18 = false;
}
var _local19 = 132;
var _local7 = 0;
if (currentLevel > 11) {
_local7 = 0;
} else if (_global.saveProgress.raftUpgrade == 2) {
_local7 = 20;
} else if (_global.saveProgress.raftUpgrade == 3) {
_local7 = 65;
} else if (_global.saveProgress.raftUpgrade == 4) {
_local7 = 75;
}
var _local10 = (_local11 - game.raft1.refPoint.x) - _local7;
var _local6 = _local10 / 2900;
var _local14 = _local6 + (_local6 / 2.4);
_local6 = ((_local14 * 5) + 0.5) / 6.2;
if (_local18 == true) {
var _local9 = 34 + random(12);
} else {
var _local9 = 18 + random(28);
}
var _local16 = Math.abs(7 - (_local9 - 30));
if (_local9 > 45) {
_local6 = _local6 + ((_local6 - 0.5) / 4);
}
_global.oppCannonRotation = _local9 - 180;
var _local3 = (10 + (_local6 * (_local19 - 17))) + (_local16 * 1.1);
var _local12 = 7 - currentLevel;
if (_local12 > 2) {
afwFactor = _local12 / 13;
} else {
afwFactor = 0.15;
}
if (level.opponent == "chinees") {
afwFactor = afwFactor / 1.2;
}
trace(afwFactor + " AFWIJKINGS FACTOR!!!!");
trace("AIbeginAfwStappen : " + game.AIbeginAfwStappen);
var _local8 = game.AIbeginAfwStappen - (game.AIshotsFired - 1);
if (_local8 > 0) {
var _local5 = (afwFactor * _local8) / 3.5;
if (Math.random() > 0.5) {
_local5 = 1 + _local5;
} else {
_local5 = 1 - _local5;
}
afwFactor = afwFactor / _local8;
} else {
var _local5 = 1;
}
_local3 = _local3 * _local5;
trace("BEGINAFWIJKING " + _local5);
_local3 = _local3 * ((1 + (afwFactor / 2)) - (Math.random() * afwFactor));
_local3 = _local3 * _local17;
trace((((((("AISHOT " + _local10) + " ") + _global.oppCannonRotation) + " ") + _local2) + " ") + _local11);
if (math.random() > 0.92) {
_local3 = _local3 * (1.5 - Math.random());
}
if (_local3 > 140) {
_local3 = 140;
}
_global.cannonPower = _local3;
if (level.rockLevel == false) {
var _local4 = game.raft2.mc.cannon.loop;
var _local13 = -1;
} else {
_local2.active = true;
_local2.mc.gotoAndStop(1);
_local2.mc.weapon.gotoAndStop(_global.baddieID);
var _local4 = _local2.mc.weapon.bazooka;
trace((("dezeGaatSchieten" + _local2) + " ") + _local4);
trace(((" visible " + _local2.mc.weapon._visible) + " ") + _local2.mc.weapon.bazooka._visible);
_local2.mc.weapon._visible = true;
_local2.mc.weapon.bazooka._visible = true;
speelSimpelSFX("draw_weapon");
var _local13 = 1;
}
_local4.penguin = _local2.mc;
_local4.penguinObj = _local2;
trace((((_local4 + " set targetrot ") + _local13) + " ") + _global.oppCannonRotation);
var _local21 = (_local4.targetRot = _local13 * (180 + _global.oppCannonRotation));
_local4.tel = 0;
game.AIshootInfo = {mannetjeObj:_local2, targetRot:_local21, tel:0, setAIshotTime:game.tel};
trace("game.AIshootInfo Targetrot " + game.AIshootInfo.targetRot);
game.doeAIshot = true;
game.cannonMc = _local4;
game.AIshootObj = _local2;
game.setAIshotTime = game.tel;
};
doeAIshot = function () {
var _local2 = game.cannonMc;
_local2 = game.AIshootObj.mc.weapon.bazooka;
if ((game.tel - game.AIshootInfo.setAIshotTime) < 200) {
_local2._rotation = _local2._rotation + ((game.AIshootInfo.targetRot - _local2._rotation) / 12);
var _local4 = game.AIshootObj.mc.head.head.head;
if (level.opponent == "savage") {
if (_local2.boog.pijl._x < 3) {
_local2.boog.pijl._x = _local2.boog.pijl._x + 0.5;
}
}
_local4._rotation = _local4._rotation + ((game.AIshootInfo.targetRot - _local2._rotation) / 30);
if (game.AIshootInfo.tel >= 30) {
if ((Math.round(_local2._rotation) == game.AIshootInfo.targetRot) || (game.AIshootInfo.tel > 200)) {
var _local3 = false;
if ((level.opponent == "viking") || (level.opponent == "chinees")) {
_local2.play();
if ((_local2.animDone == true) || (game.AIshootInfo.tel > 200)) {
_local3 = true;
}
} else {
_local2.play();
_local3 = true;
}
if (_local3 == true) {
game.doeAIshot = false;
_global.cannonRotation = 315;
game.ammoChosen = "snowball";
if (level.explosiefProjectiel == true) {
game.ammoChosen = "explosiefProjectiel";
} else {
game.ammoChosen = "snowball";
}
game.currentShot = 2;
attachSnowball(_local2, true);
if (game.AIshootInfo.mannetjeObj.noBB != true) {
game.AIshootInfo.mannetjeObj.vx = 1;
}
game.AIshootInfo.mannetjeObj.vy = -2;
cannonSequence = false;
enemySequence = false;
}
}
} else {
game.AIshootInfo.tel++;
}
} else {
game.doeAIshot = false;
playVoice("place_shot");
_global.cannonRotation = 315;
game.ammoChosen = "snowball";
if (level.explosiefProjectiel == true) {
game.ammoChosen = "explosiefProjectiel";
}
game.currentShot = 2;
attachSnowball(game.AIshootInfo.mannetjeObj.mc.weapon.bazooka, true);
if (game.AIshootInfo.mannetjeObj.noBB != true) {
game.AIshootInfo.mannetjeObj.vx = 1;
}
game.AIshootInfo.mannetjeObj.vy = -2;
cannonSequence = false;
enemySequence = false;
}
};
resetActivePenguins = function () {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local1 = game.objects[_local2];
if (_local1.geraakt == true) {
_local1.geraakt = false;
}
if (_local1.active == true) {
_local1.active = false;
trace(_local1.mc.head + " head");
_local1.mc.weapon._visible = false;
if (_local1.opponent == true) {
_local1.mc.head.head.head._rotation = 0;
} else {
_local1.mc.head._rotation = 0;
}
}
_local2++;
}
};
manageTurnSwitch = function () {
game.extraScroll = -40 + random(80);
callTurnScroll = true;
resetActivePenguins();
game.drumRollPlayed = false;
};
initAchtergrond = function () {
var _local2 = Math.ceil(game.mapWidth / 347);
game.achtergrond = {aantGras:_local2, aantBergen:17, aantStrand:14};
};
doeHaai = function () {
var _local1 = main.haaiContainer.haai;
if (_local1._x > (game.mapWidth + 100)) {
_local1._x = game.mapWidth + 100;
_local1.richting = -1;
_local1.gotoAndStop(1);
_local1.speed = 2 + random(3);
} else if (_local1._x < -100) {
_local1._x = -100;
_local1.richting = 1;
_local1.gotoAndStop(2);
_local1.speed = 2 + random(3);
}
_local1._x = _local1._x + (_local1.speed * _local1.richting);
};
renderBackground = function () {
var _local8 = scrollPos;
var _local6 = 0.5;
var _local5 = 0.2;
_local5 = 0.2;
main.achtergrond._x = _local8 * _local6;
main.achtergrondStrand._x = _local8 * _local5;
sky.clouds._x = ((-scrollPos) * 0.1) + 100;
doeHaai();
var _local1 = 0;
while (_local1 < game.achtergrond.aantBergen) {
var _local2 = main.achtergrond["bergen_" + _local1];
var _local3 = 150;
if ((((_local1 + 1) * _local3) > (scrollPos * _local6)) && ((_local1 * _local3) < ((scrollPos * _local6) + game.sW))) {
if (_local2 == undefined) {
_local2 = main.achtergrond.attachMovie("bergen_" + _local1, "bergen_" + _local1, _local1);
}
_local2._x = _local1 * _local3;
_local2._y = 200;
} else {
_local2.removeMovieClip();
}
_local1++;
}
_local1 = 0;
while (_local1 < game.achtergrond.aantStrand) {
var _local4 = _local1 + game.achtergrond.aantBergen;
var _local2 = main.achtergrondStrand["strand_" + _local1];
var _local3 = 150;
if ((((_local1 + 1) * _local3) > (scrollPos * (1 - _local5))) && ((_local1 * _local3) < ((scrollPos * (1 - _local5)) + game.sW))) {
if (_local2 == undefined) {
_local2 = main.achtergrondStrand.attachMovie("strand_" + _local1, "strand_" + _local1, _local4);
}
_local2._x = _local1 * _local3;
_local2._y = 200;
} else {
_local2.removeMovieClip();
}
_local1++;
}
if (level.hippo == true) {
if (scrollPos <= (game.hippoPos + 452)) {
if (main.raftsAchter.hippo == undefined) {
var _local10 = main.raftsAchter.attachMovie("hippo", "hippo", main.raftsAchter.getNextHighestDepth());
_local10._x = game.hippoPos;
_local10._y = 410;
}
} else if (main.raftsAchter.hippo != undefined) {
main.raftsAchter.hippo.removeMovieClip();
}
}
if (scrollPos <= (game.rockPos + 452)) {
if (game.mc.achterVoorgrond.mcRots == undefined) {
var _local7 = game.mc.achterVoorgrond.attachMovie("mcRots", "mcRots", game.mc.achterVoorgrond.getNextHighestDepth());
_local7.gotoAndStop(game.rotsFrame);
_local7.boar.gotoAndStop(game.boarFrame);
_local7._x = game.rockPos;
_local7._y = game.grasHoogte;
}
} else if (game.mc.achterVoorgrond.mcRots != undefined) {
game.mc.achterVoorgrond.mcRots.removeMovieClip();
}
if (scrollPos <= (game.sW / 2)) {
if (game.mc.scenery.boom == undefined) {
var _local9 = game.mc.scenery.attachMovie("boom", "boom", game.mc.scenery.getNextHighestDepth());
_local9._y = game.grasHoogte;
_local9._x = game.treeSpace;
}
} else if (game.mc.scenery.boom != undefined) {
game.mc.scenery.boom.removeMovieClip();
}
if (scrollPos >= ((game.mapBreedte - game.sW) - 350)) {
if (game.mc.scenery.boomRechts._x != game.mapBreedte) {
game.mc.scenery.boomRechts.removeMovieClip();
var _local9 = game.mc.scenery.attachMovie("boomRechts", "boomRechts", game.mc.scenery.getNextHighestDepth());
_local9._x = game.mapBreedte;
_local9._y = game.grasHoogte;
}
} else if (game.mc.scenery.boomRechts._x > -1000000) {
game.mc.scenery.boomRechts.removeMovieClip();
}
game.mc.lucht._x = _local8;
};
animatePenguins = function () {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local1 = game.objects[_local2];
if (((((_local1.walk != true) && (_local1.active != true)) && (_local1.deceased != true)) && (_local1.flag != true)) && (_local1.vanPlaats != true)) {
if (_local1.hit != true) {
if (_local1.pose == "stand") {
_local1.mc.weapon.bazooka._visible = false;
var _local3 = Math.random();
if (_local1.naam == "simon") {
if (game.simonBeginTekstKlaar == true) {
if (_local3 > 0.94) {
_local1.mc.gotoAndStop("special");
} else if (_local3 > 0.17) {
_local1.mc.head.head.sleepyEyes.play();
}
}
} else if (_local3 > 0.94) {
_local1.mc.gotoAndStop("look");
} else if (_local3 > 0.9) {
if (_local1.opponent == true) {
var _local5 = _local1.mc.head.head.head;
} else {
var _local5 = _local1.mc.head.head;
}
_local5.sleepyEyes.play();
}
} else if (_local1.pose == "sit") {
var _local3 = Math.random();
if (_local3 > 0.1) {
_local1.mc.head.head.head.sleepyEyes.play();
}
}
} else {
var _local4 = true;
if ((Math.abs(game.objects[_local2].vx) > 0.4) || (Math.abs(game.objects[_local2].vy) > 0.4)) {
_local4 = false;
}
if (_local4 == true) {
_local1.mc.gotoAndStop(_local1.pose);
_local1.hit = false;
trace((_local1.mc.weapon.bazooka + " weapon ") + _local1.opponent);
}
}
}
_local2++;
}
};
hitPenguin = function (obj) {
if (obj.pose == "stand") {
obj.mc.gotoAndStop("hitstand");
obj.hit = true;
} else if (obj.pose == "sit") {
obj.mc.gotoAndStop("hitsit" + (random(2) + 1));
obj.hit = true;
}
};
attachSnowflake = function (startOption) {
var _local4 = background.snow.getNextHighestDepth();
var _local2 = background.snow.attachMovie("mcSnowflake", "mcSnowflake" + _local4, _local4);
_local2._x = scrollPos + random(game.sW);
_local2._y = 0;
if (startOption == true) {
_local2._y = random(game.sH);
}
var _local6;
_local2._xscale = 150;
_local2._yscale = 150;
_local2.snowfallspeed = 2 + random(5);
var _local3;
if (_local2.snowfallspeed < 2) {
_local3 = 1;
} else if (_local2.snowfallspeed < 5) {
_local3 = 2;
} else {
_local3 = 3;
}
_local2.gotoAndStop(_local3);
_local2.onEnterFrame = function () {
this._y = this._y + this.snowfallspeed;
if (this._x < scrollPos) {
this._x = this._x + game.sW;
} else if (this._x > (scrollPos + game.sW)) {
this._x = this._x - game.sW;
} else if (this._y > game.sH) {
this.removeMovieClip();
}
};
};
attachSnowPiece = function (obj, aantal) {
var _local17 = obj.p1.x;
var _local15 = obj.p1.y;
var _local11 = obj.vx;
var _local9 = obj.vy;
var _local16 = obj.r;
var _local14 = actionContainer.getNextHighestDepth();
var _local1 = 0;
while (_local1 < aantal) {
var _local3 = _local14 + _local1;
var _local2 = actionContainer.attachMovie("mcSnowPieces", "snowPiece" + _local3, _local3);
var _local6 = _local17 + (_local1 * 6);
var _local5 = (_local15 - (_local1 * 7)) + _local16;
var _local8 = 5 - random(11);
var _local7 = (Math.random() * -6) - 1;
var _local4 = {x:_local6, y:_local5, vx:_local8, vy:_local7, mc:_local2};
game.particleObjects.push(_local4);
_local2._xscale = 150;
_local2._yscale = 150;
_local2.gotoAndStop(random(6) + 1);
_local1++;
}
};
attachSplash = function (obj, weg, hoger) {
obj.r = 24;
var _local21 = obj.p1.x;
var _local18 = obj.p1.y;
if (hoger == true) {
_local18 = _local18 - 15;
}
var _local14 = obj.vx;
var _local12 = obj.vy;
var _local20 = obj.r;
var _local19 = actionContainer.getNextHighestDepth();
var _local11 = Math.round(3 + ((obj.vx + obj.vy) / 8));
var _local1 = 0;
while (_local1 < _local11) {
var _local7 = _local19 + _local1;
var _local6 = actionContainer.attachMovie("mcSplash", "splash" + _local7, _local7);
var _local10 = _local21 + _local1;
var _local9 = ((_local18 - _local1) - _local20) - 3;
var _local15 = obj.vx;
var _local2 = 0.16 + Math.random();
_local2 = _local2 + (_local11 / 30);
var _local5 = _local2 * obj.vx;
_local6._xscale = _local2 * 100;
_local6._yscale = _local2 * 100;
var _local8 = Math.random();
if (_local8 > 0.7) {
_local5 = _local5 * -0.4;
}
var _local4 = -(Math.abs(obj.vy) / 2);
_local4 = _local4 * (0.5 + _local8);
if (obj.deceased == true) {
_local5 = 4 - random(9);
_local4 = _local4 * 2;
}
pieceObj = {x:_local10, y:_local9, vx:_local5, vy:_local4, mc:_local6};
game.particleObjects.push(pieceObj);
_local1++;
}
};
moveParticleObjects = function () {
var _local2 = 0;
while (_local2 < game.particleObjects.length) {
var _local1 = game.particleObjects[_local2];
if (_local1.inactive == true) {
_local1.mc.removeMovieClip();
game.particleObjects.splice(_local2, 1);
} else {
_local1.vy = _local1.vy + 0.7;
_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;
if (_local1.y > (game.sH - 30)) {
_local1.inactive = true;
}
}
_local2++;
}
};
setSnowBackground = function () {
var _local1 = 0;
while (_local1 < 19) {
attachflake(true);
_local1++;
}
};
renderBackgroundOUD = function () {
var _local3 = scrollPos - 1500;
mountains.bg_f._x = (-_local3) / 3;
mountains.bg_b._x = (-_local3) / 6;
var _local1 = 0;
for (var _local2 in background.snow) {
_local1++;
}
if (_local1 < 18) {
if (_local1 < 14) {
var _local4 = 0.01;
} else {
var _local4 = 0.8;
}
if (Math.random() > _local4) {
attachSnowflake();
}
}
};
attachSmoke = function (obj) {
var _local6 = actionContainer.getNextHighestDepth();
var _local2 = actionContainer.attachMovie("mcSmoke", "smoke" + _local6, _local6);
var _local7 = (-0.5 + Math.random()) * 16;
var _local5 = obj.vx * 2;
if (_local5 > (obj.r * 1.5)) {
_local5 = obj.r * 1.5;
}
var _local4 = obj.vy * 2;
if (_local4 > (obj.r * 1.5)) {
_local4 = obj.r * 1.5;
}
_local2._x = (obj.p0.x + _local7) - _local5;
_local2._y = (obj.p0.y + _local7) - _local4;
_local2._rotation = Math.random() * 360;
var _local8 = 0.7 * (Math.random() * 0.72);
_local2._xscale * (-_local8);
_local2._yscale * (-_local8);
_local2.onEnterFrame = function () {
this._y = this._y - 0.5;
this._xscale = this._xscale * 0.96;
this._yscale = this._yscale * 0.96;
if (this._xscale < 40) {
this.removeMovieClip();
}
};
};
attachSter = function (obj) {
var _local1 = actionContainer.attachMovie("mcSter", "mcSter", actionContainer.getNextHighestDepth());
_local1._x = obj.p0.x;
_local1._y = obj.p0.y;
trace("attachStre " + _local1);
};
attachFlits = function () {
whiteFlash.attachMovie("mcFlits", "mcFlits", 0);
};
cannonBallEffects = function (obj) {
if ((obj.type == "rocket") || (obj.idNm == "ammo_savage")) {
if (Math.random() > 0.6) {
attachSmoke(obj);
}
var _local2 = getDeg(obj);
obj.mc._rotation = _local2;
} else if (Math.abs(obj.rot) > 0) {
obj.mc._rotation = obj.mc._rotation + obj.rot;
obj.rot = obj.rot * 0.98;
}
if (obj.type == "grenade") {
obj.counter--;
if (obj.counter <= 0) {
createExplosion(obj);
explodeCollisions(obj);
removeObject(obj);
}
}
};
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;
if (_local1.rotplus) {
_local1.mc._rotation = _local1.mc._rotation + _local1.rotplus;
}
if (_local1.y > (game.sH - 30)) {
_local1.inactive = true;
} else if (_local1.mc.remove == true) {
_local1.inactive = true;
}
}
_local2++;
}
};
createExplosion = function (obj, hitice) {
var _local24 = lastExplosionTime;
lastExplosionTime = getTimer();
if ((lastExplosionTime - _local24) > 200) {
speelSimpelSFX("explosion");
shake = 10;
attachFlits();
var _local8 = obj.p1.x;
var _local7 = obj.p1.y;
var _local17 = obj.vx;
var _local14 = obj.vy;
var _local25 = obj.r;
var _local6 = actionContainer.getNextHighestDepth();
var _local23 = actionContainer.attachMovie("mcExpCloud", "cloud" + _local6, _local6);
var _local10 = {x:_local8, y:_local7 - 10, vx:0, vy:-3, mc:_local23, mass:0.01};
game.explosionObjects.push(_local10);
var _local3 = 0;
while (_local3 < 3) {
var _local4 = (_local6 + 2) + _local3;
var _local13 = random(2) + 1;
var _local5 = actionContainer.attachMovie("mcExpFire" + _local13, "fire" + _local4, _local4);
_local5._rotation = random(360);
var _local12 = 5 - random(11);
var _local11 = (Math.random() * -5) - 3;
_local10 = {x:_local8, y:_local7 - 20, vx:_local12, vy:_local11, mc:_local5, mass:0.2};
game.explosionObjects.push(_local10);
_local3++;
}
if (hitice == true) {
_local3 = 0;
while (_local3 < 4) {
var _local4 = (_local6 + 5) + _local3;
var _local1 = actionContainer.attachMovie("mcExpDebris", "debris" + _local4, _local4);
_local1.gotoAndStop(random(2) + 1);
_local1._rotation = random(360);
var _local12 = 8 - random(17);
var _local11 = (Math.random() * -14) - 5;
var _local9 = 50 + random(50);
_local1._xscale = (_local1._yscale = _local9);
_local10 = {x:_local8, y:_local7 - 20, vx:_local12, vy:_local11, rotplus:_local12 * 2, mc:_local1, mass:0.6};
game.explosionObjects.push(_local10);
_local3++;
}
var _local21 = 2;
} else {
var _local21 = 4;
}
_local3 = 0;
while (_local3 < _local21) {
var _local4 = (_local6 + 5) + _local3;
var _local2 = actionContainer.attachMovie("mcExpSmoke", "smoke" + _local4, _local4);
_local2._rotation = random(360);
var _local12 = 5 - random(11);
var _local11 = (Math.random() * -5) - 4;
var _local9 = 40 + random(40);
_local2._xscale = (_local2._yscale = _local9);
_local10 = {x:_local8, y:_local7 - 20, vx:_local12, vy:_local11, mc:_local2, mass:0.04};
game.explosionObjects.push(_local10);
_local3++;
}
}
};
initSounds = function () {
sound = _root.createEmptyMovieClip("sound", 0);
_root.sound.createEmptyMovieClip("sfx", 4);
_root.sound.createEmptyMovieClip("loop", 1);
_root.sound.createEmptyMovieClip("cRandom", 2);
_root.sound.createEmptyMovieClip("voices", 3);
_root.sound.createEmptyMovieClip("musicLoop", 0);
initSFX();
};
playRandomSound = function () {
var _local1 = "random" + (random(8) + 1);
random_sounds.attachSound(_local1);
random_sounds.setVolume(40);
random_sounds.start();
};
initSFX = function () {
sfx_snowball = new Sound(_root.sound.sfx);
sfx_snowball.attachSound("snowball");
sfx_snowball_launch = new Sound(_root.sound.sfx);
sfx_snowball_launch.attachSound("snowball_launch");
sfx_rocket = new Sound(_root.sound.sfx);
sfx_rocket.attachSound("rocket");
sfx_grenade = new Sound(_root.sound.sfx);
sfx_grenade.attachSound("grenade");
sfx_boing = new Sound(_root.sound.sfx);
sfx_boing.attachSound("boing");
sfx_launch_arrow = new Sound(_root.sound.sfx);
sfx_launch_arrow.attachSound("launch_arrow");
sfx_bark = new Sound(_root.sound.sfx);
sfx_bark.attachSound("bark");
sfx_grenade_tick = new Sound(_root.sound.sfx);
sfx_grenade_tick.attachSound("grenade_tick");
sfx_grenade_collision = new Sound(_root.sound.sfx);
sfx_grenade_collision.attachSound("grenade_collision");
sfx_draw_weapon = new Sound(_root.sound.sfx);
sfx_draw_weapon.attachSound("draw_weapon");
sfx_explosion = new Sound(_root.sound.sfx);
sfx_explosion.attachSound("explosion");
sfx_snowball_hit = new Sound(_root.sound.sfx);
sfx_snowball_hit.attachSound("snowball_hit");
sfx_drumroll = new Sound(_root.sound.sfx);
sfx_drumroll.attachSound("drumroll");
sfx_splash_small = new Sound(_root.sound.sfx);
sfx_splash_small.attachSound("splash_small");
sfx_splash_large = new Sound(_root.sound.sfx);
sfx_snowbal_hit_terrain = new Sound(v.sound.sfx);
sfx_snowbal_hit_terrain.attachSound("snowbal_hit_terrain");
sfx_victory = new Sound(v.sound.sfx);
sfx_victory.attachSound("victory");
sfx_see_you_later = new Sound(_root.sound.voices);
sfx_byebye = new Sound(_root.sound.voices);
sfx_headshot = new Sound(_root.sound.voices);
sfx_miss = new Sound(_root.sound.voices);
sfx_auw = new Sound(_root.sound.voices);
sfx_good_shot = new Sound(_root.sound.voices);
sfx_byebye = new Sound(_root.sound.voices);
sfx_place_shot = new Sound(_root.sound.voices);
sfx_got_hit = new Sound(_root.sound.voices);
sfx_start_battle = new Sound(_root.sound.voices);
random_sounds = new Sound(_root.sound.cRandom);
};
playVoice = function (id, oppVoice) {
if (oppVoice == true) {
var _local1 = "opp";
} else {
var _local1 = "";
}
switch (id) {
case "see_you_later" :
trace(((_local1 + " ") + oppVoice) + " trewst bye");
if (oppVoice == true) {
var _local5 = 4;
} else {
var _local5 = 5;
}
var _local4 = (_local1 + "byebye") + (random(_local5) + 1);
sfx_see_you_later.attachSound(_local4);
sfx_see_you_later.start();
break;
case "headshot" :
if (Math.random() > 0.6) {
sfx_good_shot.attachSound("good_shot" + (random(6) + 1));
sfx_good_shot.start();
} else {
var _local3 = random(2) + 1;
_local4 = "headshot" + _local3;
sfx_headshot.attachSound(_local4);
sfx_headshot.start();
}
break;
case "byebye" :
trace(((_local1 + " ") + oppVoice) + " trewst bye");
if (oppVoice == true) {
var _local5 = 4;
} else {
var _local5 = 5;
}
_local4 = (_local1 + "byebye") + (random(_local5) + 1);
sfx_byebye.attachSound(_local4);
sfx_byebye.start();
break;
case "miss" :
sfx_miss.attachSound("miss");
sfx_miss.start();
break;
case "good_shot" :
sfx_good_shot.attachSound("good_shot" + (random(6) + 1));
sfx_good_shot.start();
break;
case "auw" :
if (oppVoice == true) {
var _local5 = 4;
} else {
var _local5 = 6;
}
sfx_auw.attachSound((_local1 + "auw") + (random(_local5) + 1));
sfx_auw.start();
break;
case "place_shot" :
var _local3 = random(7) + 1;
_local4 = "place_shot" + _local3;
sfx_place_shot.attachSound(_local4);
sfx_place_shot.start();
break;
case "got_hit" :
_local3 = random(4) + 1;
_local4 = "got_hit" + _local3;
sfx_got_hit.attachSound(_local4);
sfx_got_hit.start();
}
};
randomSFX = function () {
if (shortRandom > 0.8) {
omgeving_bird.start();
}
};
soundCounters = function () {
};
speelSimpelSFX = function (naam, passVar) {
switch (naam) {
case "snowball" :
sfx_snowball.start();
sfx_snowball_launch.start();
break;
case "launch_arrow" :
sfx_launch_arrow.start();
break;
case "bark" :
sfx_bark.start();
sfx_bark_launch.start();
break;
case "drumroll" :
sfx_drumroll.start();
break;
case "victory" :
sfx_victory.start();
break;
case "boing" :
sfx_boing.start();
break;
case "rocket" :
sfx_rocket.start();
break;
case "grenade" :
sfx_grenade.start();
break;
case "grenade_tick" :
sfx_grenade_tick.start();
break;
case "grenade_collision" :
sfx_grenade_collision.start();
break;
case "explosion" :
sfx_explosion.start();
break;
case "splash_large" :
sfx_splash_large.attachSound("splash_large" + (random(2) + 1));
sfx_splash_large.start();
break;
case "splash_small" :
sfx_splash_small.start();
break;
case "snowball_hit" :
sfx_snowball_hit.start();
break;
case "snowbal_hit_terrain" :
sfx_snowbal_hit_terrain.start();
break;
case "draw_weapon" :
sfx_draw_weapon.start();
}
};
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();
}
};
_global.setFadeMusic = function () {
clearInterval(_global.fadeInt);
clearInterval(_global.fadeInInt);
_global.fadeInt = setInterval(_global.fadeMusic, 100);
};
_global.fadeMusic = function () {
if (music_loop.getVolume() > 0) {
music_loop.setVolume(music_loop.getVolume() - 1);
} else {
clearInterval(_global.fadeInt);
}
};
_global.setFadeInMusic = function () {
clearInterval(_global.fadeInt);
clearInterval(_global.fadeInInt);
_global.fadeInInt = setInterval(fadeInMusic, 100);
};
_global.fadeInMusic = function () {
if (music_loop.getVolume() < 70) {
music_loop.setVolume(music_loop.getVolume() + 1);
} else {
clearInterval(_global.fadeInInt);
}
};
playLoopOUD = function (loop) {
if (_global.loopPlaying != loop) {
music_loop.stop();
music_loop = new Sound(_root.sound.musicLoop);
music_loop.attachSound(loop);
music_loop.start(0, 0);
_global.loopPlaying = loop;
music_loop.onSoundComplete = function () {
this.start(0, 0);
};
music_loop.setVolume(60);
}
};
playLoop = function (loop) {
if (_global.quiet != true) {
if (_global.loopPlaying != loop) {
if (_global.noSound != true) {
stopAllSounds();
music_loop.stop;
clearInterval(_global.fadeInt);
music_loop = new Sound(_root.sound.musicLoop);
music_loop.attachSound(loop);
music_loop.start(0, 0);
music_loop.onSoundComplete = function () {
this.start(0, 0);
};
_global.loopPlaying = loop;
music_loop.setVolume(60);
}
}
}
};
stopLoop = function () {
music_loop.stop();
_global.loopPlaying = "";
};
playSea = function (loop) {
seaLoop = new Sound(_root.sound.loop);
seaLoop.attachSound(loop);
seaLoop.start(0, 0);
seaLoop.onSoundComplete = function () {
this.start(0, 0);
};
seaLoop.setVolume(50);
};
stopSound = function () {
seaLoop.stop();
};
enableTellafriend = function () {
var _local1 = root.mcControlCenter;
_local1.mcTellafriend._visible = true;
_local1.mcTellafriend.gotoAndStop(1);
_local1.mcCredits._visible = false;
_local1.new_game._visible = false;
_local1.highscores._visible = false;
_local1.play_more_games._visible = false;
_local1.mcTellafriend.ok.onRelease = function () {
disableTellafriend();
};
_local1.mcTellafriend.cancel.onRelease = function () {
disableTellafriend();
};
};
enableCredits = function () {
var _local1 = root.mcControlCenter;
_local1.mcCredits._visible = true;
_local1.mcTellafriend._visible = false;
_local1.new_game._visible = false;
_local1.play_more_games._visible = false;
_local1.highscores._visible = false;
_local1.mcCredits.ok.onRelease = function () {
disableCredits();
};
};
disableCredits = function () {
var _local1 = root.mcControlCenter;
_local1.mcCredits._visible = false;
_local1.new_game._visible = true;
_local1.play_more_games._visible = true;
_local1.highscores._visible = true;
};
disableTellafriend = function () {
var _local1 = root.mcControlCenter;
_local1.mcTellafriend._visible = false;
_local1.new_game._visible = true;
_local1.play_more_games._visible = true;
_local1.highscores._visible = true;
};
initMenu = function (step) {
if (step == 1) {
playLoop("menuloop");
root = this;
var _local5 = root.attachMovie("mcControlCenter", "mcControlCenter", 1);
_local5.gotoAndStop(1);
initMuteButton(_local5.muteBtn);
disableTellafriend();
disableCredits();
_local5.play.onRelease = function () {
delete this.onRelease;
_global.progress = {level:1, lives:5, points:0, tries:0};
_global.inGame = true;
_global.twoPlayer = false;
_global.doeInstructions = true;
_global.saveProgress.grenades = 0;
_global.saveProgress.rockets = 0;
_global.saveProgress.money = 0;
_global.saveProgress.raftUpgrade = 1;
trace(" svaed " + _global.saveProgress.money);
_root.coolmath("fromMenu");
var _local4 = _root.attachMovie("intro_fade", "intro_fade", _root.getNextHighestDepth());
_local4._alpha = 0;
_local4.onEnterFrame = function () {
trace(_global.saveProgress.grenades + " grenaat 2");
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
root.gotoAndStop("startgame");
root.mcControlCenter.removeMovieClip();
this.removeMovieClip();
}
};
};
_local5.play_more_games.onRelease = function () {
if (Math.random() > 0.8) {
var _local1 = "http://www.monsterbox.com";
} else {
var _local1 = "http://www.bubblebox.com";
}
getURL (_local1, "_blank");
};
_local5.addgames.onRelease = function () {
getURL ("http://www.bubblebox.com/freecontent.htm", "_blank");
};
_local5.tellafriend.onRelease = function () {
disableCredits();
enableTellafriend();
};
_local5.credits.onRelease = function () {
disableTellafriend();
enableCredits();
};
_local5.play_more_games.onRelease = function () {
disableTellafriend();
disableCredits();
getURL ("http://www.bubblebox.com", "_blank");
};
_local5.add_to_site.onRelease = function () {
getURL ("http://www.bubblebox.com/freecontent.htm", "_blank");
};
_local5.highscores.onRelease = function () {
this._parent.gotoAndStop(2);
};
} else if (step == 2) {
root.mcControlCenter.gotoAndStop(2);
var _local4 = root.mcControlCenter;
_local4.hard._alpha = 0;
_local4.hard.tel = 4;
_local4.hard.onEnterFrame = function () {
if (this.tel <= 0) {
if (this._alpha >= 100) {
delete this.onEnterFrame;
} else {
this._alpha = this._alpha + 8;
}
} else {
this.tel--;
}
};
_local4.easy._alpha = 0;
_local4.easy.tel = 4;
_local4.easy.onEnterFrame = function () {
if (this.tel <= 0) {
if (this._alpha >= 100) {
delete this.onEnterFrame;
} else {
this._alpha = this._alpha + 8;
}
} else {
this.tel--;
}
};
_local4.pro._alpha = 0;
_local4.pro.tel = 4;
_local4.pro.onEnterFrame = function () {
if (this.tel <= 0) {
if (this._alpha >= 100) {
delete this.onEnterFrame;
} else {
this._alpha = this._alpha + 8;
}
} else {
this.tel--;
}
};
_global.gameObj = {level:3, numTries:0, totalPoints:0, bonusPoints:0, wins:0, totalDistance:0, totalJumps:0};
_global.gameObj.heroColor = 12354348 /* 0xBC832C */;
_local4.hard.onRelease = function () {
_global.gameObj.difficulty = 1;
root.gotoAndStop("start");
};
_local4.easy.onRelease = function () {
_global.gameObj.difficulty = 0;
root.gotoAndStop("start");
};
_local4.pro.onRelease = function () {
_global.gameObj.difficulty = 2;
root.gotoAndStop("start");
};
_local4.back.onRelease = function () {
this._parent.gotoAndStop(1);
initMenu(1);
};
}
};
checkStageBounds = function (obj) {
var _local2 = false;
if (obj.sb == true) {
var _local3 = 30;
} else {
var _local3 = 200;
}
if (obj.p1.x < ((-obj.r) - _local3)) {
if (obj.penguin == true) {
speelSimpelSFX("splash_large", "pauze");
}
_local2 = true;
} else if (obj.p1.y > ((game.raftLevel + obj.r) + 30)) {
attachSplash(obj, 6, true);
if (obj.penguin == true) {
speelSimpelSFX("splash_large");
if (obj.deceased != true) {
if (obj.opponent == true) {
playVoice("byebye", true);
} else {
playVoice("byebye");
}
}
} else {
speelSimpelSFX("splash_small");
}
_local2 = true;
} else if (obj.p1.x > ((game.mapWidth + obj.r) + _local3)) {
if (obj.penguin == true) {
speelSimpelSFX("splash_large", "pauze");
}
_local2 = true;
}
if (_local2 == true) {
if (obj.sb == true) {
if (((obj.timesHitAnything == 0) && (obj.aiShot != true)) && (obj.mannetjeGeraakt != true)) {
playVoice("miss");
}
}
if (cannonBallToFollow == obj) {
cannonBallToFollow = null;
}
removeObject(obj);
}
};
checkTerrainCollisions = function (obj) {
var _local17 = true;
if (obj.type == "snowball") {
if (obj.nrOfSnowballCollisions > 1) {
_local17 = false;
}
} else if (obj.opponent == true) {
var _local19 = obj.p0.x;
var _local18 = obj.p0.y;
if ((((_local19 > obj.bXmin) && (_local19 < obj.bXmax)) && (_local18 > obj.bYmin)) && (_local18 < obj.bXmax)) {
_local17 = true;
} else {
_local17 = false;
}
}
if (_local17 == true) {
var _local6 = 0;
while (_local6 < aTerrain.length) {
var _local4 = aTerrain[_local6];
var _local7 = obj.p0.x;
if ((M_ABS(_local4.p0.x - _local7) < 100) || (M_ABS(_local4.p1.x - _local7) < 100)) {
var _local2 = getIntersection(obj, _local4);
_local2 = initVector(_local2, false);
var _local5 = obj.r - _local2.len;
if (_local5 >= 0) {
obj.p1.x = obj.p1.x + (_local2.dx * _local5);
obj.p1.y = obj.p1.y + (_local2.dy * _local5);
var _local9 = {dx:_local2.lx, dy:_local2.ly, lx:_local2.dx, ly:_local2.dy, b:obj.b, f:_local4.f};
var _local8 = bounce(obj, _local9);
obj.vx = _local8.vx;
obj.vy = -1;
obj.vy = _local8.vy;
if (obj.sb == true) {
obj.timesHitAnything++;
if ((obj.type == "rocket") || (obj.type == "explosiefProjectiel")) {
attachFlits();
cannonBallToFollow = null;
createExplosion(obj, true);
explodeCollisions(obj);
removeObject(obj);
} else if (obj.type == "grenade") {
var _local3 = Math.abs(obj.vx) + Math.abs(obj.vy);
if (_local3 < 2) {
_local3 = 0;
}
if (Math.random() > 0.5) {
_local3 = _local3 * -1;
}
obj.mc.airrot = _local3;
} else {
obj.nrOfSnowballCollisions++;
var _local10 = cannonBallCollTime;
cannonBallCollTime = getTimer();
if ((cannonBallCollTime - _local10) > 200) {
speelSimpelSFX("snowbal_hit_terrain");
obj.stopTerrainHittest = true;
} else if (obj.nrOfSnowballCollisions > 10) {
cannonBallToFollow = null;
removeObject(obj);
}
}
obj.rot = (Math.abs(obj.vx) + Math.abs(obj.vy)) / 2;
}
}
}
_local6++;
}
}
};
explodeCollisions = function (obj) {
var _local10 = 1000000 /* 0x0F4240 */;
var _local11 = null;
var _local9 = 0;
while (_local9 < game.objects.length) {
var _local3 = game.objects[_local9];
var _local5 = getDistance(obj, _local3);
var _local7 = 250;
if (obj.type == "grenade") {
_local7 = 350;
}
if (_local5 < _local7) {
var _local1 = {};
_local1.vx = obj.p1.x - _local3.p0.x;
_local1.vy = obj.p1.y - _local3.p0.y;
_local1.len = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
if (_local5 < _local10) {
_local10 = _local5;
_local11 = _local3;
}
if (_local1.len > 0) {
_local1.dx = _local1.vx / _local1.len;
_local1.dy = _local1.vy / _local1.len;
} else {
_local1.dx = 0;
_local1.dy = 0;
}
var _local8 = -((_local1.dx * (_local7 - _local5)) / 34);
var _local4 = (_local1.dy * (_local7 - _local5)) / 4;
if (_local4 > 0) {
_local4 = _local4 * -1;
}
if (obj.type == "grenade") {
_local8 = _local8 * 0.8;
_local4 = _local4 * 0.8;
} else if (obj.type == "rocket") {
_local8 = _local8 * 0.65;
_local4 = _local4 * 0.65;
}
var _local13 = Math.abs(_local8);
var _local12 = Math.abs(_local4);
if (level.opponent == "savage") {
if (_local3.opponent != true) {
trace(_local3.mc + " rustig aan");
_local8 = _local8 / 3;
_local4 = _local4 / 2.2;
_local13 = Math.abs(_local13 * 0.8);
_local12 = Math.abs(_local12 * 0.8);
}
}
if ((level.opponent == "gang") || (level.opponent == "neighbour")) {
if (_local3.opponent != true) {
trace(_local3.mc + " rustig aan");
_local8 = _local8 / 1.6;
_local4 = _local4 / 1.2;
_local13 = Math.abs(_local13 * 0.9);
_local12 = Math.abs(_local12 * 0.9);
}
}
_local3.vx = _local3.vx + _local8;
_local3.vy = _local3.vy + _local4;
var _local6 = _local13 + _local12;
if (_local3.opponent == true) {
if (obj.type == "grenade") {
_local6 = _local6 * 2;
}
_local6 = _local6 * 1.1;
} else {
_local6 = _local6 * 0.8;
}
setDamage(_local3, _local6);
if ((_local13 + Math.abs(_local4)) > minCollAnim) {
if (_local3.opponent == false) {
playVoice("auw");
}
hitPenguin(_local3);
}
}
if (_local11 != null) {
cannonBallToFollow = _local11;
}
_local9++;
}
_local9 = 0;
while (_local9 < game.objectsOverig.length) {
var _local3 = game.objectsOverig[_local9];
var _local5 = getDistance(obj, _local3);
var _local7 = 250;
if (_local5 < _local7) {
var _local1 = {};
_local1.vx = obj.p1.x - _local3.p0.x;
_local1.vy = obj.p1.y - _local3.p0.y;
_local1.len = Math.sqrt((_local1.vx * _local1.vx) + (_local1.vy * _local1.vy));
if (_local5 < _local10) {
_local10 = _local5;
_local11 = _local3;
}
if (_local1.len > 0) {
_local1.dx = _local1.vx / _local1.len;
_local1.dy = _local1.vy / _local1.len;
} else {
_local1.dx = 0;
_local1.dy = 0;
}
var _local8 = -((_local1.dx * (_local7 - _local5)) / 26);
var _local4 = (_local1.dy * (_local7 - _local5)) / 3;
if (_local4 > 0) {
_local4 = _local4 * -1;
}
_local3.vx = _local3.vx + _local8;
_local3.vy = _local3.vy + _local4;
var _local13 = Math.abs(_local8);
if (level.opponent == "savage") {
if (_local3.opponent != true) {
_local8 = _local8 / 3.5;
_local4 = _local4 / 1.8;
}
}
if ((_local13 + Math.abs(_local4)) > minCollAnim) {
speelSimpelSFX("bark");
hitPenguin(_local3);
}
}
_local9++;
}
};
checkBluntHitNegerProjectiel = function (projectiel) {
if (projectiel.negerGeraakt != true) {
if (game.currentTurn == 2) {
var _local2 = game.heavyObjects[0];
} else {
var _local2 = game.heavyObjects[1];
}
var _local4 = false;
var _local6 = false;
var _local3 = false;
if (_local2.mc.hittest_top.hitTest(projectiel.mc)) {
_local4 = true;
_local3 = true;
game.bloed.hitMasker = true;
} else if (_local2.mc.hittest_masker.hitTest(projectiel.mc)) {
_local6 = true;
_local3 = true;
game.bloed.hitMasker = true;
} else if (_local2.mc.hittest.hitTest(projectiel.mc)) {
_local3 = true;
}
if (_local3 == true) {
projectiel.noColl = _local2;
_local2.noColl = projectiel;
speelSFX("grenade_collision");
if (_local4 == true) {
var _local5 = projectiel.vx;
_local2.vx = _local2.vx + _local5;
_local2.vy = _local2.vy - (Math.abs(projectiel.vy * 0.4) + 1);
projectiel.vx = projectiel.vx * 0.5;
projectiel.vy = projectiel.vy - (random(8) + 5);
projectiel.rotplus = projectiel.rotplus * 1.5;
} else {
var _local5 = projectiel.vx;
_local2.vx = _local2.vx + _local5;
_local2.vy = _local2.vy - (Math.abs(projectiel.vy * 0.6) + 2);
if (_local2.vy > 0) {
_local2.vy = _local2.vy * -1;
}
projectiel.vx = projectiel.vx * -0.4;
projectiel.vy = projectiel.vy * -0.9;
projectiel.rotplus = projectiel.rotplus * 1.5;
}
setNegerDamage(_local2, "blunthit");
if (Math.abs(_local5) > 1) {
game.negerAnim = true;
setNegerAnim(_local2, "justSit");
_local2.mc.gotoAndStop("sit");
}
}
}
};
hittestCannonBall_Char = function (projectiel, negerObj, objAnr, objBnr) {
var _local13 = 0.9;
if ((projectiel.aantMannetjeHits < 3) && (negerObj.geraakt != true)) {
if (level.ouders == true) {
var _local7 = game.raftMcs[1].ouders;
if (_local7.hitTest(projectiel.mc)) {
_local7.play();
}
}
if ((projectiel.noColl != negerObj) && (negerObj.noColl != projectiel)) {
var _local4 = false;
var _local12 = false;
var _local5 = false;
if (projectiel.idNm == "ammo_viking") {
var _local6 = projectiel.mc.hittest;
} else {
var _local6 = projectiel.mc;
}
if (negerObj.mc.hittest_hoofd.hitTest(_local6)) {
if (negerObj.mc.hittest_top.hitTest(_local6)) {
_local4 = true;
}
_local5 = true;
game.bloed.hitMasker = true;
} else if (negerObj.mc.hittest_lijf.hitTest(_local6)) {
_local12 = true;
_local5 = true;
game.bloed.hitMasker = true;
}
if (_local5 == true) {
projectiel.mannetjeGeraakt = true;
negerObj.geraakt = true;
if ((projectiel.type == "rocket") || (projectiel.type == "explosiefProjectiel")) {
createExplosion(projectiel);
explodeCollisions(projectiel);
} else if (projectiel.type == "grenade") {
projectiel.rot = 0;
projectiel.timesHitAnything++;
speelSimpelSFX("grenade_collision");
} else {
speelSimpelSFX("snowball_hit");
}
if (negerObj.opponent == false) {
playVoice("auw");
} else if (projectiel.timesHitAnything == 0) {
if (_local4 == true) {
playVoice("headshot");
} else {
playVoice("good_shot");
}
}
cannonBallToFollow = negerObj;
projectiel.noColl = negerObj;
negerObj.noColl = projectiel;
projectiel.negerGeraakt = true;
speelSFX("grenade_collision");
if (_local4 == true) {
var _local11 = projectiel.vx * 0.6;
if (negerObj.opponent != true) {
_local11 = _local11 / 2;
}
var _local9 = Math.abs(projectiel.vy * 0.4) + 0.6;
if (projectiel.explosief == true) {
trace("minder damage ");
_local11 = _local11 / 3.5;
_local9 = _local9 / 3.5;
}
negerObj.vx = negerObj.vx + _local11;
negerObj.vy = negerObj.vy - _local9;
projectiel.vx = projectiel.vx * 0.4;
var _local10 = Math.abs(projectiel.vx);
projectiel.vy = projectiel.vy - (_local10 + (Math.random() * _local10));
} else {
var _local11 = projectiel.vx * 0.5;
var _local9 = Math.abs(projectiel.vy * 0.6) + 2;
if (projectiel.explosief == true) {
trace("minder damage ");
_local11 = _local11 / 3.5;
_local9 = _local9 / 3.5;
}
negerObj.vx = negerObj.vx + _local11;
negerObj.vy = negerObj.vy - _local9;
if (negerObj.vy > 0) {
negerObj.vy = negerObj.vy * -1;
}
projectiel.vx = projectiel.vx * (-0.15 - (Math.random() * 0.2));
projectiel.vy = projectiel.vy * 0.2;
var _local8 = Math.abs(projectiel.vy);
projectiel.vy = projectiel.vy + (_local8 / 3);
projectiel.vy = projectiel.vy - (Math.random() * _local8);
projectiel.vy = projectiel.vy - (Math.random() * (projectiel.vx / 2));
}
var _local3 = Math.abs(negerObj.vx) + Math.abs(negerObj.vy);
if (negerObj.opponent != true) {
_local3 = _local3 * 2;
} else {
_local3 = _local3 * 1.3;
}
if (level.opponent == "savage") {
if (negerObj.opponent != true) {
trace(penguin.mc + " SAVAGE PIJLEN rustig aan");
_local3 = _local3 * 0.09;
}
}
setDamage(negerObj, _local3);
if (_local3 > minCollAnim) {
hitPenguin(negerObj);
}
if (_local3 > minCollAnim) {
attachSter(projectiel);
} else {
trace("attach geen ster");
}
projectiel.rot = (Math.abs(projectiel.vx) + Math.abs(projectiel.vy)) / 2;
if ((projectiel.type == "rocket") || (projectiel.type == "explosiefProjectiel")) {
removeObject(projectiel);
}
}
}
}
};
collideObject = function (objA, objB, objAnr, objBnr) {
var _local4 = 0.9;
if ((objA.noColl != objB) && (objB.noColl != objA)) {
var _local27 = objA.p0.x;
var _local26 = objA.p0.y;
var _local7 = objB.p0.x - _local27;
var _local5 = objB.p0.y - _local26;
var _local3 = Math.sqrt((_local7 * _local7) + (_local5 * _local5));
if (_local3 < (objA.r + objB.r)) {
objA.noColl = objB;
objB.noColl = objA;
objA.geraakt = true;
objB.geraakt = true;
var _local10 = ball2ball(objB, objA);
var _local13 = (objB.r + objA.r) - _local10.len;
if (_local13 >= 0) {
objB.p1.x = objB.p1.x + (_local10.dx * _local13);
objB.p1.y = objB.p1.y + (_local10.dy * _local13);
}
var _local11 = objB.vx;
var _local9 = objA.vx;
var _local16 = objB.vy;
var _local8 = objA.vy;
var _local6 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local25 = Math.sqrt((_local11 * _local11) + (_local16 * _local16));
if ((objA.sb == true) && (objA.type != "grenade")) {
var _local17 = false;
if ((objA.type == "rocket") || (objA.type == "explosiefProjectiel")) {
_local17 = true;
createExplosion(objA);
explodeCollisions(objA);
} else {
speelSimpelSFX("snowball_hit");
}
if (objB.type == "hond") {
speelSimpelSFX("bark");
} else if (objB.opponent == true) {
if (objA.timesHitAnything == 0) {
playVoice("good_shot", true);
} else {
playVoice("auw", true);
}
} else {
playVoice("auw");
}
var _local15 = _local9 / 2;
var _local14 = (((_local6 * _local5) / _local3) * _local4) + (_local8 / 2);
if (_local17 == true) {
trace("minder damage ");
_local15 = _local15 / 3;
_local14 = _local14 / 3;
}
var _local29 = Math.abs(_local15);
objB.vx = objB.vx + _local15;
objB.vy = objB.vy + _local14;
removeObject(objA);
if (objB.vy > 0) {
objB.vy = objB.vy * -1;
}
cannonBallToFollow = objB;
var _local24 = _local29 + Math.abs(_local14);
setDamage(objB, _local24);
if (_local24 > minCollAnim) {
hitPenguin(objB);
}
objA.rot = (Math.abs(objA.vx) + Math.abs(objA.vy)) / 2;
} else if (objA.type == "grenade") {
objA.rot = 0;
if (objB.type == "hond") {
speelSimpelSFX("bark");
} else if (objB.opponent == true) {
if (objA.timesHitAnything == 0) {
playVoice("good_shot", true);
} else {
playVoice("auw", true);
}
} else {
playVoice("auw");
}
objA.timesHitAnything++;
speelSimpelSFX("grenade_collision");
var _local18 = ((((_local6 * _local7) / _local3) * _local4) / 2) + (_local9 / 2);
var _local19 = ((((_local6 * _local5) / _local3) * _local4) + (_local8 / 2)) / 4;
var _local28 = Math.abs(_local18);
objB.vx = _local18 / 4;
objB.vy = _local19;
objA.vx = -objB.vx;
objA.vy = objB.vy;
if (objB.vy > 0) {
objB.vy = objB.vy * -1;
}
var _local24 = _local28 + Math.abs(_local19);
setDamage(objB, _local24);
if (_local24 > minCollAnim) {
hitPenguin(objB);
}
objA.rot = (Math.abs(objA.vx) + Math.abs(objA.vy)) / 2;
} else {
var _local18 = (((_local6 * _local7) / _local3) * _local4) + (_local9 / 2);
var _local19 = (((_local6 * _local5) / _local3) * _local4) + (_local8 / 2);
objB.vx = _local18;
objB.vy = _local19;
var _local20 = ((-((_local25 * _local7) / _local3)) * _local4) + (_local11 / 2);
var _local21 = ((-((_local25 * _local5) / _local3)) * _local4) + (_local16 / 2);
objA.vx = _local20;
objA.vy = _local21;
trace((((((("collHond " + objA.type) + " ") + objB.type) + " ") + objA.vx) + " ") + objB.vx);
if ((game.turn % 2) == 0) {
var _local12 = 1;
} else {
var _local12 = 2;
}
trace((((((_local12 + " ") + objA.raft.raftnr) + " penguin ") + objB.raft.raftnr) + " ") + objA.p0.x);
var _local23 = Math.abs(_local20) + Math.abs(_local21);
var _local22 = Math.abs(_local18) + Math.abs(_local19);
if (objA.raft.raftnr != _local12) {
setDamage(objA, _local23);
if (_local23 > minCollAnim) {
if (objA.opponent != true) {
if (objA.type == "hond") {
speelSimpelSFX("bark");
} else {
playVoice("auw");
}
}
hitPenguin(objA);
}
}
if (objB.raft.raftnr != _local12) {
setDamage(objB, _local22);
if (_local22 > minCollAnim) {
if (objB.opponent != true) {
if (objB.type == "hond") {
speelSimpelSFX("bark");
} else {
playVoice("auw");
}
}
hitPenguin(objB);
}
}
}
}
}
};
handleCollisions = function () {
var _local3 = game.objects.length - 1;
while (_local3 >= 0) {
var _local1 = game.objects[_local3];
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local4 = game.objects[_local2];
if (_local4.raft == _local1.raft) {
collideObject(_local1, _local4, _local3, _local2);
}
_local2--;
}
_local2 = game.objectsOverig.length - 1;
while (_local2 >= 0) {
var _local4 = game.objectsOverig[_local2];
collideObject(_local1, _local4, _local3, _local2);
_local2--;
}
_local3--;
}
_local3 = 0;
while (_local3 < game.cannonBalls.length) {
var _local1 = game.cannonBalls[_local3];
var _local2 = game.objects.length - 1;
while (_local2 >= 0) {
var _local4 = game.objects[_local2];
hittestCannonBall_Char(_local1, _local4, _local3, _local2);
_local2--;
}
_local2 = game.objectsOverig.length - 1;
while (_local2 >= 0) {
var _local4 = game.objectsOverig[_local2];
collideObject(_local1, _local4, _local3, _local2);
_local2--;
}
if (_local1.haaiGeraakt != true) {
var _local5 = false;
var _local9 = false;
if (_local1.mc.hitTest(main.haaiContainer.haai.hittest)) {
_local5 = true;
}
if (_local5 == true) {
main.haaiContainer.haai.haaipic.play();
speelSimpelSFX("boing");
_local1.haaiGeraakt = true;
_local1.vx = _local1.vx * 0.9;
_local1.vy = _local1.vy * -1;
}
}
if (level.hippo == true) {
if (_local1.hippoGeraakt != true) {
var _local6 = false;
var _local8 = false;
if (_local1.mc.hitTest(main.raftsAchter.hippo.hittest1)) {
_local6 = true;
} else if (_local1.mc.hitTest(main.raftsAchter.hippo.hittest2)) {
_local8 = true;
}
var _local7 = false;
if (_local6 == true) {
main.raftsAchter.hippo.play();
speelSimpelSFX("boing");
_local1.hippoGeraakt = true;
_local1.vx = _local1.vx * 0.9;
_local1.vy = _local1.vy - (12 + (Math.random() * 10));
} else if (_local8 == true) {
if ((_local1.type == "rocket") || (_local1.type == "explosiefProjectiel")) {
_local7 = true;
}
speelSimpelSFX("grenade_collision");
_local1.hippoGeraakt = true;
_local1.vx = _local1.vx * -0.3;
_local1.vy = _local1.vy - (12 + (Math.random() * 10));
}
if (_local7 == true) {
createExplosion(_local1);
explodeCollisions(_local1);
removeObject(_local1);
}
}
}
_local3++;
}
};
initDoneButton = function () {
var _local4 = hud.tussenscherm.done;
_local4.onRelease = function () {
clearIntervals();
Mouse.removeListener(_global.mouseListener);
var _local4 = attachFadeToBlack();
_local4.onEnterFrame = function () {
if (this.done == true) {
_root.coolmath("go");
root.gotoAndStop("startLevel");
this.removeMovieClip();
}
};
};
_local4.onRollOver = function () {
this.gotoAndStop(2);
};
_local4.onReleaseOutside = function () {
this.gotoAndStop(1);
};
_local4.onRollOut = function () {
this.gotoAndStop(1);
};
};
attachFadeToBlack = function () {
var _local1 = root.attachMovie("fadeToBlack", "fadeToBlack", 100);
return(_local1);
};
buy = function (upgradeID) {
switch (upgradeID) {
case "rocket" :
_global.saveProgress.rockets++;
break;
case "grenade" :
_global.saveProgress.grenades++;
break;
case "upgrade" :
_global.saveProgress.raftUpgrade++;
}
var _local2 = getCost(upgradeID);
_global.saveProgress.money = _global.saveProgress.money - _local2;
trace(((" upgrade " + upgradeID) + " ") + _local2);
initTussenscherm(true);
};
checkCost = function (upgradeID) {
var _local3 = _global.saveProgress.money;
var _local2 = getCost(upgradeID);
var _local4 = true;
if (_local2 > _local3) {
_local4 = false;
}
trace((((("checkcost " + upgradeID) + " ") + _local2) + " ") + _local3);
return(_local4);
};
getCost = function (upgradeID) {
var _local1 = 0;
switch (upgradeID) {
case "rocket" :
_local1 = 500;
break;
case "grenade" :
_local1 = 300;
break;
case "upgrade" :
_local1 = 1500;
}
return(_local1);
};
checkNewRaft = function () {
var _local3 = _global.progress.level;
trace("level " + _global.progress.level);
var _local2 = 1;
if (_local3 < 2) {
_local2 = 2;
} else if (_local3 < 4) {
_local2 = 3;
} else if (_local3 < 11) {
_local2 = 4;
}
if (_global.saveProgress.raftUpgrade < _local2) {
var _local4 = true;
} else {
var _local4 = false;
}
return(_local4);
};
setUpgradeRollOverAndRelease = function (btnID) {
var _local3 = hud.tussenscherm[btnID];
_local3.knop.btnID = (_local3.grijs.btnID = btnID);
_local3.knop.onRelease = function () {
buy(this.btnID);
};
if (btnID == "upgrade") {
_local3.nieuweRaftGetoond = false;
_local3.knop.onRollOver = function () {
var _local3 = checkNewRaft();
trace("new raft " + _local3);
if (_local3 == true) {
maakRaftTussenscherm(_global.saveProgress.raftUpgrade + 1);
this.nieuweRaftGetoond = true;
}
this.gotoAndStop(2);
this._parent._parent.powerupTekst.gotoAndStop(this.btnID);
this._parent._parent.powerupTekst.cost.text = "Cost: " + getCost(this.btnID);
};
_local3.knop.onReleaseOutside = function () {
this.gotoAndStop(1);
if (this.nieuweRaftGetoond == true) {
maakRaftTussenscherm(_global.saveProgress.raftUpgrade);
this.nieuweRaftGetoond = false;
}
};
_local3.knop.onRollOut = function () {
this.gotoAndStop(1);
if (this.nieuweRaftGetoond == true) {
maakRaftTussenscherm(_global.saveProgress.raftUpgrade);
this.nieuweRaftGetoond = false;
}
};
} else {
_local3.knop.onRollOver = function () {
this.gotoAndStop(2);
this._parent._parent.powerupTekst.gotoAndStop(this.btnID);
this._parent._parent.powerupTekst.cost.text = "Cost: " + getCost(this.btnID);
};
_local3.knop.onReleaseOutside = function () {
this.gotoAndStop(1);
};
_local3.knop.onRollOut = function () {
this.gotoAndStop(1);
};
}
};
setReleaseAndRollOver = function (btnID) {
var _local2 = hud.tussenscherm[btnID];
_local2.knop.btnID = (_local2.buy.btnID = btnID);
_local2.knop.onRelease = function () {
setPowerUp(this.btnID);
};
_local2.knop.onRollOver = function () {
trace(this);
this.gotoAndStop(2);
};
_local2.knop.onReleaseOutside = function () {
this.gotoAndStop(1);
};
_local2.knop.onRollOut = function () {
this.gotoAndStop(1);
};
};
initTussenscherm = function (optionUpdate) {
initDoneButton();
var _local3 = hud.tussenscherm;
_local3.money.text = "credits: " + _global.saveProgress.money;
_local3.grenades_left.text = _global.saveProgress.grenades;
_local3.rockets_left.text = _global.saveProgress.rockets;
var _local4 = "level" + _global.progress.level;
_local3.comingup.rafts.gotoAndStop(_local4);
updateHud();
var _local6 = checkCost("rocket");
if (_global.saveProgress.rockets >= 2) {
_local6 = false;
}
if (_local6 == false) {
_local3.rocket.gotoAndStop(2);
_local3.rocket.grijs.cost.text = "cost: " + getCost("rocket");
} else {
_local3.rocket.gotoAndStop(1);
setUpgradeRollOverAndRelease("rocket");
_local3.rocket.knop.cost.text = "cost: " + getCost("rocket");
}
_local6 = checkCost("grenade");
if (_global.saveProgress.grenades >= 2) {
_local6 = false;
}
if (_local6 == false) {
_local3.grenade.gotoAndStop(2);
_local3.grenade.grijs.cost.text = "cost: " + getCost("grenade");
} else {
_local3.grenade.gotoAndStop(1);
setUpgradeRollOverAndRelease("grenade");
_local3.grenade.knop.cost.text = "cost: " + getCost("grenade");
}
var _local5 = checkNewRaft();
_local6 = checkCost("upgrade");
if ((_local6 == false) || (_local5 == false)) {
_local3.upgrade.gotoAndStop(2);
_local3.upgrade.grijs.cost.text = "cost: " + getCost("upgrade");
} else {
_local3.upgrade.gotoAndStop(1);
setUpgradeRollOverAndRelease("upgrade");
_local3.upgrade.knop.cost.text = "cost: " + getCost("upgrade");
}
_local3.exit.exit.onRelease = function () {
exitGame();
delete this.onRelease;
};
};
initYesNo = function (mc) {
mc.gotoAndStop(2);
trace((mc + " ") + mc.yes);
mc.yes.onRelease = function () {
_root.score = _global.progress.points;
var _local3 = hud.attachMovie("box10SubmitTussenscherm", "mcHS", 0);
_local3.exit.onRelease = function () {
exitGame();
};
hud.tussenscherm.removeMovieClip();
_local3._x = 320;
_local3._y = 240;
};
mc.no.onRelease = function () {
exitGame();
};
};
_global.startHighscores = function (clip, score) {
trace((("start scores " + clip) + " ") + score);
setOnLoads();
var _local2 = "?rand=" + random(100);
trace(_global.freeversion + " free");
if (_global.freeversion == true) {
highScoresObj = {playerScore:score, mc:clip, path:"", verwerkFile:"http://www.bubblebox.com/includes/highscores/verwerk_score2007.php" + _local2, get_topFile:"http://www.bubblebox.com/includes/highscores/get_top2007.php" + _local2};
} else {
highScoresObj = {playerScore:score, mc:clip, path:"", verwerkFile:"/includes/highscores/verwerk_score2007.php" + _local2, get_topFile:"/includes/highscores/get_top2007.php" + _local2};
}
setHS_panel(1);
trace(((clip + " ") + score) + " start hs");
};
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;
trace((("stappen " + stap) + " ") + highscores);
if (stap == 1) {
trace("stap 1 " + highscores);
trace(_global.game_id + " gamID");
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 () {
exitGame();
};
} else if (stap == 3) {
highscores.score.text = highScoresObj.playerScore;
highscores.message.text = "Please enter your name";
if (_global.progressie.naam != null) {
highscores.name.text = _global.progressie.naam;
}
highscores.submit.onRelease = function () {
if (highscores.name.text != "") {
insertRecord(highScoresObj.playerScore, highscores.name.text, _global.game_id);
_global.progressie.naam = highscores.name.text;
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 () {
exitGame();
};
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 () {
var _local2 = (("http://www.bubblebox.com/showscores.php?game_id=" + _global.game_id) + "&cache=") + random(100);
getURL (_local2, "_blank");
exitGame();
};
}
};
_global.freeversion = true;
Frame 7
_global.sound = this.createEmptyMovieClip("soundContainer", 0);
initSounds();
savedData = {};
_global.saveProgress = savedData;
if (_global.saveProgress.level == null) {
_global.saveProgress.level = 1;
}
_global.quiet = false;
_global.game_id = 792;
_global.countTurns = 0;
_root.memProgressCM = 0;
_root.coolmath = function (mathType, passLevel) {
var _local3 = _global.saveProgress.level;
if (mathType == "fromMenu") {
flash.external.ExternalInterface.call("cmgGameEvent", "start");
trace("ExxxxxxxxxxxxxxxxxxxxxxxxternalInterface.call(cmgGameEvent, start)");
} else if (mathType == "go") {
if (_root.memProgressCM == _local3) {
flash.external.ExternalInterface.call("cmgGameEvent", "replay", _local3);
trace("ExternalInterface.call(cmgGameEvent, replay" + _local3);
} else {
flash.external.ExternalInterface.call("cmgGameEvent", "start", _local3);
trace("ExternalInterface.call(cmgGameEvent, start" + _local3);
}
}
_root.memProgressCM = _local3;
};
Frame 8
stop();
_global.saveProgress.flush();
initMenu(1);
Frame 9
stop();
screenW = 550;
root = this;
if (_global.progress.lives < 0) {
this.overview.start_game._visible = false;
var gameOver = this.overview.attachMovie("mcGameOver", "mcGameOver", this.overview.getNextHighestDepth());
gameOver._x = screenW / 2;
gameOver._y = 100;
gameOver.onRelease = function () {
this.removeMovieClip();
attachHighScores();
};
} else if (_global.progress.level > 9) {
this.overview.start_game._visible = false;
var gameComplete = this.overview.attachMovie("mcGameComplete", "mcGameComplete", this.overview.getNextHighestDepth());
gameComplete._x = screenW / 2;
gameComplete._y = 100;
var bonus = (_global.progress.lives * 5000);
gameComplete.lives = ((("bonus: " + bonus) + " points (") + _global.progress.lives) + " lives left)";
gameComplete.onRelease = function () {
this.removeMovieClip();
attachHighScores();
};
} else {
this.overview.start_game._visible = true;
this.overview.start_game.onRelease = function () {
this._parent._parent.gotoAndStop("startgame");
};
}
attachHighScores = function () {
_global.inGame = false;
var _local3 = this.overview.attachMovie("mcHighScores", "mcHighScores", this.overview.getNextHighestDepth());
_local3._x = screenW / 2;
_local3._y = 100;
trace(_global.progress.level + " level");
var _local4 = Math.round(_global.progress.points);
if (_global.progress.level > 9) {
_local4 = _local4 + (_global.progress.lives * 5000);
this.overview.mcPoints.points = "total score: " + _local4;
}
_local3.totalPoints = _local4;
_local3.score = ("your score: " + _local4) + " points";
_local3.click_to_submit.onRelease = function () {
root.gotoAndStop("begin");
};
};
this.overview.mcExit.onRelease = function () {
this._parent._parent.gotoAndStop("begin");
};
var leftText = _global.progress.lives;
if (leftText < 0) {
leftText = 0;
}
overview.penguinsLeft.left = "x " + leftText;
overview.mcPoints.points = "total score: " + Math.round(_global.progress.points);
var i = 1;
while (i < 11) {
if (i > _global.progress.level) {
this.overview["l_" + i].gotoAndStop("alpha");
} else if (i == _global.progress.level) {
this.overview["l_" + i].play();
} else {
this.overview["l_" + i].gotoAndStop("white");
}
i++;
}
Frame 10
stop();
loopBtns = function () {
var _local3 = 1;
while (_local3 < 10) {
if (_local3 > _global.saveProgress.level) {
this.overview["rock_" + _local3].gotoAndStop("locked");
this.overview["rock_" + _local3].onRelease = function () {
_global.saveProgress.level = int(this._name.split("_")[1]);
loopBtns();
};
} else {
this.overview["rock_" + _local3].gotoAndStop(_local3);
this.overview["rock_" + _local3].onRelease = function () {
_global.progress.level = int(this._name.split("_")[1]);
this._parent._parent.play();
_global.countTurns++;
};
this.overview["rock_" + _local3].onRollOver = function () {
this.borderMc.play();
};
this.overview["rock_" + _local3].onRollOut = function () {
this.borderMc.gotoAndStop(1);
};
this.overview["rock_" + _local3].onReleaseOutside = function () {
this.borderMc.gotoAndStop(1);
};
}
this.overview["rock_" + _local3].borderMc.gotoAndStop(1);
_local3++;
}
};
this.overview.mcExit.onRelease = function () {
this._parent._parent.gotoAndStop("begin");
};
loopBtns();
Frame 11
stop();
startIntro();
Frame 12
stop();
start();
Frame 13
startTussenscherm();
trace(" rootframe");
Frame 14
stop();
trace(" doe Entro");
Frame 15
startGameComplete();
Symbol 18 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 23 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 28 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 29 MovieClip [clouds] Frame 1
this.gotoAndStop(random(4) + 1);
Symbol 48 MovieClip Frame 75
this._parent.play();
Symbol 50 MovieClip Frame 1
this._visible = false;
Symbol 60 MovieClip [mask] Frame 41
stop();
this.klaar = true;
Symbol 179 MovieClip [broer_beginTekst] Frame 1
stop();
Symbol 181 MovieClip [fadeToBlack] Frame 20
stop();
this.done = true;
Symbol 184 MovieClip [mcDeductPoints] Frame 1
this.count = 10;
this.onEnterFrame = function () {
this._y = this._y - 1;
if (this.count <= 0) {
this._alpha = this._alpha - 4;
if (this._alpha <= 10) {
this.removeMovieClip();
}
} else {
this.count--;
}
};
Symbol 187 MovieClip [mcFlits] Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 190 MovieClip [mcGrenade] Frame 1
stop();
Symbol 196 MovieClip [mcSnowball] Frame 1
stop();
Symbol 198 MovieClip [mcSter] Frame 1
this.onEnterFrame = function () {
this._xscale = this._xscale - 20;
this._yscale = this._yscale - 20;
if (this._xscale <= 0) {
this.removeMovieClip();
}
};
Symbol 201 MovieClip [mcTurtle] Frame 1
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
this._visible = false;
Symbol 218 MovieClip [haai] Frame 1
stop();
Symbol 220 MovieClip Frame 1
this._visible = false;
Symbol 230 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Symbol 232 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 220 MovieClip "mcHighscores" in Symbol 232 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 232 MovieClip Frame 2
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 232 MovieClip Frame 3
stop();
Symbol 236 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 237 MovieClip [mcHS] Frame 1
stop();
Instance of Symbol 232 MovieClip "comHighscores" in Symbol 237 MovieClip [mcHS] Frame 1
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "raftwars";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 259 MovieClip [hippo] Frame 1
stop();
Symbol 259 MovieClip [hippo] Frame 33
this.gotoAndStop(1);
Symbol 261 MovieClip Frame 1
this._visible = false;
Symbol 275 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 292 MovieClip [mcStopLoop] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 296 MovieClip [mcShootCannon] Frame 1
calcPower = function (power) {
var _local1 = power * (1 + ((power / 90) * 3));
_local1 = _local1 * 0.22;
return(_local1);
};
getDist = function (mc1, mc2) {
var _local2 = mc2._x - mc1._x;
var _local1 = mc2._y - mc1._y;
return(Math.round(Math.sqrt((_local2 * _local2) + (_local1 * _local1))));
};
getMouseDist = function (mc1) {
var _local2 = _xmouse - mc1._x;
var _local1 = _ymouse - mc1._y;
return(Math.round(Math.sqrt((_local2 * _local2) + (_local1 * _local1))));
};
move = function () {
var _local8 = parentMc._xmouse - point._x;
var _local7 = parentMc._ymouse - point._y;
var _local3 = Math.atan2(_local7, _local8);
var _local5 = getMouseDist(point);
var _local9 = getDist(handle, point);
if (_local5 > handleLength) {
var _local6 = handleLength - _local5;
handle._x = parentMc._xmouse + (Math.cos(_local3) * _local6);
handle._y = parentMc._ymouse + (Math.sin(_local3) * _local6);
} else if (_local5 < clearHandle) {
var _local10 = true;
handle._x = point._x + (Math.cos(_local3) * clearHandle);
handle._y = point._y + (Math.sin(_local3) * clearHandle);
} else {
handle._x = parentMc._xmouse;
handle._y = parentMc._ymouse;
}
var _local2 = ((Math.PI + _local3) * 180) / Math.PI;
if (_local2 < 270) {
if (_local2 < 135) {
_local2 = 360;
} else {
_local2 = 270;
}
}
handle._rotation = _local2;
_global.cannonRotation = _local2;
var _local4 = _local9;
if (_local4 < 10) {
_local4 = 10;
}
_global.cannonPower = calcPower(_local4);
if (handle._x > point._x) {
handle._x = point._x;
if (_local2 != 360) {
if ((handle._y - point._y) < clearHandle) {
handle._y = point._y + clearHandle;
}
}
}
if (handle._y < point._y) {
handle._y = point._y;
if ((point._x - handle._x) < clearHandle) {
handle._x = point._x - clearHandle;
}
}
};
press = function () {
this.onMouseMove = move;
};
release = function () {
delete this.onMouseMove;
};
handle.onPress = press;
handle.onRelease = release;
handle.onReleaseOutside = release;
handle.move = move;
clearHandle = 40;
handleLength = 132;
parentMc = this;
_global.cannonRotation = 315;
var d = getDist(handle, point);
_global.cannonPower = calcPower(d);
Symbol 303 MovieClip Frame 1
Symbol 336 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 339 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 344 MovieClip [gameComplete] Frame 1
stop();
this.exit.onRelease = function () {
this._parent._parent.gotoAndStop("begin");
};
this.submit.onRelease = function () {
this._parent.gotoAndStop(2);
};
var aantTries = _global.progress.tries;
if (aantTries < 11) {
aantTries = 11;
}
var triesScore = ((25 - aantTries) * 600);
if (triesScore < 0) {
triesScore = 0;
}
this.triesScore = triesScore;
var totalPoints = (_global.progress.points + triesScore);
this.score.text = "score: " + _global.progress.points;
this.tries.text = ((("nr of tries: " + _global.progress.tries) + "-> ") + triesScore) + " bonus points";
this.total.text = "total score: " + totalPoints;
_root.score = totalPoints;
Symbol 344 MovieClip [gameComplete] Frame 2
stop();
_root.score = _global.progress.points + this.triesScore;
this.exit.onRelease = function () {
this._parent._parent.gotoAndStop("begin");
};
Symbol 348 MovieClip [ammo_chinees] Frame 1
stop();
Symbol 351 MovieClip [ammo_gang] Frame 1
stop();
Symbol 354 MovieClip [ammo_neighbour] Frame 1
stop();
Symbol 355 MovieClip [ammo_ouder] Frame 1
stop();
Symbol 356 MovieClip [ammo_pirate] Frame 1
stop();
Symbol 359 MovieClip [ammo_savage] Frame 1
stop();
Symbol 366 MovieClip Frame 1
this._visible = false;
Symbol 367 MovieClip Frame 1
stop();
this.animDone = false;
Symbol 367 MovieClip Frame 14
stop();
this.animDone = true;
Symbol 377 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 379 MovieClip Frame 9
this.timesplayed++;
Symbol 381 MovieClip Frame 1
stop();
this.animDone = false;
Symbol 381 MovieClip Frame 15
stop();
this.animDone = true;
Symbol 385 MovieClip Frame 1
stop();
Symbol 392 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 1
this._visible = false;
Symbol 399 MovieClip Frame 1
this.actief = true;
this.nogEenKeer = true;
this.onEnterFrame = function () {
var _local2 = true;
if (this.actief == false) {
if (this.nogEenKeer == true) {
this.nogEenKeer = false;
} else {
_local2 = false;
}
} else {
this.nogEenKeer = true;
}
if (_local2 == true) {
this.clear();
this.lineStyle(1, "0x5B3C11");
this.moveTo(punt1._x, punt1._y);
this.lineTo(pijl._x, pijl._y);
this.lineTo(punt2._x, punt2._y);
}
};
Symbol 403 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 403 MovieClip Frame 9
this.timesplayed++;
Symbol 413 MovieClip Frame 1
stop();
Symbol 414 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
Symbol 431 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 439 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 440 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
this.frameNr = this._parent.frameNr;
Symbol 443 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 443 MovieClip Frame 9
this.timesplayed++;
Symbol 447 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 447 MovieClip Frame 9
this.timesplayed++;
Symbol 452 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 457 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 465 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 477 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 480 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 480 MovieClip Frame 9
this.timesplayed++;
Symbol 487 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 490 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 490 MovieClip Frame 9
this.timesplayed++;
Symbol 493 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 494 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
this.frameNr = this._parent.frameNr;
Symbol 508 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 519 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 520 MovieClip Frame 1
stop();
holder._visible = false;
Symbol 520 MovieClip Frame 13
if (Math.random() > 0.5) {
this.gotoAndStop(1);
}
Symbol 531 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 541 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 551 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 558 MovieClip Frame 1
stop();
holder._visible = false;
Symbol 558 MovieClip Frame 13
if (Math.random() > 0.5) {
this.gotoAndStop(1);
}
Symbol 566 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 579 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 592 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 599 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 600 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
this.frameNr = this._parent.frameNr;
Symbol 602 MovieClip Frame 1
this._visible = false;
Symbol 605 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 606 MovieClip Frame 1
stop();
this.gotoAndStop(_global.baddieID);
this.frameNr = this._parent.frameNr;
Symbol 609 MovieClip Frame 1
this._visible = false;
this.cacheAsBitmap = true;
Symbol 610 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 614 MovieClip Frame 9
stop();
this.tel = 30 + random(80);
this.onEnterFrame = function () {
this.tel--;
if (this.tel <= 0) {
this.play();
}
};
Symbol 614 MovieClip Frame 15
this._parent.gotoAndStop("stand");
Symbol 615 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 615 MovieClip Frame 9
this.timesplayed++;
Symbol 617 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
Symbol 618 MovieClip Frame 1
this.gotoAndStop(_global.baddieID);
Symbol 621 MovieClip Frame 1
stop();
Symbol 621 MovieClip Frame 2
this.weapon._visible = false;
Symbol 621 MovieClip Frame 3
this.weapon._visible = false;
Symbol 626 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 647 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 659 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 662 MovieClip Frame 1
this.gotoAndStop(this._parent.frameNr);
Symbol 663 MovieClip Frame 1
stop();
if (this.timesplayed == null) {
this.timesplayed = 0;
}
if ((this.timesplayed < 2) && (Math.random() > 0.6)) {
this.timesplayed++;
play();
} else {
this.timesplayed = 0;
}
Symbol 663 MovieClip Frame 9
this.timesplayed++;
Symbol 664 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 669 MovieClip Frame 9
stop();
Symbol 690 MovieClip Frame 1
this.cacheAsBitmap = true;
this.gotoAndStop(this._parent.frameNr);
Symbol 692 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 703 MovieClip Frame 1
this.gotoAndStop(random(3) + 1);
Symbol 704 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 704 MovieClip Frame 81
this._parent._parent.gotoAndStop("stand");
Symbol 705 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 706 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 715 MovieClip Frame 1
stop();
Symbol 716 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 716 MovieClip Frame 34
this.ijsje.gotoAndStop(2);
Symbol 716 MovieClip Frame 62
this.ijsje.gotoAndStop(3);
Symbol 716 MovieClip Frame 97
this.ijsje.gotoAndStop(4);
Symbol 716 MovieClip Frame 145
this._parent._parent.gotoAndStop("stand");
Symbol 723 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 723 MovieClip Frame 180
this._parent._parent.gotoAndStop("stand");
Symbol 728 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 728 MovieClip Frame 180
this._parent._parent.gotoAndStop("stand");
Symbol 745 MovieClip Frame 25
stop();
Symbol 748 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 748 MovieClip Frame 210
this._parent._parent.gotoAndStop("stand");
Symbol 756 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 756 MovieClip Frame 180
this._parent._parent.gotoAndStop("stand");
Symbol 765 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
Symbol 765 MovieClip Frame 199
this._parent._parent.gotoAndStop("stand");
Symbol 766 MovieClip Frame 1
this.frameNr = this._parent.frameNr;
var aantFrames = 7;
var r = (random(aantFrames) + 1);
if (r == _global.simonSpecialFrame) {
r = r + 1;
if (r > aantFrames) {
r = 1;
}
}
_global.simonSpecialFrame = r;
this.gotoAndStop(r);
Symbol 767 MovieClip Frame 1
stop();
Symbol 804 MovieClip Frame 1
stop();
Symbol 806 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 1
this.breath = {x:this._x, y:this._y, mc:this, t:0, a:3.2, T:4, w:2.0943951023932, bPos:this._y};
this.onEnterFrame = function () {
this._y = this.breath.bPos + (this.breath.a * Math.sin(this.breath.w * this.breath.t));
this.breath.t = this.breath.t + 0.0454545454545455;
};
Symbol 854 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 861 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 862 MovieClip [mcControlCenter] Frame 1
stop();
_global.maakVakjeZee(this.seaContainer, 670, 15386624, 20, 6);
Symbol 872 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 875 MovieClip [mcHighScores] Frame 1
Selection.setFocus("input_name");
Symbol 887 MovieClip Frame 28
this._parent.readyForClick = true;
Symbol 887 MovieClip Frame 141
stop();
Symbol 892 MovieClip [mcBeginMessage] Frame 1
stop();
Symbol 895 MovieClip Frame 1
stop();
Symbol 895 MovieClip Frame 28
this._parent.readyForClick = true;
Symbol 895 MovieClip Frame 140
stop();
Symbol 904 MovieClip [mcFinishMessage] Frame 1
stop();
Symbol 914 MovieClip [oppGrrr] Frame 1
this.gotoAndStop(random(4) + 1);
Symbol 918 MovieClip Frame 1
this._visible = false;
Symbol 919 MovieClip Frame 1
this._visible = false;
Symbol 949 MovieClip [mcRaft] Frame 1
stop();
Symbol 966 MovieClip [mcRock1] Frame 1
stop();
Symbol 966 MovieClip [mcRock1] Frame 2
stop();
Symbol 968 MovieClip [mcRock1_2] Frame 1
stop();
this.dobber = false;
Symbol 971 MovieClip [mcRock1_3] Frame 1
stop();
Symbol 971 MovieClip [mcRock1_3] Frame 2
stop();
Symbol 988 MovieClip [mcRock2] Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 988 MovieClip [mcRock2] Frame 2
stop();
Symbol 989 MovieClip [mcRock3] Frame 1
stop();
Symbol 989 MovieClip [mcRock3] Frame 2
stop();
Symbol 990 MovieClip [mcRock3_2] Frame 1
stop();
Symbol 990 MovieClip [mcRock3_2] Frame 2
stop();
Symbol 991 MovieClip [mcRock3_3] Frame 1
stop();
this.dobber = false;
Symbol 1005 MovieClip [mcRock4] Frame 1
this.dobber = false;
stop();
Symbol 1005 MovieClip [mcRock4] Frame 2
stop();
Symbol 1008 MovieClip [mcRock4_2] Frame 1
stop();
Symbol 1008 MovieClip [mcRock4_2] Frame 2
stop();
Symbol 1013 MovieClip [mcRock5] Frame 1
stop();
Symbol 1013 MovieClip [mcRock5] Frame 2
stop();
Symbol 1073 MovieClip Frame 1
stop();
this.cacheAsBitmap = true;
Symbol 1074 MovieClip [mcRock6] Frame 1
this.dobber = false;
this.cacheAsBitmap = true;
stop();
Symbol 1074 MovieClip [mcRock6] Frame 2
stop();
Symbol 1077 MovieClip [mcRock6_2] Frame 1
stop();
Symbol 1077 MovieClip [mcRock6_2] Frame 2
stop();
Symbol 1080 MovieClip [mcRock7] Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 1080 MovieClip [mcRock7] Frame 2
stop();
Symbol 1088 MovieClip [mcRock7_2] Frame 1
stop();
Symbol 1088 MovieClip [mcRock7_2] Frame 2
stop();
Symbol 1089 MovieClip [mcRock8] Frame 1
this.dobber = false;
this.cacheAsBitmap = true;
stop();
Symbol 1089 MovieClip [mcRock8] Frame 2
stop();
Symbol 1090 MovieClip [mcRock8_2] Frame 1
stop();
Symbol 1090 MovieClip [mcRock8_2] Frame 2
stop();
Symbol 1092 MovieClip [mcRock8_3] Frame 1
stop();
Symbol 1092 MovieClip [mcRock8_3] Frame 2
stop();
Symbol 1093 MovieClip [mcRock9] Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 1093 MovieClip [mcRock9] Frame 2
stop();
Symbol 1094 MovieClip [mcRock9_2] Frame 1
stop();
Symbol 1094 MovieClip [mcRock9_2] Frame 2
stop();
Symbol 1096 MovieClip [mcRock9_3] Frame 1
stop();
Symbol 1096 MovieClip [mcRock9_3] Frame 2
stop();
Symbol 1110 MovieClip [mcRock10] Frame 1
this.dobber = false;
stop();
Symbol 1110 MovieClip [mcRock10] Frame 2
stop();
Symbol 1111 MovieClip [mcRock10_2] Frame 1
stop();
Symbol 1111 MovieClip [mcRock10_2] Frame 2
stop();
Symbol 1117 MovieClip [mcRock11] Frame 1
this.dobber = false;
this.cacheAsBitmap = true;
stop();
Symbol 1117 MovieClip [mcRock11] Frame 2
stop();
Symbol 1131 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1188 MovieClip [simon_beginTekst] Frame 1
stop();
Symbol 1195 MovieClip [mcExpCloud] Frame 33
this.remove = true;
stop();
Symbol 1207 MovieClip [mcExpFire1] Frame 62
this.remove = true;
stop();
Symbol 1214 MovieClip [mcExpFire2] Frame 66
this.remove = true;
stop();
Symbol 1215 MovieClip [mcExpSmoke] Frame 49
this.remove = true;
stop();
Symbol 1221 MovieClip [mcSmoke] Frame 9
stop();
Symbol 1228 MovieClip [mcSnowflake] Frame 1
stop();
Symbol 1241 MovieClip [mcSplash] Frame 1
stop();
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
this._rotation = this._rotation + ((90 - this._rotation) / 20);
};
this.gotoAndStop(random(5) + 1);
Symbol 1249 MovieClip Frame 1
stop();
Symbol 1251 MovieClip Frame 1
stop();
var mcl_obj = new Object();
var myElements_array = [0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0, 0, 0, 1, 0];
var myColorMatrix_filter = (new flash.filters.ColorMatrixFilter(myElements_array));
this.filters = [myColorMatrix_filter];
Symbol 1258 MovieClip Frame 1
stop();
Symbol 1261 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "pirate";
Symbol 1262 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "chinees";
Symbol 1263 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
_global.baddieID = "pirate";
Symbol 1264 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "viking";
Symbol 1265 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "savage";
Symbol 1266 MovieClip Frame 1
this.nr4.penguin.frameNr = 4;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "neighbour";
Symbol 1267 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
_global.baddieID = "gang";
Symbol 1268 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr4.penguin.frameNr = 4;
_global.baddieID = "neighbour";
Symbol 1269 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
this.nr4.penguin.frameNr = 4;
_global.baddieID = "gang";
Symbol 1270 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
this.nr3.penguin.frameNr = 3;
this.nr4.penguin.frameNr = 4;
_global.baddieID = "viking";
Symbol 1271 MovieClip Frame 1
this.nr1.penguin.frameNr = 1;
this.nr2.penguin.frameNr = 2;
_global.baddieID = "ouder";
Symbol 1282 MovieClip Frame 1
stop();
Symbol 1284 MovieClip Frame 1
stop();
var mcl_obj = new Object();
var myElements_array = [0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0, 0, 0, 1, 0];
var myColorMatrix_filter = (new flash.filters.ColorMatrixFilter(myElements_array));
this.filters = [myColorMatrix_filter];
Symbol 1289 MovieClip [tussenscherm] Frame 1
this.grenadePic.gotoAndStop(2);
this.rocketPic.gotoAndStop(3);
Symbol 1336 MovieClip Frame 1
this._visible = false;
Symbol 1336 MovieClip Frame 126
stop();
Symbol 1345 MovieClip Frame 1
stop();
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if ((this.tel % 5) == 0) {
if (Math.random() < 0.08) {
delete this.onEnterFrame;
this.play();
}
}
};
holder._visible = false;
Symbol 1345 MovieClip Frame 13
if (Math.random() > 0.5) {
this.gotoAndStop(1);
}
Symbol 1348 MovieClip Frame 77
stop();
Symbol 1354 MovieClip Frame 1
stop();
Symbol 1357 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
this._parent._parent.gotoAndStop("startLevel");
};
Symbol 1364 MovieClip Frame 14
stop();
Symbol 1374 MovieClip Frame 14
stop();
Symbol 1375 MovieClip Frame 153
this.ballon.gotoAndStop(1);
Symbol 1375 MovieClip Frame 327
this.ballon.gotoAndStop(2);
Symbol 1375 MovieClip Frame 459
this.ballon.gotoAndStop(3);
Symbol 1375 MovieClip Frame 514
stop();
this._parent.fade._alpha = 0;
this._parent.fade.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
delete this.onEnterFrame;
this._parent.play();
}
};
Symbol 1405 MovieClip Frame 1
stop();
Symbol 1405 MovieClip Frame 40
stop();
this.tel = 70;
this.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else {
delete this.onEnterFrame;
this._parent.vakje2.play();
}
};
Symbol 1407 MovieClip Frame 1
this.simon.stop();
this.brother.stop();
this.simon.penguin.bazooka._rotation = this.simon.penguin.bazooka._rotation - 38;
this.simon.penguin.bazooka._x = this.simon.penguin.bazooka._x + 8;
this.brother.penguin.bazooka._rotation = this.brother.penguin.bazooka._rotation - 10;
this.brother.penguin.bazooka._x = this.brother.penguin.bazooka._x + 8;
this.simon.penguin.frameNr = 2;
this.brother.penguin.frameNr = 1;
this.breath = {x:this._x, y:this._y, mc:this, t:0, a:1.5, T:4, w:Math.PI, bPos:this._y};
this.onEnterFrame = function () {
this._y = this.breath.bPos + (this.breath.a * Math.sin(this.breath.w * this.breath.t));
this.breath.t = this.breath.t + 0.0333333333333333;
};
Symbol 1410 MovieClip Frame 1
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
delete this.onEnterFrame;
}
};
Symbol 1417 MovieClip Frame 1
this.ro.gotoAndStop(1);
this.onRollOver = function () {
this.ro.play();
};
this.onRollOut = function () {
this.ro.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.ro.gotoAndStop(1);
};
Symbol 1418 MovieClip Frame 1
_global.maakVakjeZee(this.seaContainer, 670, 5606534, 24, 1.4);
_global.maakVakjeZee(this.seaContainer2, 670, 6132622, 30, 3);
stop();
Symbol 1418 MovieClip Frame 80
stop();
this._parent._parent.skip._visible = false;
this.go.onRelease = function () {
this._parent._parent._parent._parent.play();
};
Symbol 1436 MovieClip Frame 1
this.breath = {x:this._x, y:this._y, mc:this, t:0, a:3.2, T:4, w:2.0943951023932, bPos:this._y};
this.onEnterFrame = function () {
this._y = this.breath.bPos + (this.breath.a * Math.sin(this.breath.w * this.breath.t));
this.breath.t = this.breath.t + 0.0454545454545455;
};
Symbol 1441 MovieClip Frame 1
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
delete this.onEnterFrame;
}
};
Symbol 1442 MovieClip Frame 1
_global.maakVakjeZee(this.seaContainer, 370, 5606534, 12, 2);
_global.maakVakjeZee(this.seaContainer2, 370, 6132622, 16, 4);
stop();
Symbol 1442 MovieClip Frame 30
stop();
this.tel = 70;
this.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else {
delete this.onEnterFrame;
this._parent.vakje3.play();
}
};
Symbol 1445 MovieClip Frame 1
stop();
this.tel = 170;
this.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else if (this.textSquare._alpha > 0) {
this.textSquare._alpha = this.textSquare._alpha - 10;
} else {
delete this.onEnterFrame;
this.play();
}
};
Symbol 1445 MovieClip Frame 2
stop();
this.textSquare.gotoAndStop(2);
this.tel = 60;
this.textSquare._alpha = 0;
this.textSquare.stap = 1;
this.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else if (this.textSquare.stap == 1) {
if (this.textSquare._alpha < 100) {
this.textSquare._alpha = this.textSquare._alpha + 10;
} else {
this.tel = 170;
this.textSquare.stap = 2;
}
} else if (this.textSquare._alpha > 0) {
this.textSquare._alpha = this.textSquare._alpha - 10;
} else {
delete this.onEnterFrame;
this.play();
}
};
Symbol 1445 MovieClip Frame 3
stop();
this.fade._alpha = 0;
Symbol 1445 MovieClip Frame 4
stop();
this.onEnterFrame = function () {
if (this.mask.klaar == true) {
delete this.onEnterFrame;
this.vakjes.vak1.play();
}
};
Symbol 1482 MovieClip Frame 97
stop();
this.tel = 60;
this.onEnterFrame = function () {
if (this.tel <= 0) {
this._visible = false;
} else {
this.tel--;
}
};
Symbol 1496 MovieClip Frame 60
stop();
this.tel = 60;
this.onEnterFrame = function () {
if (this.tel <= 0) {
this._visible = false;
} else {
this.tel--;
}
};
Symbol 1498 MovieClip Frame 170
this._parent.play();
Symbol 1541 MovieClip Frame 1
stop();
Symbol 1559 MovieClip Frame 60
stop();
Symbol 1564 MovieClip Frame 60
stop();
Symbol 1567 MovieClip Frame 34
stop();
this.tel = 150;
this.onEnterFrame = function () {
if (this.tel <= 0) {
if (this._parent.fade._alpha < 100) {
this._parent.fade._alpha = this._parent.fade._alpha + 10;
} else {
this._parent.play();
}
this._visible = false;
} else {
this.tel--;
}
};
Symbol 1577 MovieClip Frame 64
stop();
Symbol 1581 MovieClip Frame 1
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
delete this.onEnterFrame;
}
};
Symbol 1582 MovieClip Frame 1
_global.maakVakjeZee(this.seaContainer, 670, 5606534, 24, 1.4);
_global.maakVakjeZee(this.seaContainer2, 670, 6132622, 30, 3);
stop();
Symbol 1582 MovieClip Frame 80
stop();
this._parent._parent.skip._visible = false;
this.go.onRelease = function () {
this._parent._parent._parent._parent.gotoAndStop("startLevel");
};
Symbol 1594 MovieClip Frame 45
stop();
Symbol 1595 MovieClip Frame 245
stop();
this._parent._parent._parent.vakje2.play();
Symbol 1596 MovieClip Frame 73
stop();
Symbol 1597 MovieClip Frame 1
_global.maakVakjeZee(this.seaContainer, 670, 5606534, 24, 4);
_global.maakVakjeZee(this.seaContainer2, 670, 6132622, 30, 6);
stop();
Symbol 1599 MovieClip Frame 1
stop();
Symbol 1599 MovieClip Frame 2
stop();
this.textSquare.gotoAndStop(1);
this.tel = 60;
this.textSquare._alpha = 0;
this.simon.gotoAndPlay(11);
this.ma.gotoAndPlay(11);
this.pa.gotoAndPlay(11);
this.textSquare.stap = 1;
this.onEnterFrame = function () {
if (this.tel > 0) {
this.tel--;
} else if (this.textSquare.stap == 1) {
if (this.textSquare._alpha < 100) {
this.textSquare._alpha = this.textSquare._alpha + 10;
} else {
this.tel = 300;
this.textSquare.stap = 2;
}
} else if (this.textSquare.stap == 2) {
if (this.textSquare._alpha > 0) {
this.textSquare._alpha = this.textSquare._alpha - 10;
} else {
this.textSquare.gotoAndStop(2);
this.textSquare.stap = 3;
}
} else if (this.textSquare.stap == 3) {
if (this.textSquare._alpha < 100) {
this.textSquare._alpha = this.textSquare._alpha + 10;
} else {
this.tel = 200;
this.textSquare.stap = 4;
}
} else if (this.textSquare.stap == 4) {
if (this.textSquare._alpha > 0) {
this.textSquare._alpha = this.textSquare._alpha - 10;
} else if (this.ma._currentframe == 11) {
delete this.onEnterFrame;
this.play();
}
}
};
Symbol 1599 MovieClip Frame 3
stop();
this.fade._alpha = 0;
Symbol 1599 MovieClip Frame 4
stop();
this.onEnterFrame = function () {
if (this.mask.klaar == true) {
delete this.onEnterFrame;
this.vakjes.vak1.play();
}
};