Frame 1
b1 = _root.getBytesLoaded();
b2 = _root.getBytesTotal();
tgPrel = 1 + Math.round((b1 * 100) / b2);
prel.gotoAndStop(tgPrel);
if (b1 >= b2) {
gotoAndPlay ("intro");
}
Frame 4
if (Math.round(b1 / 1024) <= 35) {
gotoAndPlay ("loop1");
}
Frame 5
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.tg: " + _root.tg);
if (_root.tg <= 9) {
_root.procent = "0" + _root.tg;
} else {
_root.procent = _root.tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 9
if (Math.round(b1 / 1024) <= 100) {
gotoAndPlay ("loop2");
}
Frame 11
_root.b1 = _root.getBytesLoaded();
_root.b2 = _root.getBytesTotal();
_root.tgPrel = 1 + Math.round((b1 * 100) / b2);
_root.tg = _root.tgPrel - 2;
trace("_root.TG: " + tgPrel);
if (_root.tgPrel <= 9) {
_root.procent = "0" + tg;
trace(_root.procent);
} else {
_root.procent = tg;
}
_root.prel.gotoAndStop(_root.tgPrel);
Frame 14
if (b1 < b2) {
gotoAndPlay ("loop3");
}
Frame 15
_root.procent = "--";
prel.gotoAndStop(100);
Frame 166
Frame 174
_root.sunet = true;
Frame 175
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 initVector(v, frompoints) {
if (_root.pauza == false) {
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);
}
}
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));
}
};
levelInit = function () {
if (_global.twoPlayer != true) {
switch (currentLevel) {
case 1 :
level = {mc1:"mcRaft", mc2:"mcRock1", rockLevel:true, rockets:0, grenades:0, par:5, mapWidth:1900 + random(300)};
break;
case 2 :
level = {mc1:"mcRaft", mc2:"mcRock2", rockLevel:true, rockets:2, grenades:0, par:4, mapWidth:2000 + random(400)};
break;
case 3 :
level = {mc1:"mcRaft", mc2:"mcRock3", rockLevel:true, rockets:1, grenades:3, par:5, mapWidth:2400 + random(400)};
break;
case 4 :
level = {mc1:"mcRaft", mc2:"mcRock4", rockLevel:true, rockets:1, grenades:3, par:5, mapWidth:2400 + random(500)};
break;
case 5 :
level = {mc1:"mcRaft", mc2:"mcRock5", rockLevel:true, rockets:1, grenades:3, par:6, mapWidth:2000 + random(600)};
break;
case 6 :
level = {mc1:"mcRaft", mc2:"mcRock6", rockLevel:true, rockets:1, grenades:2, par:5, mapWidth:2500 + random(500)};
break;
case 7 :
level = {mc1:"mcRaft", mc2:"mcRock7", rockLevel:true, rockets:0, grenades:2, par:6, mapWidth:2200 + random(500)};
break;
case 8 :
level = {mc1:"mcRaft", mc2:"mcRock8", rockLevel:true, rockets:1, grenades:2, par:6, mapWidth:2300 + random(600)};
break;
case 9 :
level = {mc1:"mcRaft", mc2:"mcRock9", rockLevel:true, rockets:2, grenades:3, par:7, mapWidth:2600 + random(400)};
}
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)};
}
level.player1 = {rockets:level.rockets, grenades:level.grenades};
level.player2 = {rockets:level.rockets, grenades:level.grenades};
}
};
startTitle = function () {
main = this.mcTitle.waveContainer;
seaContainer = main.createEmptyMovieClip("seaContainer", 1);
var _local2 = main.attachMovie("mcCoverPenguins", "mcCoverPenguins", 2);
seaContainer2 = main.createEmptyMovieClip("seaContainer2", 3);
main.seaTurn = 0;
seaContainer._x = (seaContainer2._x = 0);
seaContainer._y = 360;
seaContainer2._y = 374;
_local2._y = 382;
trace(_local2);
makeWave(seaContainer, 400, 4297421, 1.6, 0.1, 30, 550);
makeWave(seaContainer2, 400, 3177654, 2.4, 0.1, 50, 550);
main.onEnterFrame = function () {
if (this.seaTurn == 0) {
simWaveTitle(this.seaContainer);
this.seaTurn = 1;
} else {
simWaveTitle(this.seaContainer2);
this.seaTurn = 0;
}
};
simWave(main.seaContainer);
};
createPenguins = function (rockObj, xPosition, leftRight, optionAI) {
var _local11 = rockObj.mc;
for (var _local29 in _local11) {
var _local4 = _local11[_local29];
var _local8 = _local4._name;
var _local2 = _local8.split("_");
if (_local2[0] == "p") {
var _local1 = game.objects.length;
var _local3 = main.pinguinContainer.attachMovie("mcCharacter", "p" + _local1, _local1);
_local3.gotoAndStop(leftRight);
var _local7 = _local2[2];
if (_local2[3] == "high") {
var _local10 = true;
} else {
var _local10 = false;
}
if (_local2[4] == "noBB") {
var _local9 = true;
} else {
var _local9 = false;
}
game.objects[_local1] = {f:1, m:1, r:30, b:0.8, airf:0.99, arrayNr:_local1, mc:_local3.penguin, pose:_local7, raft:rockObj, speed:1.1, health:100, hitpoints:0, penguin:true, aimHigh:_local10, noBB:_local9};
var _local6 = xPosition + _local4._x;
var _local5 = game.raftLevel + _local4._y;
game.objects[_local1].p0 = {x:_local6, y:_local5 - 10};
game.objects[_local1].raftPos = {x:_local6, y:_local5 - 1};
game.objects[_local1].vx = 0;
game.objects[_local1].vy = 0;
_local3.penguin.bazooka._visible = false;
if (optionAI == true) {
game.objects[_local1].opponent = true;
}
}
}
};
start = function () {
root = this;
currentLevel = _global.progress.level;
levelInit();
sky = this.createEmptyMovieClip("skyContainer", 1);
if (_root.pauza == false) {
main = this.createEmptyMovieClip("mainContainer", 2);
}
hud = this.createEmptyMovieClip("hudContainer", 3);
whiteFlash = this.createEmptyMovieClip("whiteFlash", 4);
var _local7 = main.attachMovie(level.mc1, "raft1", 1);
var _local5 = main.attachMovie(level.mc2, "raft2", 2);
_local5.gotoAndStop(2);
main.createEmptyMovieClip("pinguinContainer", 3);
actionContainer = main.createEmptyMovieClip("actionContainer", 4);
seaContainer = main.createEmptyMovieClip("seaContainer", 5);
main.createEmptyMovieClip("cC", 6);
background = main.createEmptyMovieClip("background", 0);
main.createEmptyMovieClip("staticMcs", 7);
background.createEmptyMovieClip("snow", 1);
if (_global.twoPlayer == true) {
var _local6 = _global.countTurns % 2;
} else {
var _local6 = 0;
}
if (_global.detail == "low") {
_local7.cacheAsBitmap = true;
_local5.cacheAsBitmap = true;
}
game = {sW:550, sH:400, mapWidth:level.mapWidth, maxV:9, g:0.5, mc:main, cC:main.cC, raftHeight:30, raftLevel:350, turn:_local6, ballSelected:1, ammoChosen:"snowball", startSequence:true, endOfGame:false, userReady:false, shotsFired:0};
game.particleObjects = [];
game.explosionObjects = [];
var _local8 = sky.attachMovie("mcSky", "mcSky", 0);
_local8._width = 550;
mountains = sky.attachMovie("mcBg", "mcBg", 1);
mountains._x = game.sW / 2;
mountains._y = game.sH;
aTerrain = [];
createRock(main.raft1);
createRock(main.raft2, true);
var _local4 = 0;
while (_local4 < aTerrain.length) {
initVector(aTerrain[_local4], true);
_local4++;
}
game.raft1 = {refPoint:aTerrain[0].p0, mc:main.raft1, t:0, a:3.2, T:4, w:2.0943951023932, bPos:aTerrain[0].p0.y, cannonPoint:aTerrain[0].p1.x, raftnr:1};
var _local14 = (game.raft1.mc._x = game.raftX);
game.raft1.mc._y = game.raft1.refPoint.y;
game.raft1.occupants = [];
game.raft2 = {refPoint:aTerrain[1].p0, mc:main.raft2, t:0, a:3.2, T:4, w:2.0943951023932, bPos:aTerrain[0].p0.y, cannonPoint:aTerrain[1].p0.x, raftnr:2};
var _local13 = (game.raft2.mc._x = game.oppRaftX);
game.raft2.mc._y = game.raft2.refPoint.y;
game.raft2.occupants = [];
game.objects = [];
createPenguins(game.raft1, game.raftX, "right");
if (_global.twoPlayer == true) {
createPenguins(game.raft2, game.oppRaftX, "left");
} else {
createPenguins(game.raft2, game.oppRaftX, "left", true);
}
_local4 = 0;
while (_local4 < game.objects.length) {
game.objects[_local4].mc.gotoAndStop(game.objects[_local4].pose);
initObject(game.objects[_local4]);
_local4++;
}
game.cannonBalls = [];
resetArrayNrs();
game.sea = {width:game.mapWidth, points:150};
seaContainer._x = 0;
seaContainer._y = game.sH - 40;
makeWave(seaContainer, game.sH, 39372, 4, 0.1, game.sea.points, game.sea.width);
seaInt = setInterval(simWave, 50, seaContainer);
particleInt = setInterval(moveParticleObjects, 40);
explosionInt = setInterval(doExplosions, 30);
animInt = setInterval(animatePenguins, 500);
twicePerSecInt = setInterval(twicePerSec, 500);
init();
if (_global.quiet != true) {
playSea("sealoop");
}
if (_global.detail != "low") {
setSnowBackground();
}
displayHealthBars(false);
main.onEnterFrame = function () {
mainLoop();
moveRaft();
};
if (_global.twoPlayer != true) {
attachBeginMessage();
} else {
game.userReady = true;
game.beginTimer = getTimer();
}
draw();
simWave();
};
createRock = function (rockMc, optionRight) {
var _local11 = game.raftLevel;
var _local22 = game.raftHeight;
var _local18 = null;
var _local2 = rockMc;
var _local10 = 0;
for (var _local19 in _local2) {
var _local5 = _local2[_local19]._name;
if (_local5.split("_")[0] == "pt") {
_local10++;
} else if (_local5 == "sep") {
_local18 = _local19;
}
}
var _local20 = _local2["pt_" + _local10]._x - _local2.pt_1._x;
var _local9;
if (optionRight == true) {
_local9 = (game.oppRaftX = (game.mapWidth - game.raftX) - _local20);
} else {
_local9 = (game.raftX = 80);
}
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.96};
if (Math.abs(_local4 - _local3) < 160) {
aTerrain.push(_local8);
}
_local1++;
}
if (_local18 != null) {
level.sep = _local9 + _local2[_local18]._x;
}
};
scrollGame = function () {
var _local3 = game.sW;
var _local2 = cannonBallToFollow;
var _local4 = _local2.p0.x;
if (_local4 > -10000) {
scrollPlus = (_local4 - (_local3 / 2)) - scrollPos;
var _local1 = _local4 - (_local3 / 2);
if (_local1 < 0) {
_local1 = 0;
} else if (_local1 > (game.mapWidth - _local3)) {
_local1 = game.mapWidth - _local3;
}
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();
}
}
}
};
shakeMain = function () {
if (Math.abs(shake) > 1) {
main._y = main._y + shake;
shake = shake * -0.8;
} else {
shake = 0;
main._y = 0;
}
};
mainLoop = function () {
if (shake != 0) {
shakeMain();
}
handleCollisions();
var _local3 = 0;
while (_local3 < game.objects.length) {
var _local2 = game.objects[_local3];
initObject(_local2);
maxSpeed(game.objects[_local3]);
checkStageBounds(_local2);
checkTerrainCollisions(_local2);
_local3++;
}
_local3 = 0;
while (_local3 < game.cannonBalls.length) {
var _local2 = game.cannonBalls[_local3];
initObject(_local2);
checkStageBounds(_local2);
checkTerrainCollisions(_local2);
cannonBallEffects(_local2);
_local3++;
}
if (callTurnScroll == true) {
switchTurns();
}
if (game.startSequence == true) {
if (game.turn == 0) {
startSequence();
} else {
startSequenceLeft();
}
} else if ((enemySequence != true) && (readyForScroll != true)) {
scrollGame();
}
if (_global.detail != "low") {
renderBackground();
}
draw();
};
getDeg = function (obj) {
var _local1 = (Math.atan2(obj.vy, obj.vx) * 180) / Math.PI;
return(_local1);
};
clearIntervals = function () {
clearInterval(seaInt);
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) {
var _local3 = hud.attachMovie("mcFinishMessage", "mcFinishMessage", 1000);
_local3._x = game.sW / 2;
_local3._y = 60;
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);
_local3.time_used = ("time used: " + _local8) + " secs";
var _local9 = game.shotsFired;
_local3.fired = ((("shots fired: " + _local9) + " (par ") + level.par) + ")";
var _local7 = ((level.par - _local9) * 1000) + 1000;
if (_local7 < 0) {
_local7 = 0;
}
var _local6 = ((level.par * 20) - _local8) * 50;
if (_local6 < 0) {
_local6 = 0;
}
var _local5 = (_local7 + _local6) + 500;
_local3.score = "scored " + _local5;
_global.scor = _local5;
_global.progress.points = _global.progress.points + _local5;
_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 {
fadeLoop();
if (this._visible == false) {
this._visible = true;
}
}
};
};
exitBattle = function () {
if (_global.twoPlayer != true) {
if (game.winner != 1) {
_global.progress.lives--;
}
}
stopSound();
clearIntervals();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
if (_global.twoPlayer == true) {
root.gotoAndStop("overview2p");
} else {
root.gotoAndStop("overview");
}
};
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;
}
};
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)));
};
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++;
}
};
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;
};
initObject = function (v) {
if (_root.pauza == false) {
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;
}
};
checkStageBounds = function (obj) {
if (_root.pauza == false) {
var _local3 = false;
if (obj.sb == true) {
var _local4 = 500;
} else {
var _local4 = 200;
}
if (obj.p1.x < ((-obj.r) - _local4)) {
if (obj.penguin == true) {
speelSimpelSFX("splash_large", "pauze");
}
_local3 = true;
} else if (obj.p1.y > (game.sH - obj.r)) {
attachSplash(obj, 6);
if (obj.penguin == true) {
speelSimpelSFX("splash_large");
if (obj.deceased != true) {
playVoice("byebye");
}
} else {
speelSimpelSFX("splash_small");
}
_local3 = true;
} else if (obj.p1.x > ((game.mapWidth + obj.r) + _local4)) {
if (obj.penguin == true) {
speelSimpelSFX("splash_large", "pauze");
}
_local3 = true;
}
if (_local3 == true) {
if (obj.sb == true) {
if ((obj.timesHitAnything == 0) && (obj.aiShot != true)) {
playVoice("miss", true);
}
}
if (cannonBallToFollow == obj) {
cannonBallToFollow = null;
}
removeObject(obj);
}
}
};
checkTerrainCollisions = function (obj) {
if (_root.pauza == false) {
var _local7 = 0;
while (_local7 < aTerrain.length) {
var _local5 = aTerrain[_local7];
var _local8 = obj.p0.x;
if ((M_ABS(_local5.p0.x - _local8) < 100) || (M_ABS(_local5.p1.x - _local8) < 100)) {
var _local3 = getIntersection(obj, _local5);
_local3 = initVector(_local3, false);
var _local6 = obj.r - _local3.len;
if (_local6 >= 0) {
obj.p1.x = obj.p1.x + (_local3.dx * _local6);
obj.p1.y = obj.p1.y + (_local3.dy * _local6);
var _local10 = {dx:_local3.lx, dy:_local3.ly, lx:_local3.dx, ly:_local3.dy, b:obj.b, f:_local5.f};
var _local9 = bounce(obj, _local10);
obj.vx = _local9.vx;
obj.vy = _local9.vy;
if (obj.sb == true) {
obj.timesHitAnything++;
if (obj.type == "rocket") {
attachFlits();
cannonBallToFollow = null;
createExplosion(obj, true);
explodeCollisions(obj);
removeObject(obj);
} else if (obj.type == "grenade") {
var _local4 = Math.abs(obj.vx) + Math.abs(obj.vy);
if (_local4 < 2) {
_local4 = 0;
}
if (Math.random() > 0.5) {
_local4 = _local4 * -1;
}
obj.mc.airrot = _local4;
} else {
obj.nrOfSnowballCollisions++;
var _local11 = cannonBallCollTime;
cannonBallCollTime = getTimer();
if ((cannonBallCollTime - _local11) > 200) {
speelSimpelSFX("snowbal_hit_terrain");
attachSnowPiece(obj, 6);
if (obj.timesColl < 2) {
obj.timesColl++;
} else if (Math.random() < (0.5 + (obj.timesColl / 10))) {
cannonBallToFollow = null;
removeObject(obj);
}
obj.mc.gotoAndStop(obj.timesColl + 1);
} else if (obj.nrOfSnowballCollisions > 10) {
cannonBallToFollow = null;
removeObject(obj);
}
}
}
}
}
_local7++;
}
}
};
explodeCollisions = function (obj) {
if (_root.pauza == false) {
var _local13 = 1000000 /* 0x0F4240 */;
var _local10 = null;
var _local7 = 0;
while (_local7 < game.objects.length) {
var _local3 = game.objects[_local7];
var _local5 = getDistance(obj, _local3);
var _local6 = 250;
if (_local5 < _local6) {
var _local2 = {};
_local2.vx = obj.p1.x - _local3.p0.x;
_local2.vy = obj.p1.y - _local3.p0.y;
_local2.len = Math.sqrt((_local2.vx * _local2.vx) + (_local2.vy * _local2.vy));
if (_local5 < _local13) {
_local13 = _local5;
_local10 = _local3;
}
if (_local2.len > 0) {
_local2.dx = _local2.vx / _local2.len;
_local2.dy = _local2.vy / _local2.len;
} else {
_local2.dx = 0;
_local2.dy = 0;
}
var _local8 = -((_local2.dx * (_local6 - _local5)) / 20);
var _local4 = (_local2.dy * (_local6 - _local5)) / 2.6;
if (_local4 > 0) {
_local4 = _local4 * -1;
}
_local3.vx = _local3.vx + _local8;
_local3.vy = _local3.vy + _local4;
var _local9 = Math.abs(_local8);
var _local12 = _local9 + Math.abs(_local4);
setDamage(_local3, _local12);
if ((_local9 + Math.abs(_local4)) > minCollAnim) {
playVoice("auw");
hitPenguin(_local3);
}
}
if (_local10 != null) {
cannonBallToFollow = _local10;
}
_local7++;
}
}
};
setDamage = function (obj, damage) {
if (_root.pauza == false) {
obj.hitpoints = obj.hitpoints + (damage * 2);
if (obj.hitpoints > 100) {
obj.hitpoints = 100;
}
}
};
collideObject = function (objA, objB, objAnr, objBnr) {
if (_root.pauza == false) {
var _local5 = 0.9;
if ((objA.noColl != objB) && (objB.noColl != objA)) {
var _local27 = objA.p0.x;
var _local26 = objA.p0.y;
var _local8 = objB.p0.x - _local27;
var _local6 = objB.p0.y - _local26;
var _local4 = Math.sqrt((_local8 * _local8) + (_local6 * _local6));
if (_local4 < (objA.r + objB.r)) {
objA.noColl = objB;
objB.noColl = objA;
var _local11 = ball2ball(objB, objA);
var _local14 = (objB.r + objA.r) - _local11.len;
if (_local14 >= 0) {
objB.p1.x = objB.p1.x + (_local11.dx * _local14);
objB.p1.y = objB.p1.y + (_local11.dy * _local14);
}
var _local12 = objB.vx;
var _local10 = objA.vx;
var _local15 = objB.vy;
var _local9 = objA.vy;
var _local7 = Math.sqrt((_local10 * _local10) + (_local9 * _local9));
var _local25 = Math.sqrt((_local12 * _local12) + (_local15 * _local15));
if ((objA.sb == true) && (objA.type != "grenade")) {
if (objA.type == "rocket") {
createExplosion(objA);
explodeCollisions(objA);
} else {
speelSimpelSFX("snowball_hit");
}
if (objA.timesHitAnything == 0) {
playVoice("good_shot", true);
} else {
playVoice("auw", true);
}
var _local21 = _local10 / 2;
var _local20 = (((_local7 * _local6) / _local4) * _local5) + (_local9 / 2);
var _local29 = Math.abs(_local21);
game.objects[objB.arrayNr].vx = game.objects[objB.arrayNr].vx + _local21;
game.objects[objB.arrayNr].vy = game.objects[objB.arrayNr].vy + _local20;
attachSnowPiece(objA, 6);
removeObject(objA);
if (objB.vy > 0) {
objB.vy = objB.vy * -1;
}
cannonBallToFollow = objB;
var _local24 = _local29 + Math.abs(_local20);
setDamage(objB, _local24);
if (_local24 > minCollAnim) {
hitPenguin(objB);
}
} else if (objA.type == "grenade") {
if (objA.timesHitAnything == 0) {
playVoice("good_shot", true);
} else {
playVoice("auw", true);
}
objA.timesHitAnything++;
speelSimpelSFX("grenade_collision");
var _local16 = ((((_local7 * _local8) / _local4) * _local5) / 2) + (_local10 / 2);
var _local17 = ((((_local7 * _local6) / _local4) * _local5) + (_local9 / 2)) / 4;
var _local28 = Math.abs(_local16);
objB.vx = _local16 / 4;
objB.vy = _local17;
objA.vx = -objB.vx;
objA.vy = objB.vy;
if (objB.vy > 0) {
objB.vy = objB.vy * -1;
}
var _local24 = _local28 + Math.abs(_local17);
setDamage(objB, _local24);
if (_local24 > minCollAnim) {
hitPenguin(objB);
}
} else {
var _local16 = (((_local7 * _local8) / _local4) * _local5) + (_local10 / 2);
var _local17 = (((_local7 * _local6) / _local4) * _local5) + (_local9 / 2);
objB.vx = _local16;
objB.vy = _local17;
var _local18 = ((-((_local25 * _local8) / _local4)) * _local5) + (_local12 / 2);
var _local19 = ((-((_local25 * _local6) / _local4)) * _local5) + (_local15 / 2);
objA.vx = _local18;
objA.vy = _local19;
if ((game.turn % 2) == 0) {
var _local13 = 1;
} else {
var _local13 = 2;
}
trace((((((_local13 + " ") + objA.raft.raftnr) + " penguin ") + objB.raft.raftnr) + " ") + objA.p0.x);
var _local23 = Math.abs(_local18) + Math.abs(_local19);
var _local22 = Math.abs(_local16) + Math.abs(_local17);
if (objA.raft.raftnr != _local13) {
setDamage(objA, _local23);
if (_local23 > minCollAnim) {
playVoice("auw");
hitPenguin(objA);
}
}
if (objB.raft.raftnr != _local13) {
setDamage(objB, _local22);
if (_local22 > minCollAnim) {
playVoice("auw");
hitPenguin(objB);
}
}
}
}
}
}
};
handleCollisions = function () {
if (_root.pauza == false) {
var _local3 = game.objects.length - 1;
while (_local3 >= 0) {
var _local5 = game.objects[_local3];
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local4 = game.objects[_local2];
if (_local4.raft == _local5.raft) {
collideObject(_local5, _local4, _local3, _local2);
}
_local2--;
}
_local3--;
}
_local3 = 0;
while (_local3 < game.cannonBalls.length) {
var _local5 = game.cannonBalls[_local3];
var _local2 = game.objects.length - 1;
while (_local2 >= 0) {
var _local4 = game.objects[_local2];
collideObject(_local5, _local4, _local3, _local2);
_local2--;
}
_local3++;
}
}
};
draw = function () {
if (_root.pauza == false) {
var _local3 = 0;
while (_local3 < game.objects.length) {
var _local2 = game.objects[_local3];
_local2.mc._x = _local2.p1.x;
_local2.mc._y = _local2.p1.y;
_local3++;
}
_local3 = 0;
while (_local3 < game.cannonBalls.length) {
var _local2 = game.cannonBalls[_local3];
if ((_local2.type != "grenade") || (_local2.type != "snowball")) {
_local2.mc._x = _local2.p1.x;
_local2.mc._y = _local2.p1.y + 12;
} else {
_local2.mc._x = _local2.p1.x;
_local2.mc._y = _local2.p1.y;
}
_local3++;
}
}
};
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) {
mc = 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;
};
startSequence = function () {
if (_root.pauza == false) {
if (game.userReady != false) {
if (showLevelComplete != true) {
var _local3 = 0;
} else {
var _local5 = getMostLeftPenguin(1);
var _local3 = _local5.p0.x - (game.sW * (1 - screenShootPos));
if (_local3 < 0) {
_local3 = 0;
}
}
var _local6 = getMostLeftPenguin(2);
var _local4 = _local6.p0.x;
if (scrollPos > (_local4 - (game.sW / 2))) {
maxS = maxS + (((maxScroll / 4) - maxS) / 20);
} else {
maxS = maxS + ((maxScroll - maxS) / 40);
}
var _local2 = (_local3 - scrollPos) / 8;
if (_local2 > maxS) {
_local2 = maxS;
} else if (_local2 < (-maxS)) {
_local2 = -maxS;
}
scrollPos = scrollPos + _local2;
if ((Math.abs(scrollPos - _local3) < 1) && (showLevelComplete == true)) {
game.startSequence = false;
operateCannon(1);
scrollPos = _local3;
}
if ((Math.floor(scrollPos) <= 0) && (showLevelComplete != true)) {
showLevelComplete = true;
playVoice("start_battle");
}
main._x = -scrollPos;
}
}
};
startSequenceLeft = function () {
if (_root.pauza == false) {
if (game.userReady != false) {
if (showLevelComplete != true) {
var _local3 = game.mapWidth - game.sW;
} else {
var _local6 = getMostLeftPenguin(2);
var _local3 = _local6.p0.x - (game.sW * (1 - screenShootPos));
if (_local3 > (game.mapWidth - sw)) {
_local3 = game.mapWidth - sw;
}
}
var _local5 = getMostLeftPenguin(1);
var _local4 = _local5.p0.x;
if (scrollPos < (_local4 - (game.sW / 2))) {
maxS = maxS + (((maxScroll / 4) - maxS) / 20);
} else {
maxS = maxS + ((maxScroll - maxS) / 40);
}
var _local2 = (_local3 - scrollPos) / 8;
if (_local2 > maxS) {
_local2 = maxS;
} else if (_local2 < (-maxS)) {
_local2 = -maxS;
}
scrollPos = scrollPos + _local2;
if ((Math.abs(scrollPos - _local3) < 1) && (showLevelComplete == true)) {
game.startSequence = false;
operateCannon(2);
scrollPos = _local3;
}
if ((Math.ceil(scrollPos) >= (game.mapWidth - game.sW)) && (showLevelComplete != true)) {
showLevelComplete = true;
playVoice("start_battle");
}
main._x = -scrollPos;
}
}
};
attachBeginMessage = function () {
if (_root.pauza == false) {
main._x = -scrollPos;
var _local3 = hud.attachMovie("mcBeginMessage", "mcBeginMessage", hud.getNextHighestDepth());
_local3._y = 60;
_local3._x = game.sW / 2;
_local3.levelnr = "level " + currentLevel;
_local3.par = ("par: " + level.par) + " shots";
_local3.onRelease = function () {
game.userReady = true;
game.beginTimer = getTimer();
this.removeMovieClip();
};
}
};
attachSnowball = function (loopMc, ai) {
if (_root.pauza == false) {
var _local7;
var _local10;
var _local11;
var _local6;
if (game.ammoChosen == "snowball") {
_local7 = "mcSnowball";
_local10 = 0.99;
_local11 = 0.85;
_local6 = 0.8;
speelSimpelSFX("snowball");
} else if (game.ammoChosen == "grenade") {
_local7 = "mcGrenade";
_local10 = 0.994;
_local11 = 1;
_local6 = 0.7;
speelSimpelSFX("grenade");
} else if (game.ammoChosen == "rocket") {
_local7 = "mcRocket";
_local10 = 0.995;
_local11 = 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(_local7, ball + _local12, _local12);
var _local3 = (game.cannonBalls[0] = {f:1, m:_local11, r:24, b:_local6, airf:_local10, arrayNr:0, mc:_local5, sb:true, timesColl:0, timesHitAnything:0, type:game.ammoChosen, fireScrollPos:scrollPos});
cannonBallToFollow = _local3;
if (_local3.type == "grenade") {
_local3.counter = 115;
} else if (_local3.type == "snowball") {
_local3.nrOfSnowballCollisions = 0;
}
if (ai == true) {
_local3.aiShot = true;
} else {
_local3.aiShot = false;
}
var _local4 = _local14 * (Math.PI/180);
var _local16 = _global.cannonPower * Math.cos(_local4);
var _local15 = _global.cannonPower * Math.sin(_local4);
_local3.vx = _local16 / 3;
_local3.vy = _local15 / 3;
if (_local3.vx > 0) {
_local3.dir = "right";
} else {
_local3.dir = "left";
}
hitTestBounds(loopMc.loopPoint, main);
var _local9 = loopMc.loopPoint.xMin;
var _local8 = loopMc.loopPoint.yMin;
_local9 = _local9 + (Math.cos(_local4) * 20);
_local8 = _local8 + (Math.sin(_local4) * 20);
_local3.p0 = {x:_local9, y:_local8};
_local5._x = _local9;
_local5._y = _local8;
_local5._rotation = getDeg(_local3);
initObject(_local3);
resetNoColl();
}
};
resetArrayNrs = function () {
if (_root.pauza == false) {
game.raft1.occupants = [];
game.raft2.occupants = [];
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local3 = game.objects[_local2];
_local3.arrayNr = _local2;
if (_local3.raft == game.raft1) {
game.raft1.occupants.push(_local2);
} else if (_local3.raft == game.raft2) {
game.raft2.occupants.push(_local2);
}
_local2++;
}
}
};
removeObject = function (obj) {
if (_root.pauza == false) {
if (obj.sb == true) {
manageTurnSwitch();
}
if (obj.sb == true) {
obj.mc.removeMovieClip();
game.cannonBalls.splice(obj.arrayNr, 1);
} else {
obj.mc._parent.removeMovieClip();
game.objects.splice(obj.arrayNr, 1);
resetArrayNrs();
}
}
};
selectBall = function (nr) {
if (_root.pauza == false) {
var _local2 = 1;
while (_local2 < 4) {
cannon["selectBall" + _local2].selectedBg._visible = false;
_local2++;
}
cannon["selectBall" + nr].selectedBg._visible = true;
}
};
operateCannon = function (rockNr) {
if (_root.pauza == false) {
var _local8 = game["raft" + rockNr];
cannon = hud.attachMovie("mcShootCannon", "mcShootCannon", 0);
cannon.gotoAndStop(rockNr);
cannon._y = 20;
if (rockNr == 1) {
cannon._x = 20;
} else {
cannon._x = game.sW - 20;
}
displayHealthBars(false);
cannon.exit.onRelease = function () {
exitBattle();
};
cannon.loopBtn.onRelease = function () {
if (_global.quiet == false) {
_global.quiet = true;
this.red._visible = true;
stopAllSounds();
} else {
_global.quiet = false;
this.red._visible = false;
playLoop("loop");
playSea("sealoop");
}
};
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;
cannon.fire.onRelease = function () {
playVoice("place_shot");
if (game.ballSelected == 2) {
level["player" + this.rockNr].grenades--;
} else if (game.ballSelected == 3) {
level["player" + this.rockNr].rockets--;
}
game.currentShot = this.rockNr;
cannonSequence = false;
this.snowEpox.play();
attachSnowball(this.snowEpox, false);
if (this.penguinObj.noBB != true) {
if (this.rockNr == 1) {
var _local2 = -1;
} else {
var _local2 = 1;
}
this.penguinObj.vx = _local2;
trace((this.penguinObj.raft.raftnr + " peng hit") + this.penguinObj.p0.x);
}
this.penguinObj.vy = -2;
game.shotsFired++;
cannon.removeMovieClip();
};
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 = 360;
} else {
_local4.flip = 180;
_local4.headAngle = 0;
}
_local5.active = true;
_local4.penguin = _local5.mc;
_local4.penguinObj = _local5;
_local4.onEnterFrame = function () {
this._rotation = 180 + _global.cannonRotation;
this.penguin.head._rotation = (((this.headAngle * 4) + _global.cannonRotation) - this.flip) / 5;
if (cannonSequence == false) {
delete this.onEnterFrame;
}
};
}
};
checkSep = function (obj) {
if (_root.pauza == false) {
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 () {
if (_root.pauza == false) {
var _local3 = game.raft1;
var _local8 = aTerrain[0].p0.y;
var _local6 = _local3.bPos + (_local3.a * Math.sin(_local3.w * _local3.t));
var _local4 = _local6 - _local8;
var _local2 = 0;
while (_local2 < aTerrain.length) {
aTerrain[_local2].p0.y = aTerrain[_local2].p0.y + _local4;
_local2++;
}
var _local5 = random(14) + 22;
_local3.t = _local3.t + (1 / _local5);
_local3.mc._y = _local3.refPoint.y - _local3.mc.mcYPos;
var _local7 = game.raft2;
_local7.mc._y = _local3.refPoint.y - _local3.mc.mcYPos;
}
};
displayHealthBars = function (option) {
if (_root.pauza == false) {
if (option == true) {
if (healthBarsVisible == false) {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local3 = game.objects[_local2];
_local3.mc.healthbar._visible = true;
healthBarsVisible = true;
_local2++;
}
}
} else if (healthBarsVisible == true) {
var _local2 = 0;
while (_local2 < game.objects.length) {
var _local3 = game.objects[_local2];
_local3.mc.healthbar._visible = false;
healthBarsVisible = false;
_local2++;
}
}
}
};
switchTurns = function () {
if (_root.pauza == false) {
var _local12 = game.sW;
if (readyForScroll != true) {
var _local13 = true;
if ((game.turn % 2) == 0) {
var _local11 = 2;
} else {
var _local11 = 1;
}
var _local6 = 0;
while (_local6 < game["raft" + _local11].occupants.length) {
var _local8 = game["raft" + _local11].occupants[_local6];
var _local3 = game.objects[_local8];
if ((Math.abs(_local3.vx) > 0.4) || (Math.abs(_local3.vy) > 0.4)) {
_local13 = false;
}
_local6++;
}
if (_local13 == 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 _local10 = null;
var _local6 = 0;
while (_local6 < game.objects.length) {
var _local9 = game.objects[_local6];
if (_local10 == null) {
if (_local9.hitpoints > 0) {
_local10 = _local9;
}
}
_local6++;
}
if (_local10 == null) {
checkForDamage = false;
} else {
var _local9 = _local10;
var _local17 = _local9.p0.x - (_local12 / 2);
if (_local17 < 0) {
_local17 = 0;
}
if (_local17 > (game.mapWidth - _local12)) {
_local17 = game.mapWidth - _local12;
}
var _local15 = (_local17 - scrollPos) / 8;
if (_local15 > maxScroll) {
_local15 = maxScroll;
} else if (_local15 < (-maxScroll)) {
_local15 = -maxScroll;
}
scrollPos = scrollPos + _local15;
main._x = -scrollPos;
if (Math.abs(_local17 - scrollPos) < 1) {
if (arrayNrDeductPointsAttached != _local9.arrayNr) {
var _local21 = actionContainer.getNextHighestDepth();
var _local19 = actionContainer.attachMovie("mcDeductPoints", "mcDeductPoints" + _local21, _local21);
_local19.points.text = "- " + Math.ceil(_local9.hitpoints);
_local19._x = _local9.p0.x;
_local19._y = _local9.p0.y - 80;
arrayNrDeductPointsAttached = _local9.arrayNr;
var _local22 = _local9.health - _local9.hitpoints;
if ((_local9.hitpoints > 15) && (_local22 > 0)) {
playVoice("got_hit");
}
}
var _local16 = 0.3 * (_local9.health - _local9.hitpoints);
if (_local16 < 1) {
_local16 = 1;
}
_local9.mc.healthbar.bar._width = _local9.mc.healthbar.bar._width - 1;
if (_local9.mc.healthbar.bar._width <= _local16) {
_local9.mc.healthbar.bar._width = _local16;
setHealth(_local9);
if (_local9.health <= 0) {
pauzeScroll = 40;
}
}
}
}
}
} else {
if ((game.turn % 2) == 0) {
var _local20 = getMostLeftPenguin(1);
if (_local20 != null) {
if (_local20.pose != "stand") {
if (rand500 > 0.7) {
_local20.pose = "stand";
}
}
var _local17 = _local20.p0.x - (game.sW * (1 - screenShootPos));
if (_local17 < 0) {
_local17 = 0;
}
} else {
if (game.endOfGame == true) {
var _local18 = game.flagHolder;
} else {
var _local18 = getMostLeftPenguin(2);
}
var _local17 = _local18.p0.x - (game.sW / 2);
if (_local17 > (game.mapWidth - _local12)) {
_local17 = game.mapWidth - _local12;
}
if (game.endOfGame != true) {
game.winner = 2;
_local18.flag = true;
_local18.mc.gotoAndStop("flag");
game.flagHolder = _local18;
endOfGameMessage(2);
displayHealthBars(false);
game.endOfGame = true;
}
}
activeRaft = game.raft1;
} else {
var _local18 = getMostLeftPenguin(2);
if (_local18 != null) {
if (_local18.pose != "stand") {
if (rand500 > 0.7) {
_local18.pose = "stand";
}
}
var _local17 = _local18.p0.x - (game.sW * screenShootPos);
if (_local17 > (game.mapWidth - _local12)) {
_local17 = game.mapWidth - _local12;
}
} else {
if (game.endOfGame == true) {
var _local20 = game.flagHolder;
} else {
var _local20 = getMostLeftPenguin(1);
}
var _local17 = _local20.p0.x - (game.sW / 2);
if (_local17 < 0) {
_local17 = 0;
}
if (game.endOfGame != true) {
game.endTimer = getTimer();
var _local20 = getMostLeftPenguin(1);
game.winner = 1;
_local20.mc.gotoAndStop("flag");
_local20.flag = true;
game.flagHolder = _local20;
endOfGameMessage(1);
displayHealthBars(false);
game.endOfGame = true;
}
}
activeRaft = game.raft2;
}
if (waitForScroll <= 0) {
var _local15 = (_local17 - scrollPos) / 8;
if (_local15 > maxScroll) {
_local15 = maxScroll;
} else if (_local15 < (-maxScroll)) {
_local15 = -maxScroll;
}
scrollPos = scrollPos + _local15;
main._x = -scrollPos;
if (repositioning == false) {
if (Math.abs(_local17 - 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 _local14 = true;
if ((game.turn % 2) == 0) {
var _local11 = 1;
} else {
var _local11 = 2;
}
var _local6 = 0;
while (_local6 < game["raft" + _local11].occupants.length) {
var _local8 = game["raft" + _local11].occupants[_local6];
var _local3 = game.objects[_local8];
if (_local3.deceased != true) {
var _local7 = _local3.raftPos.x;
var _local5 = _local3.p0.x;
if (Math.abs(_local5 - _local7) > 3) {
_local14 = false;
}
if (level.sep != null) {
checkSep(_local3);
}
var _local4 = (_local7 - _local5) / 20;
if (Math.abs(_local5 - _local7) < 6) {
_local3.vx = _local3.vx * 0.5;
_local3.vy = _local3.vy * 0.5;
} else if (_local4 > 0) {
if (_local4 > 3) {
_local4 = 3;
} else if (_local4 < 1) {
_local4 = 1;
}
} else if (_local4 < -3) {
_local4 = -3;
} else if (_local4 > -1) {
_local4 = -1;
}
_local3.vx = _local4;
if (_local4 > 0.2) {
if (_local3.pose == "stand") {
if (_local3.mc._currentframe != 2) {
_local3.mc.gotoAndStop("walkright");
}
} else if (_local3.mc._currentframe != 5) {
_local3.mc.gotoAndStop("sitright");
}
} else if (_local4 < -0.4) {
if (_local3.pose == "stand") {
if (_local3.mc._currentframe != 3) {
_local3.mc.gotoAndStop("walkleft");
}
} else if (_local3.mc._currentframe != 5) {
_local3.mc.gotoAndStop("sitright");
}
} else {
_local3.mc.gotoAndStop(_local3.pose);
}
}
_local6++;
}
if (_local14 == true) {
repositioning = false;
}
}
}
};
repositionOppositePenguins = function () {
if (_root.pauza == false) {
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;
}
trace("REPOSITION RAFTNR: " + _local5);
var _local3 = 0;
while (_local3 < game["raft" + _local5].occupants.length) {
var _local4 = game["raft" + _local5].occupants[_local3];
var _local2 = game.objects[_local4];
if (_local2.deceased != true) {
_local2.p0.x = _local2.raftPos.x;
}
_local3++;
}
}
};
setHealth = function (ob) {
if (_root.pauza == false) {
ob.health = ob.health - ob.hitpoints;
if (ob.health <= 0) {
ob.health = 0;
ob.r = 0;
ob.deceased = true;
ob.mc.gotoAndStop("die");
playVoice("see_you_later");
}
ob.hitpoints = 0;
}
};
getMostLeftPenguin = function (raftnr) {
if (_root.pauza == false) {
if (raftnr == 1) {
var _local5 = -100000;
var _local7 = null;
var _local3 = 0;
while (_local3 < game["raft" + raftnr].occupants.length) {
var _local4 = game["raft" + raftnr].occupants[_local3];
var _local2 = game.objects[_local4];
if (_local2.p0.x > _local5) {
_local7 = _local2;
_local5 = _local2.p0.x;
}
_local3++;
}
} else {
raftnr = 2;
var _local5 = 100000 /* 0x0186A0 */;
var _local7 = null;
var _local3 = 0;
while (_local3 < game["raft" + raftnr].occupants.length) {
var _local4 = game["raft" + raftnr].occupants[_local3];
var _local2 = game.objects[_local4];
if (_local2.p0.x < _local5) {
_local7 = _local2;
_local5 = _local2.p0.x;
}
_local3++;
}
}
return(_local7);
}
};
startAIshot = function () {
if (_root.pauza == false) {
displayHealthBars(false);
if (level.rockLevel == true) {
var _local4 = getMostLeftPenguin(2);
var _local12 = _local4.p0.x;
var _local13 = 270 - _local4.p0.y;
var _local15 = (1400 - _local13) / 1400;
if (_local4.aimHigh == true) {
var _local16 = true;
} else {
var _local16 = false;
}
} else {
var _local12 = game.raft2.refPoint.x;
var _local15 = 1;
var _local16 = false;
}
var _local17 = 122;
var _local10 = _local12 - game.raft1.refPoint.x;
var _local5 = _local10 / 2900;
var _local11 = _local5 + (_local5 / 2.4);
_local5 = ((_local11 * 5) + 0.5) / 6;
if (_local16 == true) {
var _local8 = 34 + random(12);
} else {
var _local8 = 18 + random(28);
}
var _local14 = Math.abs(7 - (_local8 - 30));
if (_local8 > 45) {
_local5 = _local5 + ((_local5 - 0.5) / 4);
}
_global.oppCannonRotation = _local8 - 180;
var _local6 = (10 + (_local5 * (_local17 - 15))) + (_local14 * 1.1);
var _local9 = 5 - currentLevel;
if (_local9 > 2) {
afwFactor = _local9 / 10;
} else {
afwFactor = 0.2;
}
trace(afwFactor + " FACTOR");
_local6 = _local6 * ((1 + (afwFactor / 2)) - (Math.random() * afwFactor));
_local6 = _local6 * _local15;
if (math.random() > 0.92) {
_local6 = _local6 * (1.5 - Math.random());
}
if (_local6 > 140) {
_local6 = 140;
}
_global.cannonPower = _local6;
if (level.rockLevel == false) {
var _local7 = game.raft2.mc.cannon.loop;
var _local18 = -1;
} else if (_root.pauza == false) {
_local4.active = true;
var _local7 = _local4.mc.bazooka;
_local7._visible = true;
speelSimpelSFX("draw_weapon");
var _local18 = 1;
}
if (_root.pauza == false) {
_local7.penguin = _local4.mc;
_local7.penguinObj = _local4;
_local7.targetRot = _local18 * (180 + _global.oppCannonRotation);
_local7.tel = 0;
}
_local7.onEnterFrame = function () {
if (_root.pauza == false) {
this._rotation = this._rotation + ((this.targetRot - this._rotation) / 12);
this.penguin.head._rotation = this.penguin.head._rotation + ((this.targetRot - this._rotation) / 30);
if (this.tel >= 30) {
if (Math.round(this._rotation) == this.targetRot) {
playVoice("place_shot");
_global.cannonRotation = 315;
game.ammoChosen = "snowball";
game.currentShot = 2;
attachSnowball(this, true);
if (this.penguinObj.noBB != true) {
this.penguinObj.vx = 1;
}
this.penguinObj.vy = -2;
this.play();
delete this.onEnterFrame;
cannonSequence = false;
enemySequence = false;
}
} else {
this.tel++;
}
}
};
}
};
resetActivePenguins = function () {
if (_root.pauza == false) {
var _local3 = 0;
while (_local3 < game.objects.length) {
var _local2 = game.objects[_local3];
if (_local2.active == true) {
_local2.active = false;
_local2.mc.bazooka._visible = false;
_local2.mc.head._rotation = 0;
}
_local3++;
}
}
};
manageTurnSwitch = function () {
if (_root.pauza == false) {
callTurnScroll = true;
resetActivePenguins();
}
};
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)) {
if (_local1.hit != true) {
if (_local1.pose == "stand") {
var _local3 = Math.random();
if (_local3 > 0.94) {
_local1.mc.gotoAndStop("look");
} else if (_local3 > 0.7) {
_local1.mc.head.sleepyEyes.play();
}
} else if (_local1.pose == "sit") {
var _local3 = Math.random();
if ((_local3 > 0.92) && (_local1.opponent != true)) {
_local1.mc.gotoAndStop("wave");
} else if (_local3 > 0.7) {
_local1.mc.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;
}
}
}
_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) {
obj.r = 24;
var _local21 = obj.p1.x;
var _local19 = obj.p1.y;
var _local14 = obj.vx;
var _local12 = obj.vy;
var _local20 = obj.r;
var _local18 = actionContainer.getNextHighestDepth();
var _local11 = Math.round(3 + ((obj.vx + obj.vy) / 8));
var _local1 = 0;
while (_local1 < _local11) {
var _local7 = _local18 + _local1;
var _local6 = actionContainer.attachMovie("mcSplash", "splash" + _local7, _local7);
var _local10 = _local21 + _local1;
var _local9 = ((_local19 - _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) {
attachSnowflake(true);
_local1++;
}
};
renderBackground = 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();
}
};
};
attachFlits = function () {
whiteFlash.attachMovie("mcFlits", "mcFlits", 0);
};
cannonBallEffects = function (obj) {
if (obj.type == "rocket") {
if (Math.random() > 0.6) {
attachSmoke(obj);
}
var _local2 = getDeg(obj);
obj.mc._rotation = _local2;
}
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 () {
_global.sound.createEmptyMovieClip("sfx", 0);
_global.sound.createEmptyMovieClip("loop", 1);
_global.sound.createEmptyMovieClip("cRandom", 2);
_global.sound.createEmptyMovieClip("voices", 3);
_global.sound.createEmptyMovieClip("musicLoop", 40);
initSFX();
};
playRandomSound = function () {
if (_global.quiet != true) {
var _local2 = "random" + (random(8) + 1);
random_sounds.attachSound(_local2);
random_sounds.setVolume(40);
random_sounds.start();
}
};
initSFX = function () {
sfx_snowball = new Sound(_global.sound.sfx);
sfx_snowball.attachSound("snowball");
sfx_snowball_launch = new Sound(_global.sound.sfx);
sfx_snowball_launch.attachSound("snowball_launch");
sfx_rocket = new Sound(_global.sound.sfx);
sfx_rocket.attachSound("rocket");
sfx_grenade = new Sound(_global.sound.sfx);
sfx_grenade.attachSound("grenade");
sfx_grenade_tick = new Sound(_global.sound.sfx);
sfx_grenade_tick.attachSound("grenade_tick");
sfx_grenade_collision = new Sound(_global.sound.sfx);
sfx_grenade_collision.attachSound("grenade_collision");
sfx_draw_weapon = new Sound(_global.sound.sfx);
sfx_draw_weapon.attachSound("draw_weapon");
sfx_explosion = new Sound(_global.sound.sfx);
sfx_explosion.attachSound("explosion");
sfx_snowball_hit = new Sound(_global.sound.sfx);
sfx_snowball_hit.attachSound("snowball_hit");
sfx_splash_small = new Sound(_global.sound.sfx);
sfx_splash_small.attachSound("splash_small");
sfx_splash_large = new Sound(_global.sound.sfx);
sfx_snowbal_hit_terrain = new Sound(_global.sound.sfx);
sfx_snowbal_hit_terrain.attachSound("snowbal_hit_terrain");
sfx_see_you_later = new Sound(_global.sound.voices);
sfx_byebye = new Sound(_global.sound.voices);
sfx_miss = new Sound(_global.sound.sfx);
sfx_auw = new Sound(_global.sound.sfx);
sfx_good_shot = new Sound(_global.sound.sfx);
sfx_byebye = new Sound(_global.sound.sfx);
sfx_place_shot = new Sound(_global.sound.sfx);
sfx_got_hit = new Sound(_global.sound.sfx);
sfx_start_battle = new Sound(_global.sound.sfx);
random_sounds = new Sound(_global.sound.cRandom);
};
playVoice = function (id) {
if (_global.quiet != true) {
switch (id) {
case "see_you_later" :
var _local2 = random(3) + 1;
if (_local2 == 1) {
var _local5 = random(2) + 1;
var _local4 = (("byebye" + _local2) + "_") + _local5;
} else {
var _local4 = "byebye" + _local2;
}
sfx_see_you_later.attachSound(_local4);
sfx_see_you_later.start();
break;
case "byebye" :
if (Math.random() > 0.6) {
var _local4 = "byebye3";
} else {
var _local3 = random(2) + 1;
var _local4 = "byebye1_" + _local3;
}
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(2) + 1));
sfx_good_shot.start();
break;
case "auw" :
sfx_auw.attachSound("auw" + (random(6) + 1));
sfx_auw.start();
break;
case "place_shot" :
_local2 = random(6) + 1;
if (_local2 == 6) {
var _local5 = random(2) + 1;
var _local4 = (("place_shot" + _local2) + "_") + _local5;
} else {
var _local4 = "place_shot" + _local2;
}
sfx_place_shot.attachSound(_local4);
sfx_place_shot.start();
break;
case "got_hit" :
_local2 = random(2) + 1;
if (_local2 == 1) {
var _local5 = random(3) + 1;
var _local4 = (("got_hit" + _local2) + "_") + _local5;
} else {
var _local4 = "got_hit" + _local2;
}
sfx_got_hit.attachSound(_local4);
sfx_got_hit.start();
break;
case "start_battle" :
_local2 = random(3) + 1;
if (_local2 == 1) {
var _local5 = random(2) + 1;
var _local4 = (("start_battle" + _local2) + "_") + _local5;
} else {
var _local4 = "start_battle" + _local2;
}
sfx_start_battle.attachSound(_local4);
sfx_start_battle.start();
}
}
};
randomSFX = function () {
if (shortRandom > 0.8) {
omgeving_bird.start();
}
};
soundCounters = function () {
};
speelSimpelSFX = function (naam, passVar) {
if (_global.quiet != true) {
switch (naam) {
case "snowball" :
sfx_snowball.start();
sfx_snowball_launch.start();
trace("foc..!");
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();
}
};
playLoop = function (loop) {
music_loop = new Sound(_global.sound.musicLoop);
music_loop.attachSound(loop);
music_loop.start(0, 0);
music_loop.onSoundComplete = function () {
this.start(0, 0);
};
music_loop.setVolume(100);
};
playSea = function (loop) {
seaLoop = new Sound(_global.sound.loop);
seaLoop.attachSound(loop);
seaLoop.start(0, 0);
seaLoop.onSoundComplete = function () {
this.start(0, 0);
};
seaLoop.setVolume(50);
};
fadeLoop = function () {
if (seaLoop.getVolume() > 0) {
seaLoop.setVolume(seaLoop.getVolume() - 1);
}
};
stopSound = function () {
seaLoop.stop();
};
_root.sunet = true;
_root.pauza = false;
Frame 176
_global.sound = this.createEmptyMovieClip("soundContainer", 0);
initSounds();
savedData = SharedObject.getLocal("user_data");
_global.saveProgress = savedData.data;
if (_global.saveProgress.level == null) {
_global.saveProgress.level = 1;
}
_global.quiet = false;
playLoop("loop");
_global.countTurns = 0;
Frame 177
stop();
_root.pau._visible = 0;
_root.instructions._visible = false;
saveProgress.flush();
this.mcTitle.skyTitle._width = 550;
startTitle();
initScreen1 = function () {
this.mcTitle.high.onRelease = (this.mcTitle.low.onRelease = function () {
_global.detail = this._name;
if (_global.inGame == true) {
this._parent.gotoAndStop(3);
} else {
this._parent.gotoAndStop(2);
}
initScreen2();
});
};
initScreen2 = function () {
if (_global.inGame == true) {
this.mcTitle.continue_game.onRelease = function () {
this._parent._parent.play();
};
}
this.mcTitle.new_campaign.onRelease = function () {
_global.progress = {level:1, lives:5, points:0};
_global.inGame = true;
_global.twoPlayer = false;
this._parent._parent.play();
};
this.mcTitle.two_player.onRelease = function () {
_global.progress = {level:1, lives:5, points:0};
_global.inGame = false;
_global.twoPlayer = true;
this._parent._parent.gotoAndStop("overview2p");
};
};
if (_global.detail == null) {
initScreen1();
} else if (_global.inGame == true) {
this.mcTitle.gotoAndStop(3);
initScreen2();
} else {
this.mcTitle.gotoAndStop(2);
initScreen2();
}
stopSound();
clearIntervals();
mainContainer.removeMovieClip();
theMeniu.removeMovieClip();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
gameComplete.removeMovieClip();
Frame 178
stop();
_root.pau.removeMovieClip();
_root.theMeniu.removeMovieClip();
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();
};
} 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 = 60;
var bonus = (_global.progress.lives * 5000);
gameComplete.lives = ((("bonus: " + bonus) + " points (") + _global.progress.lives) + " lives left)";
trace("game complete");
} 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++;
}
stopSound();
clearIntervals();
mainContainer.removeMovieClip();
theMeniu.removeMovieClip();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
trace("postcoperta");
Frame 179
stop();
loopBtns = function () {
var _local3 = 1;
while (_local3 < 10) {
if (_local3 > _global.saveProgress.level) {
this.overview["rock_" + _local3].gotoAndStop("locked");
} 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 180
stop();
start();
Instance of Symbol 804 MovieClip "theMeniu" in Frame 180
//component parameters
onClipEvent (construct) {
wxnume = "ConquerAntarctica";
wxaliniere = "Dreapta-Jos";
wxculoare = 5995718 /* 0x5B7CC6 */;
wxdownload = true;
wxpause = true;
wxsound = true;
}
onClipEvent (load) {
this.swapDepths(99999);
}
Frame 181
removeMovieClip(_root.xxc1);
removeMovieClip(_root.xxc2);
removeMovieClip(_root.xxc3);
removeMovieClip(_root.xxc4);
stopSound();
clearIntervals();
mainContainer.removeMovieClip();
theMeniu.removeMovieClip();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
gameComplete.removeMovieClip();
trace("scoreBoard");
Frame 182
_root.menu.removeMovieClip();
_root.gameid = "ConquerAntartica";
_root.best = _global.scor;
_global.scor = 0;
_root.updated = 0;
_root.done = 0;
done = 0;
i = 1;
while (i <= 100) {
_root["score" + i] = null;
_root["name" + i] = null;
_root["escore" + i] = null;
_root["ename" + i] = null;
i++;
}
Frame 184
cale = "http://www.freeonlinegames.com/scoreboard/score.php?game=" + _root.gameid;
loadVariablesNum (cale, 0, "POST");
Frame 192
if (done != 1) {
gotoAndPlay ("loopLoad");
} else {
gotoAndPlay ("scoreTable");
}
Frame 196
monthnume = new Array();
monthscor = new Array();
i = 1;
while (i <= 100) {
monthnume[i] = _root["name" + i];
monthscor[i] = Number(_root["score" + i].slice(0, _root["score" + i].length - 1));
i++;
}
evernume = new Array();
everscor = new Array();
i = 1;
while (i <= 100) {
evernume[i] = _root["ename" + i];
everscor[i] = Number(_root["escore" + i].slice(0, _root["escore" + i].length - 1));
i++;
}
Frame 197
stop();
if (_root.best > everscor[100]) {
scoreWind.gotoAndStop("submitScoreYes");
} else {
scoreWind.gotoAndStop("submitScoreNo");
}
if (_root.xdada == 1) {
scoreWind.gotoAndStop("topEver");
}
Symbol 588 Button
on (release) {
}
Symbol 592 MovieClip Frame 1
stop();
Symbol 52 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, _local4);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!_local16)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var _local4 = new Color(skinMCRef);
_local4.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 65 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 74 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 83 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 84 MovieClip [UpArrow] Frame 1
stop();
Symbol 84 MovieClip [UpArrow] Frame 2
stop();
Symbol 84 MovieClip [UpArrow] Frame 3
stop();
Symbol 90 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 99 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 104 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 105 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 113 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 121 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 129 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 130 MovieClip [DownArrow] Frame 1
stop();
Symbol 130 MovieClip [DownArrow] Frame 2
stop();
Symbol 130 MovieClip [DownArrow] Frame 3
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 171 MovieClip [mcShootCannon] Frame 1
trace(this);
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 171 MovieClip [mcShootCannon] Frame 2
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 _local6 = parentMc._xmouse - point._x;
var _local5 = parentMc._ymouse - point._y;
var _local8 = Math.atan2(_local5, _local6);
var _local3 = getMouseDist(point);
var _local7 = getDist(handle, point);
if (_local3 > handleLength) {
var _local4 = handleLength - _local3;
handle._x = parentMc._xmouse + (Math.cos(_local8) * _local4);
handle._y = parentMc._ymouse + (Math.sin(_local8) * _local4);
} else if (_local3 < clearHandle) {
var _local9 = true;
handle._x = point._x + (Math.cos(_local8) * clearHandle);
handle._y = point._y + (Math.sin(_local8) * clearHandle);
} else {
handle._x = parentMc._xmouse;
handle._y = parentMc._ymouse;
}
var _local2 = _local7;
if (_local2 < 10) {
_local2 = 10;
}
_global.cannonPower = calcPower(_local2);
if (handle._x < point._x) {
handle._x = point._x;
if (handleRot != 0) {
if ((handle._y - point._y) < clearHandle) {
handle._y = point._y + clearHandle;
}
}
}
if (handle._y < point._y) {
handle._y = point._y;
if ((handle._x - point._x) < clearHandle) {
handle._x = point._x + clearHandle;
}
}
_local6 = handle._x - point._x;
_local5 = handle._y - point._y;
_local8 = Math.atan2(_local5, _local6);
var handleRot = (((Math.PI + _local8) * 180) / Math.PI);
handle._rotation = handleRot;
_global.cannonRotation = handleRot;
};
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 = 225;
var d = getDist(handle, point);
_global.cannonPower = calcPower(d);
Symbol 174 MovieClip [mcFlits] Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 180 MovieClip [mcSplash] Frame 1
stop();
this.onEnterFrame = function () {
this._rotation = this._rotation + ((90 - this._rotation) / 20);
};
this.gotoAndStop(random(5) + 1);
Symbol 197 MovieClip [mcSnowflake] Frame 1
stop();
Symbol 202 MovieClip Frame 1
this._visible = false;
Symbol 204 MovieClip Frame 1
this._visible = false;
Symbol 205 MovieClip [mcRaft] Frame 1
stop();
Symbol 209 MovieClip [mcSnowball] Frame 1
stop();
this.airrot = 20 - random(41);
this.onEnterFrame = function () {
this.airrot = this.airrot * 0.96;
this._rotation = this._rotation + this.airrot;
};
Symbol 209 MovieClip [mcSnowball] Frame 2
this.airrot = 30 - random(61);
Symbol 209 MovieClip [mcSnowball] Frame 3
this.airrot = 30 - random(61);
Symbol 212 MovieClip Frame 1
this._visible = false;
Symbol 219 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
stop();
holder._visible = false;
Symbol 230 MovieClip Frame 13
if (Math.random() > 0.5) {
this.gotoAndStop(1);
}
Symbol 236 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 236 MovieClip Frame 9
this.timesplayed++;
Symbol 292 MovieClip Frame 9
stop();
this.tel = 30 + random(80);
this.onEnterFrame = function () {
this.tel--;
if (this.tel <= 0) {
this.play();
}
};
Symbol 292 MovieClip Frame 15
this._parent.gotoAndStop("stand");
Symbol 295 MovieClip Frame 1
this.waveDir = -3;
this.waveCount = 0;
this.onEnterFrame = function () {
if (this._rotation < -30) {
this.waveCount++;
this.waveDir = 4;
} else if (this._rotation > 20) {
this.waveCount++;
this.waveDir = -3;
}
this._rotation = this._rotation + this.waveDir;
if (this.waveCount > 4) {
this._parent.gotoAndStop("sit");
}
};
Symbol 314 MovieClip Frame 1
flag.gotoAndStop(4);
Symbol 314 MovieClip Frame 3
flag.gotoAndStop(3);
Symbol 314 MovieClip Frame 5
flag.gotoAndStop(2);
Symbol 314 MovieClip Frame 7
flag.gotoAndStop(1);
Symbol 314 MovieClip Frame 21
flag.gotoAndStop(5);
Symbol 314 MovieClip Frame 23
flag.gotoAndStop(6);
Symbol 314 MovieClip Frame 25
flag.gotoAndStop(7);
Symbol 314 MovieClip Frame 27
flag.gotoAndStop(8);
Symbol 315 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 1
this.waveDir = -3;
this.waveCount = 0;
this.onEnterFrame = function () {
if (this._rotation < -30) {
this.waveCount++;
this.waveDir = 4;
} else if (this._rotation > 20) {
this.waveCount++;
this.waveDir = -3;
}
this._rotation = this._rotation + this.waveDir;
if (this.waveCount > 4) {
this._parent.gotoAndStop("sit");
}
};
Symbol 367 MovieClip Frame 1
flag.gotoAndStop(4);
Symbol 367 MovieClip Frame 3
flag.gotoAndStop(3);
Symbol 367 MovieClip Frame 5
flag.gotoAndStop(2);
Symbol 367 MovieClip Frame 7
flag.gotoAndStop(1);
Symbol 367 MovieClip Frame 21
flag.gotoAndStop(5);
Symbol 367 MovieClip Frame 23
flag.gotoAndStop(6);
Symbol 367 MovieClip Frame 25
flag.gotoAndStop(7);
Symbol 367 MovieClip Frame 27
flag.gotoAndStop(8);
Symbol 369 MovieClip Frame 1
stop();
Symbol 376 MovieClip [mcSmoke] Frame 9
stop();
Symbol 386 MovieClip [mcExpFire1] Frame 62
this.remove = true;
stop();
Symbol 393 MovieClip [mcExpFire2] Frame 66
this.remove = true;
stop();
Symbol 400 MovieClip [mcExpSmoke] Frame 49
this.remove = true;
stop();
Symbol 401 MovieClip [mcExpCloud] Frame 33
this.remove = true;
stop();
Symbol 409 MovieClip [mcGrenade] Frame 1
stop();
this.airrot = 40 - random(81);
this.onEnterFrame = function () {
this.airrot = this.airrot * 0.98;
this._rotation = this._rotation + this.airrot;
};
Symbol 411 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 422 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
}
Symbol 430 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 430 MovieClip Frame 2
wxculoarea2 = new Color(but1);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 430 MovieClip Frame 3
wxculoarea2 = new Color(but1);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 431 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
}
Symbol 438 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 438 MovieClip Frame 2
wxculoarea2 = new Color(but2);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 438 MovieClip Frame 3
wxculoarea2 = new Color(but2);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 439 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wynume;
}
Symbol 442 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 442 MovieClip Frame 2
wxculoarea2 = new Color(but3);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 442 MovieClip Frame 3
wxculoarea2 = new Color(but3);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 447 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
}
Symbol 448 MovieClip Frame 1
stop();
Symbol 451 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
}
Symbol 452 MovieClip Frame 1
stop();
Symbol 453 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 460 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 460 MovieClip Frame 2
wxculoarea2 = new Color(but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 460 MovieClip Frame 3
wxculoarea2 = new Color(but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
Symbol 461 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 462 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
function instructionsFunction() {
_root.instructions._visible = 1;
_parent.MNIU._visible = false;
_parent.low._visible = false;
_parent.high._visible = false;
_parent.detail._visible = false;
_parent.continue_game._visible = false;
_parent.new_campaign._visible = false;
_parent.two_player._visible = false;
}
stop();
if ((wyasezare == "Orizontal") && (wyinstructions == false)) {
this.gotoAndStop(2);
}
if (((wyasezare == "Vertical") && (wyinstructions == true)) && (wypozitie == "Sus")) {
this.gotoAndStop(3);
}
if (((wyasezare == "Vertical") && (wyinstructions == true)) && (wypozitie == "Jos")) {
this.gotoAndStop(4);
}
if (((wyasezare == "Orizontal") && (wyinstructions == true)) && (wypozitie == "Sus")) {
this.gotoAndStop(5);
}
if (((wyasezare == "Orizontal") && (wyinstructions == true)) && (wypozitie == "Jos")) {
this.gotoAndStop(6);
}
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 463 MovieClip Frame 2
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 463 MovieClip Frame 3
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 463 MovieClip Frame 4
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 463 MovieClip Frame 5
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 463 MovieClip Frame 6
stop();
my_color = new Color(my_mc);
my_color.setRGB(wyculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wynbut1.but1);
wxculoarea3 = new Color(wynbut2.but2);
wxculoarea4 = new Color(wynbut3.but3);
wxculoarea5 = new Color(wynbut4.but4);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3.setTransform(myColorTransform);
wxculoarea4.setTransform(myColorTransform);
wxculoarea5.setTransform(myColorTransform);
Symbol 466 Button
on (release) {
_root.gotoAndPlay("begin");
_parent.removeMovieClip();
}
Symbol 478 Button
on (release) {
_root.xdada = 0;
_root.gotoAndPlay("submitScorex");
trace("scor: " + _global.scor);
}
Symbol 481 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 491 MovieClip [mcFinishMessage] Frame 1
stop();
Instance of Symbol 463 MovieClip "MNIU" in Symbol 491 MovieClip [mcFinishMessage] Frame 1
//component parameters
onClipEvent (construct) {
wynume = "ConquerAntarctica";
wyculoare = 5995718 /* 0x5B7CC6 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Jos";
wyinstructions = false;
}
Symbol 491 MovieClip [mcFinishMessage] Frame 3
stop();
Symbol 491 MovieClip [mcFinishMessage] Frame 5
stop();
Symbol 502 MovieClip [mcBeginMessage] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 519 MovieClip [mcGameOver] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Instance of Symbol 463 MovieClip "MNIU" in Symbol 519 MovieClip [mcGameOver] Frame 1
//component parameters
onClipEvent (construct) {
wynume = "ConquerAntarctica";
wyculoare = 5995718 /* 0x5B7CC6 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Jos";
wyinstructions = false;
}
Instance of Symbol 512 MovieClip in Symbol 519 MovieClip [mcGameOver] Frame 1
on (release) {
_root.gotoAndStop("begin");
}
Instance of Symbol 514 MovieClip in Symbol 519 MovieClip [mcGameOver] Frame 1
on (release) {
_root.gotoAndPlay("submitScore");
}
Symbol 527 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 530 MovieClip [mcHighScores] Frame 1
Selection.setFocus("input_name");
Symbol 540 MovieClip [mcGameComplete] Frame 1
stop();
Instance of Symbol 463 MovieClip "MNIU" in Symbol 540 MovieClip [mcGameComplete] Frame 1
//component parameters
onClipEvent (construct) {
wynume = "ConquerAntarctica";
wyculoare = 5995718 /* 0x5B7CC6 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Jos";
wyinstructions = false;
}
Instance of Symbol 512 MovieClip in Symbol 540 MovieClip [mcGameComplete] Frame 1
on (release) {
_root.gotoAndStop("begin");
}
Instance of Symbol 514 MovieClip in Symbol 540 MovieClip [mcGameComplete] Frame 1
on (release) {
_root.xdada = 0;
_root.gotoAndPlay("submitScorex");
trace("scor: " + _global.scor);
}
Symbol 555 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 556 MovieClip [FScrollBarSymbol] Frame 1
#initclip 2
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
_local2 = Math.min(_local2, this.maxPos);
this.setScrollPosition(Math.max(_local2, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local3 = this.enable;
if (enabledFlag && (!_local3)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (_local3)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local3 = this.smallScroll;
if (inc != "one") {
_local3 = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var _local2 = this.getScrollPosition() + (mode * _local3);
if (_local2 > this.maxPos) {
_local2 = this.maxPos;
} else if (_local2 < this.minPos) {
_local2 = this.minPos;
}
this.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var _local2 = this.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (this._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var _local3 = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxhscroll));
} else {
var _local3 = this.textField.scroll;
var _local2 = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(_local2, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 559 MovieClip [mcRock9] Frame 1
stop();
Symbol 559 MovieClip [mcRock9] Frame 2
stop();
Symbol 562 MovieClip [mcRock8] Frame 1
stop();
Symbol 562 MovieClip [mcRock8] Frame 2
stop();
Symbol 565 MovieClip [mcRock7] Frame 1
stop();
Symbol 565 MovieClip [mcRock7] Frame 2
stop();
Symbol 568 MovieClip [mcRock6] Frame 1
stop();
Symbol 568 MovieClip [mcRock6] Frame 2
stop();
Symbol 571 MovieClip [mcRock5] Frame 1
stop();
Symbol 571 MovieClip [mcRock5] Frame 2
stop();
Symbol 574 MovieClip [mcRock4] Frame 1
stop();
Symbol 574 MovieClip [mcRock4] Frame 2
stop();
Symbol 577 MovieClip [mcRock3] Frame 1
stop();
Symbol 577 MovieClip [mcRock3] Frame 2
stop();
Symbol 580 MovieClip [mcRock2] Frame 1
stop();
Symbol 580 MovieClip [mcRock2] Frame 2
stop();
Symbol 583 MovieClip [mcRock1] Frame 1
stop();
Symbol 583 MovieClip [mcRock1] Frame 2
stop();
Symbol 602 MovieClip Frame 1
stop();
Symbol 612 MovieClip Frame 50
stop();
_parent.play();
Symbol 635 MovieClip Frame 1
stop();
Symbol 635 MovieClip Frame 28
gotoAndPlay ("loop");
Symbol 640 MovieClip Frame 1
this._visible = false;
Symbol 641 MovieClip Frame 1
this.sW = 550;
this.sH = 400;
attachMenuFlake = function (mc, optionStart) {
var _local5 = mc.getNextHighestDepth();
var _local2 = mc.attachMovie("mcSNowFlake", "flake" + _local5, _local5);
_local2._x = random(mc.sW);
_local2._xscale = 150;
_local2._yscale = 150;
if (optionStart == true) {
_local2._y = random(mc.sH);
} else {
_local2._y = 0;
}
_local2.snowfallspeed = 1 + random(5);
_local2.distance = (_local2.snowfallspeed / 15) + 0.4;
var _local3;
if (_local2.snowfallspeed < 2) {
_local3 = 1;
} else if (_local2.snowfallspeed < 4) {
_local3 = 2;
} else {
_local3 = 3;
}
_local2.gotoAndStop(_local3);
_local2.onEnterFrame = function () {
this._x = this._x + 0;
this._y = this._y + this.snowfallspeed;
if ((this._x < 0) || (this._x > this._parent.sW)) {
this.removeMovieClip();
} else if ((this._y < 0) || (this._y > this._parent.sH)) {
this.removeMovieClip();
}
};
};
if (_global.detail != "low") {
var i = 0;
while (i < 29) {
attachMenuFlake(this, true);
i++;
}
}
this.onEnterFrame = function () {
if (_global.detail != "low") {
var _local3 = 0;
for (var _local4 in this) {
_local3++;
}
if (_local3 < 28) {
if (Math.random() > 0.7) {
attachMenuFlake(this);
}
}
}
};
Symbol 643 MovieClip Frame 1
this._visible = false;
Symbol 658 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 658 MovieClip Frame 3
stop();
this.onRollOver = function () {
this.gotoAndStop(4);
};
this.onRollOut = function () {
this.gotoAndStop(3);
};
this.onReleaseOutside = function () {
this.gotoAndStop(3);
};
Symbol 667 Button
on (release) {
}
Symbol 674 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 678 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 682 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 683 MovieClip Frame 1
stop();
this.low.gotoAndStop("low");
this.high.gotoAndStop("high");
Instance of Symbol 463 MovieClip "MNIU" in Symbol 683 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
wynume = "ConquerAntarctica";
wyculoare = 5995718 /* 0x5B7CC6 */;
wyasezare = "Vertical";
wyaliniere = "Centru";
wypozitie = "Jos";
wyinstructions = true;
}
Symbol 683 MovieClip Frame 2
this.new_campaign._alpha = (this.two_player._alpha = 0);
this.set_alpha = 0;
this.onEnterFrame = function () {
this.set_alpha = this.set_alpha + 4;
this.new_campaign._alpha = (this.two_player._alpha = this.set_alpha);
if (this.set_alpha >= 100) {
delete this.onEnterFrame;
this.new_campaign._alpha = (this.two_player._alpha = 100);
}
};
Symbol 683 MovieClip Frame 3
this.continue_game._alpha = (this.new_campaign._alpha = (this.two_player._alpha = 0));
this.set_alpha = 0;
this.onEnterFrame = function () {
this.set_alpha = this.set_alpha + 4;
this.continue_game._alpha = (this.new_campaign._alpha = (this.two_player._alpha = this.set_alpha));
if (this.set_alpha >= 100) {
delete this.onEnterFrame;
this.continue_game._alpha = (this.new_campaign._alpha = (this.two_player._alpha = 100));
}
};
Symbol 689 Button
on (release) {
_root.instructions._visible = 0;
_root.mcTitle.MNIU._visible = true;
_root.mcTitle.low._visible = true;
_root.mcTitle.high._visible = true;
_root.mcTitle.detail._visible = true;
_root.mcTitle.continue_game._visible = true;
_root.mcTitle.new_campaign._visible = true;
_root.mcTitle.two_player._visible = true;
}
Symbol 718 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 728 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 751 MovieClip Frame 1
stop();
Symbol 760 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wxnume;
}
Symbol 761 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wxnume;
}
Symbol 762 Button
on (release) {
_parent.mainMenuFunction();
}
Symbol 763 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wxnume) + ".exe";
}
Symbol 764 Button
on (release, keyPress "p") {
_parent.pauseFunction();
}
Symbol 765 Button
on (release, keyPress "s") {
_parent.soundFunction();
}
Symbol 776 MovieClip Frame 1
stop();
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
_parent.wxbutno = 6;
if (((_parent.wxdownload == false) && (_parent.wxpause == true)) && (_parent.wxsound == true)) {
this.gotoAndStop(2);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == false)) && (_parent.wxsound == true)) {
this.gotoAndStop(3);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == true)) && (_parent.wxsound == false)) {
this.gotoAndStop(4);
_parent.wxbutno = 5;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == false)) && (_parent.wxsound == true)) {
this.gotoAndStop(5);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == true)) && (_parent.wxsound == false)) {
this.gotoAndStop(6);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == true) && (_parent.wxpause == false)) && (_parent.wxsound == false)) {
this.gotoAndStop(7);
_parent.wxbutno = 4;
}
if (((_parent.wxdownload == false) && (_parent.wxpause == false)) && (_parent.wxsound == false)) {
this.gotoAndStop(8);
_parent.wxbutno = 3;
}
Symbol 776 MovieClip Frame 2
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 3
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 4
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 5
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 6
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 7
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 776 MovieClip Frame 8
wxculoarea3 = new Color(but1);
wxculoarea4 = new Color(but2);
wxculoarea5 = new Color(but3);
wxculoarea6 = new Color(but4);
wxculoarea7 = new Color(but5);
wxculoarea8 = new Color(but6);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:_parent.xrtb5, ga:"100", gb:_parent.xgtb5, ba:"100", bb:_parent.xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
wxculoarea4.setTransform(myColorTransform2);
wxculoarea5.setTransform(myColorTransform2);
wxculoarea6.setTransform(myColorTransform2);
wxculoarea7.setTransform(myColorTransform2);
wxculoarea8.setTransform(myColorTransform2);
Symbol 781 Button
on (press) {
_parent.play();
}
Symbol 784 MovieClip Frame 1
stop();
if (_parent.wxaliniere == "Dreapta-Jos") {
this.gotoAndStop(2);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 6)) {
this.gotoAndStop(3);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 5)) {
this.gotoAndStop(5);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 4)) {
this.gotoAndStop(6);
}
if ((_parent.wxaliniere == "Dreapta-Sus") && (_parent.wxbutno == 3)) {
this.gotoAndStop(7);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 6)) {
this.gotoAndStop(4);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 5)) {
this.gotoAndStop(8);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 4)) {
this.gotoAndStop(9);
}
if ((_parent.wxaliniere == "Stanga-Sus") && (_parent.wxbutno == 3)) {
this.gotoAndStop(10);
}
Symbol 784 MovieClip Frame 2
tg._x = 147;
tg._y = 1.1;
Symbol 784 MovieClip Frame 3
tg._x = 147;
tg._y = -174.9;
Symbol 784 MovieClip Frame 4
tg._x = 1.5;
tg._y = -174.9;
Symbol 784 MovieClip Frame 5
tg._x = 147;
tg._y = -152.4;
Symbol 784 MovieClip Frame 6
tg._x = 147;
tg._y = -128.9;
Symbol 784 MovieClip Frame 7
tg._x = 147;
tg._y = -104.9;
Symbol 784 MovieClip Frame 8
tg._x = 1.5;
tg._y = -151.4;
Symbol 784 MovieClip Frame 9
tg._x = 1.5;
tg._y = -128.4;
Symbol 784 MovieClip Frame 10
tg._x = 1.5;
tg._y = -104.9;
Symbol 802 MovieClip Frame 1
stop();
this.onRollOver = function () {
if (_parent._parent._currentframe <= 10) {
_parent._parent.gotoAndPlay(11);
}
};
if (_parent._parent.wxbutno == 5) {
this.gotoAndStop(2);
}
if (_parent._parent.wxbutno == 4) {
this.gotoAndStop(3);
}
if (_parent._parent.wxbutno == 3) {
this.gotoAndStop(4);
}
Symbol 803 MovieClip Frame 1
stop();
if ((_parent.wxaliniere == "Stanga-Sus") || (_parent.wxaliniere == "Dreapta-Sus")) {
this.gotoAndStop(2);
}
Symbol 804 MovieClip Frame 1
function pauseFunction() {
_root.theMeniu.gotoAndStop("deskis");
if (_root.pauza == false) {
_root.pauza = true;
_root.pau._visible = 1;
_root.pau.swapDepths(99998);
_root.hudContainer.mcShootCannon._visible = false;
} else {
_root.theMeniu.gotoAndStop("inkis");
_root.pauza = false;
_root.pau._visible = 0;
_root.hudContainer.mcShootCannon._visible = true;
}
}
function soundFunction() {
if (_root.sunet == true) {
_root.sunet = false;
_global.quiet = true;
_root.music_loop.stop();
_root.seaLoop.stop();
} else {
_root.sunet = true;
_global.quiet = false;
_root.playLoop("loop");
_root.seaLoop.start(0, 9999);
}
}
function mainMenuFunction() {
if (_root.pauza == false) {
stopSound();
clearIntervals();
mainContainer.removeMovieClip();
theMeniu.removeMovieClip();
sky.removeMovieClip();
hud.removeMovieClip();
main.removeMovieClip();
_root.gotoAndStop("begin");
}
}
stop();
wxnguides._alpha = 0;
my_color = new Color(my_mc);
my_color.setRGB(wxculoare);
myValue = my_color.getRGB().toString(16);
trace(myValue.length);
if (myValue.length == 5) {
myValue = "0" + myValue;
}
if (myValue.length == 4) {
myValue = "00" + myValue;
}
if (myValue.length == 3) {
myValue = "000" + myValue;
}
if (myValue.length == 2) {
myValue = "0000" + myValue;
}
if (myValue.length == 1) {
myValue = "00000" + myValue;
}
xtbcolor = myValue;
xrtb5 = Number("0x" + xtbcolor.slice(0, 2)) - 1;
xgtb5 = Number("0x" + xtbcolor.slice(2, 4)) - 1;
xbtb5 = Number("0x" + xtbcolor.slice(4, 6)) - 1;
wxculoarea2 = new Color(wxnmenu.tg);
myColorTransform = new Object();
myColorTransform = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea2.setTransform(myColorTransform);
wxculoarea3 = new Color(wxnfer);
myColorTransform2 = new Object();
myColorTransform2 = {ra:"100", rb:xrtb5, ga:"100", gb:xgtb5, ba:"100", bb:xbtb5, aa:"100", ab:"0"};
wxculoarea3.setTransform(myColorTransform2);
Symbol 804 MovieClip Frame 10
stop();
Symbol 804 MovieClip Frame 20
gotoAndStop (1);
Symbol 809 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 220);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
i = 1;
while (i <= 30) {
scoresScroll["n" + i].text = _root.monthnume[i];
scoresScroll["s" + i].text = _root.monthscor[i];
i++;
}
Symbol 816 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 1121 MovieClip Frame 1
scroll1.setScrollProperties(130, 0, 915);
this.chHand1 = function () {
scoresScroll._y = -(scroll1.getScrollPosition() * 2);
};
scroll1.setChangeHandler("chHand1");
q = 1;
while (q <= 100) {
scoresScroll["n" + q].text = _root.evernume[q];
scoresScroll["s" + q].text = _root.everscor[q];
q++;
}
Instance of Symbol 556 MovieClip [FScrollBarSymbol] "scroll1" in Symbol 1121 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}
Symbol 1127 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 1143 Button
on (release) {
i = 1;
while (i <= 100) {
if (_root.best > _root.monthscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.monthscor[k] = _root.monthscor[k - 1];
_root.monthnume[k] = _root.monthnume[k - 1];
k--;
}
_root.monthscor[i] = _root.best;
_root.monthnume[i] = _root.nickname;
i = 31;
}
i++;
}
i = 1;
while (i <= 100) {
if (_root.best > _root.everscor[i]) {
k = 100;
while (k >= (i + 1)) {
_root.everscor[k] = _root.everscor[k - 1];
_root.evernume[k] = _root.evernume[k - 1];
k--;
}
_root.everscor[i] = _root.best;
_root.evernume[i] = _root.nickname;
i = 31;
}
i++;
}
gotoAndPlay ("submit");
}
Symbol 1149 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 1153 MovieClip Frame 1
stop();
Symbol 1153 MovieClip Frame 9
stop();
Symbol 1153 MovieClip Frame 22
stop();
Symbol 1153 MovieClip Frame 34
var my_date = new Date();
codul = Math.round(my_date.getTime() / 1000) * _root.best;
cale = (((((("http://www.freeonlinegames.com/scoreboard/update.php?game=" + _root.gameid) + "&name=") + _root.nickname) + "&score=") + _root.best) + "&code=") + codul;
loadVariablesNum (cale, 0, "GET");
gotoAndPlay ("loop");
Symbol 1153 MovieClip Frame 45
if (_root.updated != 1) {
gotoAndPlay ("loop");
} else {
_root.best = 0;
_root.score = 0;
_root.xdada = 1;
_root.gotoAndPlay("submitScore");
}