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
_root.locatie = _url;
if (_root.locatie.indexOf("freeonlinegames", 0) != -1) {
_root.play();
} else {
_root.gotoAndPlay("loop1");
}
Frame 174
_root.locatie = _url;
if (_root.locatie.indexOf("freeonlinegames", 0) != -1) {
_root.play();
} else {
_root.gotoAndPlay("loop1");
}
Frame 175
tuigListener = new Object();
Key.addListener(tuigListener);
menuListener = new Object();
Key.addListener(menuListener);
Frame 176
function advCollision(mc1, mc2) {
var _local1 = mc1.getBounds(mc1);
var _local2 = mc2.getBounds(mc1);
return((((_local1.xMin <= _local2.xMax) && (_local1.xMax >= _local2.xMin)) && (_local1.yMin <= _local2.yMax)) && (_local1.yMax >= _local2.yMin));
}
function crObjMC(n, grFlag) {
if (grFlag == true) {
var _local3 = graphs.createEmptyMovieClip(n, n);
} else {
var _local3 = scr.createEmptyMovieClip(n, n);
_local3.helling = oInfo[n];
}
_local3._x = oX[n];
_local3._y = oY[n];
var _local2 = oTiles[n];
var _local1 = _local2.length / 4;
while (_local1--) {
tellTarget (_local3.attachMovie(_local2[_local1 * 4], _local1, _local1)) {
_x = _local2[(_local1 * 4) + 1];
_y = _local2[(_local1 * 4) + 2];
gotoAndStop(_local2[(_local1 * 4) + 3]);
};
}
nOfVisObj++;
}
function dr() {
var _local5 = int(xPosTravel);
var _local4 = int(yPosTravel);
var _local2 = int(_local5 / standaardW);
var _local1 = int(_local4 / standaardH);
if ((_local2 == oldax) && (_local1 == olday)) {
for (var _local12 in scr) {
if (!oV[_local12]) {
removeMovieClip(scr[_local12]);
break;
}
}
for (var _local12 in graphs) {
if (!oV[_local12]) {
removeMovieClip(graphs[_local12]);
break;
}
}
} else {
oldax = _local2;
olday = _local1;
ar = [];
for (var _local12 in a[_local2][_local1]) {
ar[_local12] = true;
}
for (var _local12 in a[_local2 + 1][_local1]) {
ar[_local12] = true;
}
for (var _local12 in a[_local2][_local1 + 1]) {
ar[_local12] = true;
}
for (var _local12 in a[_local2 + 1][_local1 + 1]) {
ar[_local12] = true;
}
for (var _local12 in a[_local2 + 2][_local1]) {
ar[_local12] = true;
}
for (var _local12 in a[_local2 + 2][_local1 + 1]) {
ar[_local12] = true;
}
}
var _local9 = oX;
var _local7 = oY;
var _local8 = oX_oW;
var _local6 = oY_oH;
var _local11 = _local5 + sW;
var _local10 = _local4 + sH;
var _local3 = oType;
oV = [];
for (var _local12 in ar) {
if (_local8[_local12] > _local5) {
if (_local9[_local12] < _local11) {
if (_local6[_local12] > _local4) {
if (_local7[_local12] < _local10) {
oV[_local12] = true;
if (_local3[_local12] == "nm") {
if (!scr[_local12]) {
crObjMC(_local12);
}
} else if (_local3[_local12] == "gr") {
if (drawGraphs == true) {
if (!graphs[_local12]) {
crObjMC(_local12, true);
}
}
}
}
}
}
}
}
}
function init() {
memMcPos = 0;
noo = oX.length;
oldax = null;
olday = null;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
ticks = 0;
xdraw = 600;
ydraw = 750;
oX_oW = [];
oY_oH = [];
nOfVisObj = 0;
var _local2 = 0;
while (_local2 < noo) {
oX_oW[_local2] = oX[_local2] + oW[_local2];
oY_oH[_local2] = oY[_local2] + oH[_local2];
_local2++;
}
registerObjectsToAreas();
areaLineHMC._x = sOffx;
areaLineHMC._width = sW;
areaLineVMC._y = sOffy;
areaLineVMC._height = sH;
welcomeScreen.gotoAndStop(2);
zeeniveau = (sH + sOffy) - 20;
memSchermFactor = 520;
zoemPerc = 100;
iniMaxSnelheid = 10;
bergtegel_w = 800;
kleinebergtegel_w = 100;
halfObject = 200;
intRandomGetal = Math.random();
langRandomGetal = Math.random();
plusminRand = 1;
bonus = 0;
rocketsFired = 0;
bulletsFired = 0;
bombsFired = 0;
rocketsHit = 0;
bulletsHit = 0;
bombsHit = 0;
enemyShipSunk = false;
startTijd = Math.floor(getTimer() / 1000);
lastFortCrash = getTimer();
lastDogCrash = getTimer();
carrierDamage = 0;
maxCarrierDamage = 350;
dogStopScript = 0;
memCarrierDamage = 0;
if (baanlinks > schiplinks) {
dogVanLinks = false;
} else {
dogVanLinks = true;
}
gameStopTimer = null;
if (_global.userData[_global.currentPlayer].mute == true) {
muteSounds = true;
} else {
muteSounds = false;
}
crashTime = getTimer();
}
function oncePerSecond() {
hud.mcTopHud.fpsText = ticks - oldticks;
oldticks = ticks;
}
function registerObjectsToAreas() {
if (!((sW > 0) && (sH > 0))) {
return(undefined);
}
a = [];
a_gr = [];
var _local6 = Math.max;
var _local3 = 0;
while (_local3 < noo) {
var _local8 = _local6(int(oX[_local3] / sW), 0);
var _local5 = _local6(int(oY[_local3] / sH), 0);
var _local7 = _local6(int(oX_oW[_local3] / sW), 0);
var _local4 = _local6(int(oY_oH[_local3] / sH), 0);
var _local1 = _local8;
while (_local1 <= _local7) {
var _local2 = _local5;
while (_local2 <= _local4) {
if (a[_local1] == undefined) {
a[_local1] = [];
}
if (a[_local1][_local2] == undefined) {
a[_local1][_local2] = [];
}
a[_local1][_local2][_local3] = true;
_local2++;
}
_local1++;
}
_local3++;
}
}
function generateStandaard(x, y) {
oX.push(x);
oY.push(y);
oTiles.push([0, 40, 20, 1, 0, 80, 20, 1]);
oW.push(80);
oH.push(20);
oInfo.push(0);
oType.push("nm");
}
function loadMap(xml) {
oX = [];
oY = [];
oTiles = [];
oW = [];
oH = [];
oInfo = [];
oType = [];
oGraphics = [];
aVijanden = new Array();
aObjecten = new Array();
aGebouwen = new Array();
aKeerpunten = new Array();
aKenmerken = new Array();
aSchepen = new Array();
aHealthBars = new Array();
bodem = mapHoogte - 20;
aGebouwTypen = Array("hut", null, "hut", null, "bunker", "hangar", null, "toren", null);
var _local24 = xml.firstChild;
var _local11 = _local24.childNodes;
var _local14 = 0;
while (_local14 < _local11.length) {
var _local7 = _local11[_local14].childNodes;
oX.push(int(_local11[_local14].attributes.xpos));
oY.push(int(_local11[_local14].attributes.ypos));
oW.push(int(_local11[_local14].attributes.width));
oH.push(int(_local11[_local14].attributes.height));
oType.push("nm");
oInfo.push(int(_local11[_local14].attributes.helling));
var _local8 = [];
var _local3 = 0;
while (_local3 < _local7.length) {
_local8.push(_local7[_local3].attributes.tegelnaam);
_local8.push(int(_local7[_local3].attributes.xpos));
_local8.push(int(_local7[_local3].attributes.ypos));
_local8.push(int(_local7[_local3].attributes.frame));
_local3++;
}
oTiles.push(_local8);
_local14++;
}
var _local23 = _local24.nextSibling;
var _local15 = _local23.childNodes;
_local14 = 0;
while (_local14 < _local15.length) {
var _local6 = new Array();
_local6.xpos = int(_local15[_local14].attributes.xpos);
_local6.ypos = int(_local15[_local14].attributes.ypos);
_local6.type = _local15[_local14].attributes.type;
if (_local6.type == "soldaat") {
var _local17 = 1.5 + (Math.random() * 1.5);
_local6.loopsnelheid = _local17;
_local6.status = "binnen";
_local6.richting = "links";
} else {
_local6.status = "actief";
}
_local6.schade = 0;
aVijanden.push(_local6);
_local14++;
}
var _local25 = _local23.nextSibling;
var _local9 = _local25.childNodes;
_local14 = 0;
while (_local14 < _local9.length) {
var _local2 = new Array();
_local2.xpos = int(_local9[_local14].attributes.xpos);
_local2.ypos = int(_local9[_local14].attributes.ypos);
_local2.type = _local9[_local14].attributes.type;
var _local18 = (_local2.frame = int(_local9[_local14].attributes.frame));
_local2.schade = 0;
_local2.status = "actief";
_local2.xMin = int(_local9[_local14].attributes.links);
_local2.xMax = int(_local9[_local14].attributes.rechts);
_local2.yMin = int(_local9[_local14].attributes.top);
_local2.yMax = int(_local9[_local14].attributes.bottom);
if (_local2.type == "gebouwen") {
gebtype = aGebouwTypen[_local18 - 1];
if (gebtype == "hut") {
_local2.occupado = 2;
_local2.maxOccupado = 8;
}
if (gebtype == "bunker") {
_local2.occupado = 4;
_local2.maxOccupado = 4;
_local2.tel = 0;
}
if (gebtype == "hangar") {
_local2.occupado = 0;
_local2.maxOccupado = 0;
}
aGebouwen.push(_local2);
} else {
aObjecten.push(_local2);
}
_local14++;
}
var _local22 = _local25.nextSibling;
var _local12 = _local22.childNodes;
_local14 = 0;
while (_local14 < _local12.length) {
var _local5 = _local12[_local14].childNodes;
oX.push(int(_local12[_local14].attributes.xpos));
oY.push(int(_local12[_local14].attributes.ypos));
oW.push(int(_local12[_local14].attributes.width));
oH.push(int(_local12[_local14].attributes.height));
oInfo.push(0);
oType.push("gr");
var _local8 = [];
var _local3 = 0;
while (_local3 < _local5.length) {
_local8.push(_local5[_local3].attributes.tegelnaam);
_local8.push(int(_local5[_local3].attributes.xpos));
_local8.push(int(_local5[_local3].attributes.ypos));
_local8.push(int(_local5[_local3].attributes.frame));
_local3++;
}
oTiles.push(_local8);
_local14++;
}
aGroundLevelY = [];
aGroundLevelX = [];
var _local21 = _local22.nextSibling;
var _local20 = _local21.childNodes;
var _local16 = 0;
_local14 = 0;
while (_local14 < _local20.length) {
var _local1 = _local20[_local14].attributes;
if (_local1.type == "roer") {
aSchepen[_local16] = new Array();
var _local10 = aSchepen[_local16];
_local10.rechts = int(_local1.xpos);
_local10.schipnaam = _local1.schipnaam;
_local10.schade = 0;
_local10.zinkplus = 0;
if (_local1.schipnaam == "carrier") {
_local10.maxschade = 350;
} else if (_local1.schipnaam == "enemycarrier") {
_local10.maxschade = 250;
} else {
_local10.maxschade = 80;
}
schiprechts = int(_local1.xpos) - 10;
}
if (_local1.type == "boeg") {
aSchepen[_local16].links = int(_local1.xpos);
schiplinks = int(_local1.xpos) + 10;
_local16++;
}
if (_local1.type == "eilandlinks") {
eilandlinks = int(_local1.xpos);
}
if (_local1.type == "eilandrechts") {
eilandrechts = int(_local1.xpos);
}
if (_local1.type == "keerpunt") {
aKeerpunten.push(int(_local1.xpos));
}
if (_local1.type == "maplinks") {
maplinks = int(_local1.xpos);
}
if (_local1.type == "maprechts") {
maprechts = int(_local1.xpos);
}
if (_local1.type == "schiphoogte") {
schipHoogte = int(_local1.ypos);
}
if (_local1.type == "baanlinks") {
baanlinks = int(_local1.xpos);
}
if (_local1.type == "baanrechts") {
baanrechts = int(_local1.xpos);
}
if (_local1.type == "baanhoogte") {
baanhoogte = int(_local1.ypos);
}
if (_local1.type == "minheight") {
aGroundLevelX.push(int(_local1.xpos));
aGroundLevelY.push(int(_local1.ypos));
}
if (_local1.type == "healthbar") {
var _local13 = [];
_local13.push(int(_local1.xpos));
_local13.push(int(_local1.ypos));
_local13.push(_local1.schipnaam);
aHealthBars.push(_local13);
}
_local14++;
}
var _local26 = _local21.nextSibling;
var _local19 = _local26.childNodes;
_local14 = 0;
while (_local14 < _local19.length) {
var _local4 = _local19[_local14].attributes;
if (_local4.type == "level") {
currentLevel = int(_local4.value);
}
if (_local4.type == "partime") {
parTime = int(_local4.value);
}
if (_local4.type == "ships") {
nrOfShips = int(_local4.value);
}
if (_local4.type == "noland") {
noLand = _local4.value;
}
if (_local4.type == "dogs") {
nrOfDogs = int(_local4.value);
}
if (_local4.type == "forts") {
nrOfForts = int(_local4.value);
}
_local14++;
}
startEngine();
}
function startEngine() {
main = _global.root.createEmptyMovieClip("main", 0);
var _local11 = main.createEmptyMovieClip("mcLuchtContainer", 0);
var _local2 = main.createEmptyMovieClip("mcAchtergrond", 1);
var _local3 = main.createEmptyMovieClip("scr", 4);
var _local5 = main.createEmptyMovieClip("mcAktie", 7);
var _local7 = main.createEmptyMovieClip("mcObjecten", 5);
var _local10 = main.createEmptyMovieClip("mcGraphics", 2);
var _local4 = main.createEmptyMovieClip("mcBullets", 6);
var _local6 = main.createEmptyMovieClip("planes", 8);
var _local9 = main.createEmptyMovieClip("hud", 9);
var _local8 = main.attachMovie("mcOmgeving", "mcOmgeving", 3);
sound = main.createEmptyMovieClip("mcSound", 10);
soundEffects = main.createEmptyMovieClip("mcSoundEffects", 13);
menuContainer = main.createEmptyMovieClip("mcMenuContainer", 12);
scr = _local3;
aktie = _local5;
objecten = _local7;
graphs = _local10;
bullets = _local4;
omgeving = _local8;
planes = _local6;
hud = _local9;
ach = _local2;
maakLucht();
initLevel(currentLevel);
userPreferences();
initKnoppen();
initOmgeving();
if (oncePerSecondInterval == undefined) {
oncePerSecondInterval = setInterval(oncePerSecond, 1000);
}
intEenSec = setInterval(iedereSec, 1000);
intVierSec = setInterval(iedereVierSec, 4000);
intTienSec = setInterval(iedereTienSec, 10000);
init();
initSFX();
startVliegTuig();
if (nrOfDogs > 0) {
if (Math.random() > 0.7) {
startDog();
}
}
if (nrOfForts > 0) {
if (currentLevel == 1) {
startFort();
} else if (Math.random() > 0.7) {
startFort();
}
}
attachMenu("ammo");
startRootEnterFrame();
maakMiniMap();
if ((drawBG == true) && (noLand != "true")) {
maakAchtergrond();
}
attachHud();
beginVars();
mapTravel = 0;
maakAmmoArray();
scheepsRegister();
attachHealthBars();
}
function sortDesc(a, b) {
return(a < b);
}
gameAktie = function (aktie, delay) {
if (gaDelay) {
clearInterval(gaDelay);
}
if (delay) {
gaDelay = setInterval(gameAktie, 1000, aktie);
} else {
switch (aktie) {
case "neergestort" :
if ((crashCalled != true) && (getTimer() > (crashTime + 1000))) {
crashTime = getTimer();
crashCalled = true;
pilootCrash = true;
vliegtuigen--;
if (vliegtuigen > 0) {
gaCarrier();
} else {
attachMenu("crashed");
neergestort();
gameStopTimer = getTimer();
}
hud.mcTopHud.mcTuigIconen.gotoAndStop(vliegtuigen);
}
break;
case "gezonken" :
crashCalled = true;
vliegtuigen--;
if (main.mcMenu == null) {
attachMenu("sunk");
}
hud.mcTopHud.mcTuigIconen.gotoAndStop(vliegtuigen);
neergestort();
break;
case "missioncomplete" :
clearInterval(intMissionComplete);
missionComplete();
}
}
};
neergestort = function () {
clearInterval(engineInt);
sfx_engine.stop();
};
initLevel = function (levelNr) {
switch (levelNr) {
case 1 :
vliegtuigen = 3;
break;
case 2 :
vliegtuigen = 3;
break;
case 3 :
vliegtuigen = 3;
break;
case 4 :
vliegtuigen = 3;
break;
case 5 :
vliegtuigen = 4;
break;
case 6 :
vliegtuigen = 4;
}
};
userPreferences = function () {
userData = _global.userData;
player = _global.currentPlayer;
kLe = userData[player].aKeys.left;
kRi = userData[player].aKeys.right;
kUp = userData[player].aKeys.up;
kDown = userData[player].aKeys.down;
kGun = userData[player].aKeys.gun;
kWeapon = userData[player].aKeys.weapon;
kPauze = userData[player].aKeys.pauze;
var _local2 = userData[player].aDetail;
if (_local2.quality == 3) {
_quality = "LOW";
} else if (_local2.quality == 2) {
_quality = "MEDIUM";
} else if (_local2.quality == 1) {
_quality = "HIGH";
}
if (_local2.waves == 1) {
golfPixels = 34;
} else if (_local2.waves == 2) {
golfPixels = 84;
} else if (_local2.waves == 2) {
golfPixels = 200;
}
if (_local2.clouds == 1) {
maxWolken = 3;
} else if (_local2.clouds == 2) {
maxWolken = 1;
} else if (_local2.clouds == 3) {
maxWolken = 0;
}
((_local2.zoom == 1) ? ((dynZoom = true)) : ((dynZoom = false)));
((_local2.smoke == 1) ? ((rook = true)) : ((rook = false)));
((_local2.bg == 1) ? ((drawBG = true)) : ((drawBG = false)));
((_local2.graphs == 1) ? ((drawGraphs = true)) : ((drawGraphs = false)));
((_local2.light == 1) ? ((flitsen = true)) : ((flitsen = false)));
};
regelContainerPosities = function () {
this=piloot;//parameter overwritten
if (dynZoom == true) {
var _local2 = this._y;
if ((_local2 < 120) && (_local2 > -130)) {
zoemPerc = 100 + ((_local2 - 120) / 5);
}
zoemFactor = zoemPerc / 100;
sW = standaardW / zoemFactor;
sH = (standaardH + sOffy) / zoemFactor;
if (_local2 < 120) {
if (_local2 < -320) {
yPos = _local2 - (sH / 2);
scr._y = ((standaardH + sOffy) - (mapHoogte * zoemFactor)) - ((yPos + 340) * zoemFactor);
} else {
yPos = 0;
scr._y = (standaardH + sOffy) - (mapHoogte * zoemFactor);
}
uitgezoemd = true;
} else {
scr._y = (standaardH + sOffy) - 400;
sW = standaardW;
sH = standaardH + sOffy;
yPos = 0;
uitgezoemd = false;
zoemPerc = 100;
}
} else {
var _local2 = this._y;
if ((_local2 < 120) && (_local2 > -130)) {
zoemPerc = 50;
}
zoemFactor = zoemPerc / 100;
sW = standaardW / zoemFactor;
sH = (standaardH + sOffy) / zoemFactor;
if (_local2 < 120) {
if (_local2 < -320) {
yPos = _local2 - (sH / 2);
scr._y = ((standaardH + sOffy) - (mapHoogte * zoemFactor)) - ((yPos + 340) * zoemFactor);
} else {
yPos = 0;
scr._y = (standaardH + sOffy) - (mapHoogte * zoemFactor);
}
uitgezoemd = true;
} else {
scr._y = (standaardH + sOffy) - 400;
sW = standaardW;
sH = standaardH + sOffy;
yPos = 0;
uitgezoemd = false;
zoemPerc = 100;
}
}
if (this.richting == "links") {
var _local4 = -100;
} else {
var _local4 = 100;
}
memSchermPosElas = memSchermPosElas + ((_local4 - memSchermPosElas) / 60);
var _local3 = (sW / standaardW) * memSchermPosElas;
xPos = Math.round((this._x - (sW / 2)) + _local3);
xPosTravel = xPos + mapTravel;
achplus = ((((-sW) / 2) + _local3) / 2) * zoemFactor;
scrollSnelheid = ((this.realX - (sW / 2)) + _local3) - memScroll;
memScroll = (this.realX - (sW / 2)) + _local3;
if (uitgezoemd == true) {
containerX = (-xPos) * zoemFactor;
} else {
containerX = -xPos;
}
schaalContainers(zoemPerc);
};
regelContainerPositiesNieuwer = function () {
this=piloot;//parameter overwritten
if (dynZoom == true) {
var _local3 = this._y;
if ((_local3 < 120) && (_local3 > -130)) {
zoemPerc = 100 + ((_local3 - 120) / 5);
}
zoemFactor = zoemPerc / 100;
sW = standaardW / zoemFactor;
sH = (standaardH + sOffy) / zoemFactor;
if (_local3 < 120) {
if (_local3 < -320) {
yPos = _local3 - (sH / 2);
scr._y = ((standaardH + sOffy) - (mapHoogte * zoemFactor)) - ((yPos + 340) * zoemFactor);
} else {
yPos = 0;
scr._y = (standaardH + sOffy) - (mapHoogte * zoemFactor);
}
uitgezoemd = true;
} else {
scr._y = (standaardH + sOffy) - 400;
sW = standaardW;
sH = standaardH + sOffy;
yPos = 0;
uitgezoemd = false;
zoemPerc = 100;
}
} else {
var _local3 = this._y;
if ((_local3 < 120) && (_local3 > -130)) {
zoemPerc = 50;
}
zoemFactor = zoemPerc / 100;
sW = standaardW / zoemFactor;
sH = (standaardH + sOffy) / zoemFactor;
if (_local3 < 120) {
if (_local3 < -320) {
yPos = _local3 - (sH / 2);
scr._y = ((standaardH + sOffy) - (mapHoogte * zoemFactor)) - ((yPos + 340) * zoemFactor);
} else {
yPos = 0;
scr._y = (standaardH + sOffy) - (mapHoogte * zoemFactor);
}
uitgezoemd = true;
} else {
scr._y = (standaardH + sOffy) - 400;
sW = standaardW;
sH = standaardH + sOffy;
yPos = 0;
uitgezoemd = false;
zoemPerc = 100;
}
}
if (this.richting == "links") {
var _local4 = -100;
} else {
var _local4 = 100;
}
memSchermPosElas = memSchermPosElas + ((_local4 - memSchermPosElas) / 60);
var _local2 = zoemFactor * memSchermPosElas;
xPos = Math.round((this._x - (sW / 2)) + _local2);
xPosTravel = xPos + mapTravel;
achplus = ((((-sW) / 2) + _local2) / 2) * zoemFactor;
sps = _local2 - memSPE;
memSPE = _local2;
scrollSnelheid = ((this.realX - (sW / 2)) + _local2) - memScroll;
memMcPos = x + memSchermPosElas;
memxPos = xPos;
memScroll = (this.realX - (sW / 2)) + _local2;
if (uitgezoemd == true) {
containerX = (-xPos) * zoemFactor;
} else {
containerX = -xPos;
}
schaalContainers(zoemPerc);
};
hitTestBounds = function (mc, doelMc) {
if (doelMc == null) {
doelMc = mc._parent;
}
var _local2 = mc.getBounds(doelMc);
mc.yMin = _local2.yMin;
mc.yMax = _local2.yMax;
mc.xMax = _local2.xMax;
mc.xMin = _local2.xMin;
};
berekenHellingPunt = function (x1, y1, x2, y2, x) {
dx = x2 - x1;
dy = y2 - y1;
var _local1 = dy / dx;
var _local2 = y1 + ((x - x1) * _local1);
return(_local2);
};
berekenAltitude = function (mc) {
var _local2 = Math.abs(mc._y - zeeniveau);
var _local1 = Math.round(_local2 / 2.35) - 20;
if (_local1 < 0) {
_local1 = 0;
}
hud.mcTopHud.mcAltitude.altitude = _local1 + " ft";
};
berekenAfstand = function (mc1, mc2) {
var _local2 = mc2._x - mc1._x;
var _local1 = mc2._y - mc1._y;
return(Math.round(Math.sqrt((_local2 * _local2) + (_local1 * _local1))));
};
berekenAbsSnelheid = function (mc) {
var _local3 = mc.memXpos - mc.realX;
var _local2 = mc.memYpos - mc._y;
mc.absSpeed = Math.round(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
mc.memXpos = mc.realX;
mc.memYpos = mc._y;
};
attachExplosieNieuw = function (mc) {
var _local1 = mc.getNextHighestDepth();
var _local2 = mc.attachMovie("mcExplosie", "explosie" + _local1, _local1);
speelSimpelSFX("exp_klein");
_local2._x = _local2._x + (20 - random(40));
};
attachExplosie = function (mc, optieGroot) {
var _local1 = mc.getNextHighestDepth();
var _local2 = mc.attachMovie("mcExplosie", "explosie" + _local1, _local1);
_local2.groot = true;
if (optieGroot == true) {
speelSimpelSFX("exp_groot");
} else {
speelSimpelSFX("exp_klein");
}
};
setNieuweHoek = function (mc, h) {
mc.hoek = mc.hoek + h;
mc._rotation = mc._rotation + h;
mc.memHoek = mc.memHoek + h;
};
syncContainers = function () {
if (piloot._x != undefined) {
if (piloot._x >= maprechts) {
var _local1 = maprechts;
mapTravel = mapTravel + _local1;
dog.memx = dog.memx - _local1;
tuig.memx = tuig.memx - _local1;
fort.memx = fort.memx - _local1;
xPos = xPos - _local1;
containerX = (-xPos) * zoemFactor;
for (var _local4 in planes) {
planes[_local4]._x = planes[_local4]._x - _local1;
}
for (var _local4 in bullets) {
bullets[_local4]._x = bullets[_local4]._x - _local1;
}
} else if (piloot._x < 0) {
var _local1 = maprechts;
mapTravel = mapTravel - _local1;
tuig.memx = tuig.memx + _local1;
dog.memx = dog.memx + _local1;
fort.memx = fort.memx + _local1;
xPos = xPos + _local1;
containerX = (-xPos) * zoemFactor;
for (var _local4 in planes) {
planes[_local4]._x = planes[_local4]._x + _local1;
}
for (var _local4 in bullets) {
bullets[_local4]._x = bullets[_local4]._x + _local1;
}
}
}
var _local3 = containerX - mapTravel;
var _local2 = scr._y;
scr._x = _local3;
aktie._x = _local3;
aktie._y = _local2;
objecten._x = _local3;
objecten._y = _local2;
graphs._x = _local3;
graphs._y = _local2;
bullets._x = containerX;
bullets._y = _local2;
graphs._x = _local3;
graphs._y = _local2;
planes._x = containerX;
planes._y = _local2;
ach._x = (_local3 / 2) - achplus;
ach._y = _local2;
omgeving._y = _local2;
};
schaalContainers = function (zoemPerc) {
scr._yscale = zoemPerc;
scr._xscale = zoemPerc;
aktie._yscale = zoemPerc;
aktie._xscale = zoemPerc;
objecten._yscale = zoemPerc;
objecten._xscale = zoemPerc;
bullets._xscale = zoemPerc;
bullets._yscale = zoemPerc;
graphs._xscale = zoemPerc;
graphs._yscale = zoemPerc;
omgeving._xscale = zoemPerc;
omgeving._yscale = zoemPerc;
planes._xscale = zoemPerc;
planes._yscale = zoemPerc;
ach._xscale = zoemPerc;
ach._yscale = zoemPerc;
main.mcLuchtContainer.mcLucht._yscale = zoemPerc;
};
tweeDec = function (number) {
result = Math.round(number * 100) / 100;
return(result);
};
regelAmmo = function () {
var _local1 = hud.mcTopHud;
if (tuig.ammo != undefined) {
_local1.ammo = "x " + tuig.ammo;
}
};
attachOutOfAmmo = function () {
var _local1 = main.attachMovie("outofammo", "outofammo", main.getNextHighestDepth());
_local1._x = standaardW / 2;
_local1._y = standaardH / 2;
};
attachCarrierUnderAttack = function () {
if (main.mcCarrierUnderAttack == undefined) {
var _local1 = main.attachMovie("mcCarrierUnderAttack", "mcCarrierUnderAttack", main.getNextHighestDepth());
_local1._x = 286;
_local1._y = 19;
}
};
iedereSec = function () {
verwerkSchepen();
kortRandomGetal = Math.random();
};
iedereVierSec = function () {
intRandomGetal = Math.random();
fuel();
};
iedereTienSec = function () {
langRandomGetal = Math.random();
spawnPlanes();
if (r < 0.5) {
plusminRand = 1;
} else {
plusminRand = -1;
}
checkTorpedoFail();
if (gameStopTimer != null) {
if ((getTimer() - gameStopTimer) > 60000) {
delete main._parent.onEnterFrame;
}
}
};
tuigtoetsen = function () {
tuigListener.onKeyDown = function () {
this=tuig;//parameter overwritten
if (Key.getCode() == kWeapon) {
if (this.ammo > 0) {
if ((gooiammo != true) && (_global.pauzeGame != true)) {
switch (this.ammoType) {
case "bommen" :
var _local6 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("mcBom", "bom" + _local6, _local6);
_local3.type = "bom";
_local3._x = this._x;
_local3._y = this._y;
_local3.gooix = this.xsnelheid;
_local3.gooiy = this.ysnelheid;
_local3.richting = this.richting;
_local3.leven = 0;
this.ammo--;
ammoFired("bom");
regelAmmo();
startBom(_local3);
break;
case "seekers" :
_local6 = bullets.getNextHighestDepth();
var _local4 = bullets.attachMovie("mcSeeker", "raket" + _local6, _local6);
if (planes.dog && (planes.fort)) {
((dog.afstand > fort.afstand) ? ((_local4.zoekMc = fort)) : ((_local4.zoekMc = dog)));
} else if ((!planes.dog) && (planes.fort)) {
_local4.zoekMc = fort;
} else if ((!planes.fort) && (planes.dog)) {
_local4.zoekMc = dog;
} else {
_local4.zoekMc = "geen";
}
_local4.type = "raket";
_local4.speed = this.absSpeed;
_local4._y = this.yMax;
_local4._x = this._x;
_local4.hoek = this.hoek;
_local4._rotation = this._rotation;
this.ammo--;
ammoFired("raket");
regelAmmo();
startTuigSeeker(_local4);
speelSimpelSFX("raket_tuig");
break;
case "raketten" :
_local6 = bullets.getNextHighestDepth();
_local4 = bullets.attachMovie("mcRaket", "raket" + _local6, _local6);
_local4.type = "raket";
_local4.speed = this.absSpeed;
_local4._y = this.yMax;
_local4._x = this._x;
_local4.hoek = this.hoek;
_local4._rotation = this._rotation;
this.ammo--;
ammoFired("raket");
regelAmmo();
startRaket(_local4);
speelSimpelSFX("raket_tuig");
break;
case "torpedo" :
this.ammo--;
ammoFired("torpedo");
regelAmmo();
startTorpedo(this);
}
}
} else {
attachOutOfAmmo();
}
gooibom = true;
} else if (Key.getCode() == kPauze) {
if (_global.pauzeGame != true) {
stopAllSounds();
_global.pauzeGame = true;
var _local5 = main.attachMovie("gamepauzed", "gamepauzed", main.getNextHighestDepth());
_local5._x = standaardW / 2;
_local5._y = standaardH / 2;
} else if (_global.pauzeGame == true) {
_global.pauzeGame = false;
memSnd = null;
engineSound();
main.gamepauzed.removeMovieClip();
}
}
};
tuigListener.onKeyUp = function () {
if (Key.getCode() == 88) {
gooibom = false;
}
if (Key.getCode() == 90) {
gooiraket = false;
}
if (Key.getCode() == 17) {
gooiammo = false;
}
};
};
_global.verwerkMenu = function (toets) {
aPos = main.mcMenu.pos;
menu = main.mcMenu;
switch (toets) {
case "up" :
if (aPos > 0) {
menu.pos--;
}
break;
case "down" :
if (aPos < (menu.aantalItems - 1)) {
menu.pos++;
}
break;
case "enter" :
if (main.mcMenu.menutype == "ammo") {
if (aPos == 0) {
tuig.ammo = 32;
tuig.ammoType = "bommen";
hud.mcTopHud.mcWapens.gotoAndStop("bommen");
} else if (aPos == 1) {
tuig.ammoType = "raketten";
tuig.ammo = 24;
hud.mcTopHud.mcWapens.gotoAndStop("raketten");
} else if (aPos == 2) {
tuig.ammoType = "seekers";
tuig.ammo = 8;
hud.mcTopHud.mcWapens.gotoAndStop("seekers");
} else if (aPos == 3) {
tuig.ammoType = "torpedo";
tuig.ammo = 1;
hud.mcTopHud.mcWapens.gotoAndStop("torpedo");
}
verwijderMenu();
} else {
if (!((main.mcMenu.menutype == "crashed") || (main.mcMenu.menutype == "sunk"))) {
break;
}
if (aPos == 0) {
reset();
} else if (aPos == 1) {
reset(true);
}
verwijderMenu();
}
}
};
menutoetsen = function () {
menuListener.onKeyDown = function () {
switch (Key.getCode()) {
case kUp :
_global.verwerkMenu("up");
break;
case kDown :
_global.verwerkMenu("down");
break;
case 13 :
_global.verwerkMenu("enter");
}
};
};
attachMenuDelay = function (menutype) {
clearInterval(menudelay);
attachMenu(menutype);
};
attachMenu = function (menutype) {
verwijderMenu();
var _local2 = main.attachMovie("mcMenu", "mcMenu", main.getNextHighestDepth());
_local2.gotoAndStop(menutype);
_local2.menutype = menutype;
_local2._x = 200;
_local2._y = 60;
menuaan = true;
_local2.pos = 0;
_local2.onEnterFrame = function () {
this.mcSelect._y = (this.pos * 36) + 35;
};
menutoetsen();
};
verwijderMenu = function () {
tuigtoetsen();
menuaan = false;
main.mcMenu.removeMovieClip();
};
inDeBuurt = function (mc) {
var _local3 = mc._y;
var _local4 = mc._x;
var _local1 = mapHoogte - sH;
if (yPos < 0) {
_local1 = _local1 + (yPos + (sH / 2));
}
if ((((_local4 > xPos) && (_local4 < (xPos + sW))) && (_local3 > _local1)) && (_local3 < (_local1 + sH))) {
mc.indebuurt = true;
} else {
mc.indebuurt = false;
}
};
verwerkRadar = function (mc) {
if (mc == fort) {
var _local2 = hud.mcRadar2;
} else {
var _local2 = hud.mcRadar;
}
var _local3 = mapHoogte - (sH / 2);
if (yPos < 0) {
_local3 = _local3 + (yPos + (sH / 2));
}
var _local5 = xPosTravel + (sW / 2);
var _local4 = Math.atan2(mc._y - _local3, (mc._x + mapTravel) - _local5);
var _local6 = Math.round((_local4 * 180) / Math.PI);
_local2._rotation = _local6;
if (mc.indebuurt == false) {
_local2._visible = true;
} else {
_local2._visible = false;
}
_local2.mcIndicator.afstand = Math.round(Math.abs(mc.afstand) / 2.35) + " ft";
_local2.dogDamage.groen._yscale = (100 / mc.wrak) * (mc.wrak - mc.schade);
};
tril = function (mc) {
mc.tril--;
if (mc.trilstand == "min") {
mc._y = mc._y + mc.tril;
mc.trilstand = "plus";
} else {
mc._y = mc._y - mc.tril;
mc.trilstand = "min";
}
if (mc.tril <= 0) {
mc.trilling = false;
}
};
stuiterMc = function (mc, dx, dy) {
mc.speedx = dx;
mc.speedy = dy;
mc.bottom = mc._y;
mc.onEnterFrame = function () {
this.speedy = this.speedy + 1;
this.speedx = this.speedx * 0.92;
if (this._y > this.bottom) {
this._y = this.bottom;
this.speedy = this.speedy * -0.3;
}
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
if (Math.abs(this.speedx) < 0.4) {
this.speedy = 0;
this.stop();
}
if ((Math.abs(this.speedx) < 0.1) && (dx != 0)) {
this.speedx = 0;
mc.gotoAndStop("kia");
delete mc.onEnterFrame;
}
};
};
knipperAlert = function (mc) {
mc.knipper = true;
mc.tel = 0;
mc.onEnterFrame = function () {
this.tel++;
var _local2 = new Color(this);
_local2.setTint(255, 0, 0, this.tel * 10);
if (this.tel >= 10) {
this.tel = 0;
}
};
};
knipperUit = function (mc) {
mc.knipper = false;
delete mc.onEnterFrame;
var _local1 = new Color(mc);
_local1.setTint(255, 255, 255, 100);
};
startHit = function () {
if (flitsen == true) {
main.attachMovie("mcHitBlind", "mcHitBlind", 11);
}
};
maakAmmoArray = function () {
aAmmoDamage = new Array();
aAmmoDamage.bom = 10;
aAmmoDamage.raket = 10;
aAmmoDamage.torpedo = 200;
aAmmoDamage.seeker = 10;
aAmmoDamage.bullet = 2;
aAmmoDamage.e_bullet = 2;
};
ammoFired = function (type) {
if (type == "raket") {
rocketsFired++;
} else if (type == "bullet") {
bulletsFired++;
} else if (type == "bom") {
bombsFired++;
}
};
ammoHit = function (type, mc) {
if (mc.hitVerwerkt != true) {
mc.hitVerwerkt = true;
if (type == "raket") {
rocketsHit++;
} else if (type == "bullet") {
bulletsHit++;
} else if (type == "bom") {
bombsHit++;
}
}
};
checkTorpedoFail = function () {
if (dog.mode == "torpedo") {
if (getTimer() > (dogBirth + 50000)) {
trace("TORPEDO EXIT CALL");
unsetTorpedoAktie();
startTorpedo(dog);
}
}
};
checkMissionComplete = function () {
var _local4 = true;
var _local6 = false;
var _local1 = 0;
while (_local1 < aVijanden.length) {
if (aVijanden[_local1].status != "kia") {
_local4 = false;
break;
}
_local1++;
}
if (planes.dog || (planes.fort)) {
_local4 = false;
}
if (checkCarrierSunk() == true) {
_local6 = true;
}
if (nrOfShips > 1) {
if (checkEnemyShipSunk() == false) {
_local4 = false;
} else {
nrOfDogs = 0;
nrOfForts = 0;
}
if ((nrOfDogs > 0) || (nrOfForts > 0)) {
_local4 = false;
}
}
_local1 = 0;
while (_local1 < aGebouwen.length) {
var _local2 = aGebouwen[_local1];
var _local5 = _local2.frame;
var _local3 = aGebouwTypen[_local5 - 1];
if (_local3 != "bunker") {
if (_local2.status != "inactief") {
_local4 = false;
break;
}
}
_local1++;
}
if (_local4 == true) {
gameAktie("missioncomplete");
}
if (_local6 == true) {
gameAktie("gezonken");
}
};
submitScore = function () {
var _local3 = menuContainer.mcMissionComplete;
_local3.gotoAndStop(2);
_local3.mcContinue.onRelease = function () {
_global.scor = total_pts;
_root.xdada = 0;
_root.gotoAndPlay("submitScore");
reset();
};
_local3.mcCancel.onRelease = function () {
reset();
};
};
missionComplete = function () {
autoPilot();
var _local2 = menuContainer.attachMovie("mcMissionComplete", "mcMissionComplete", menuContainer.getNextHighestDepth());
_local2._x = (standaardW / 2) - (_local2._width / 2);
_local2._y = (standaardH / 2) - (_local2._height / 2);
var _local13 = Math.floor(getTimer() / 1000) - startTijd;
_local2.time = _local13 + " secs";
var _local3 = (parTime - _local13) * 50;
if (_local3 < 0) {
_local3 = 0;
}
_local2.time_pts = _local3;
var _local18 = (_local2.points_pts = currentLevel * 5000);
_local2.planes = vliegtuigen + " planes";
var _local19 = (_local2.planes_pts = vliegtuigen * 2000);
if (rocketsFired > 0) {
var _local14 = Math.round((rocketsHit / rocketsFired) * 100);
if (_local14 > 100) {
_local14 = 100;
}
_local2.rocketperc = _local14 + " %";
} else {
var _local14 = 0;
_local2.rocketperc = "-";
}
if (bombsFired > 0) {
var _local10 = Math.round((bombsHit / bombsFired) * 100);
if (_local10 > 100) {
_local10 = 100;
}
_local2.bombperc = _local10 + " %";
} else {
var _local10 = 0;
_local2.bombperc = "-";
}
if (bulletsFired > 0) {
var _local12 = Math.round((bulletsHit / bulletsFired) * 100);
if (_local12 > 100) {
_local12 = 100;
}
_local2.bulletperc = _local12 + " %";
} else {
var _local12 = 0;
_local2.bulletperc = "-";
}
var _local6 = rocketsFired * 100;
var _local5 = bombsFired * 100;
var _local8 = bulletsFired;
var _local15 = _local14 * _local6;
var _local20 = _local10 * _local5;
var _local21 = _local12 * _local8;
var _local7 = 20000;
var _local4 = (_local6 + _local5) + _local8;
var _local17 = _local6 / _local4;
var _local22 = _local8 / _local4;
var _local16 = _local5 / _local4;
_local15 = ((_local14 / 100) * _local7) * _local17;
_local20 = ((_local10 / 100) * _local7) * _local16;
_local21 = ((_local12 / 100) * _local7) * _local22;
var _local9 = (_local2.accuracy_pts = Math.round(((_local15 + _local20) + _local21) / 1.6));
if (_local9 < 0) {
_local9 = 0;
}
var _local23 = (_local2.total_pts = ((_local3 + _local19) + _local18) + _local9);
userSettings = SharedObject.getLocal("user_data");
var _local11 = userSettings.data;
if (_local11[_global.currentPlayer].level == currentLevel) {
_local11[_global.currentPlayer].level++;
}
userSettings.flush();
_local2.mcContinue.onRelease = function () {
submitScore();
};
};
setGroundLevel = function (mc) {
var _local5 = mc.realX;
var _local3 = 1000000 /* 0x0F4240 */;
var _local1 = 0;
while (_local1 < aGroundLevelX.length) {
var _local2 = Math.abs(_local5 - aGroundLevelX[_local1]);
if (_local2 < _local3) {
_local3 = _local2;
var _local4 = _local1;
}
_local1++;
}
mc.groundLevel = aGroundLevelY[_local4];
if (mc.groundLevel == undefined) {
mc.groundLevel = 200;
}
};
verwerkObjecten = function () {
var _local11 = xPosTravel - halfObject;
var _local12 = (xPosTravel + sW) + halfObject;
var _local3 = 0;
while (_local3 < aObjecten.length) {
var _local2 = aObjecten[_local3];
var _local7 = objecten["o_" + _local3];
var _local5 = _local2.xpos;
var _local9 = _local2.ypos;
if ((_local5 > _local11) && (_local5 < _local12)) {
if (!_local7) {
var _local10 = _local2.type;
var _local13 = objecten.getNextHighestDepth();
var _local6 = objecten.attachMovie(_local10, "o_" + _local3, _local13);
_local6.gotoAndStop(_local2.frame);
_local6._x = _local5;
_local6._y = _local9;
_local6.type = _local10;
_local6.xMin = _local2.xMin;
_local6.xMax = _local2.xMax;
_local6.yMin = _local2.yMin;
_local6.yMax = _local2.yMax;
start_obj_aktie(_local6);
}
} else if (_local7) {
removeMovieClip(_local7);
}
_local3++;
}
_local3 = 0;
while (_local3 < aGebouwen.length) {
var _local1 = aGebouwen[_local3];
var _local4 = objecten["geb_" + _local3];
var _local5 = _local1.xpos;
var _local9 = _local1.ypos;
var _local8 = _local1.frame;
var _local14 = _local1.status;
if (_local14 == "actief") {
if ((_local5 > _local11) && (_local5 < _local12)) {
if (!_local4) {
var _local10 = _local1.type;
var _local13 = objecten.getNextHighestDepth();
var _local6 = objecten.attachMovie(_local10, "geb_" + _local3, _local13);
_local6.gotoAndStop(_local8);
_local6._x = _local5;
_local6._y = _local9;
_local6.type = _local10;
_local6.xMin = _local1.xMin;
_local6.xMax = _local1.xMax;
_local6.yMin = _local1.yMin;
_local6.yMax = _local1.yMax;
_local6.schade = _local1.schade;
_local6.occ = _local1.occupado;
_local6.type = aGebouwTypen[_local8 - 1];
start_geb_aktie(_local6, _local3);
}
} else if (_local4) {
bewaarGebKenmerken(_local4, _local3);
removeMovieClip(_local4);
}
} else if ((_local5 > _local11) && (_local5 < _local12)) {
if (!_local4) {
var _local10 = _local1.type;
var _local13 = objecten.getNextHighestDepth();
var _local6 = objecten.attachMovie(_local10, "geb_" + _local3, _local13);
_local6.gotoAndStop(_local8 + 1);
_local6._x = _local5;
_local6._y = _local9;
_local6.type = _local10;
}
} else if (_local4) {
removeMovieClip(_local4);
}
_local3++;
}
};
bewaarGebKenmerken = function (mc, arrayNr) {
switch (mc.type) {
case "bunker" :
aGebouwen[arrayNr].schade = mc.schade;
aGebouwen[arrayNr].tel = mc.tel;
break;
case "hut" :
aGebouwen[arrayNr].schade = mc.schade;
break;
case "hangar" :
aGebouwen[arrayNr].schade = mc.schade;
}
};
start_obj_aktie = function (mc) {
mc.onEnterFrame = function () {
hittestPlanesObj(this);
};
};
start_geb_aktie = function (mc, arrayNr) {
var gebArr = aGebouwen[arrayNr];
this=mc;//parameter overwritten
switch (this.type) {
case "hangar" :
this.onEnterFrame = function () {
if (this.schade > 4) {
attachExplosie(this, true);
this.play();
gebArr.status = "inactief";
delete this.onEnterFrame;
}
hittestBulletsObj(this);
};
break;
case "toren" :
this.wachteven = 0;
this.onEnterFrame = function () {
trace(this.schade + " TORENSCHADE");
if (this.schade > 3) {
attachExplosie(this);
this.play();
gebArr.status = "inactief";
delete this.onEnterFrame;
}
hittestBulletsObj(this);
if (_global.pauzeGame != true) {
var _local9 = Math.atan2(tuig._y - this._y, tuig._x - this._x);
var _local4 = Math.round((_local9 * 180) / Math.PI);
var _local10 = tuig._x - this._x;
var _local11 = this._y - tuig._y;
var _local12 = berekenKogelAfwijking(this, _local11);
var _local6 = _local4 + _local12;
if ((_local6 < -10) && (_local6 > -170)) {
var _local5 = this.mannetje;
if (_local10 <= 0) {
(_local5.gotoAndStop("links"));// not popped
} else {
(_local5.gotoAndStop("rechts"));// not popped
}
_local5.loop._rotation = _local4;
var _local8 = 400;
if (this.wachteven > 10) {
if (random(20) == 0) {
if ((tuig._x >= (this._x - _local8)) && (tuig._x <= (this._x + _local8))) {
var _local7 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("tuigSeeker", "kanonskogel" + _local7, _local7);
_local3.zoekMc = tuig;
_local3.type = "kanonskogel";
_local3.speed = 8;
_local3._x = this._x;
_local3._y = this._y;
_local3.hoek = _local4;
_local3._rotation = _local4;
startTuigSeeker(_local3);
this.schietklaar = false;
this.wachteven = 0;
autoInitSFX(this, "turet");
}
}
}
this.wachteven++;
}
}
};
break;
case "hut" :
this.onEnterFrame = function () {
if (this.schade > 4) {
attachSoldaat(gebArr.occupado, this._x, this._y);
attachExplosie(this, true);
this.play();
gebArr.status = "inactief";
delete this.onEnterFrame;
} else {
hittestPlanesObj(this);
hittestBulletsObj(this);
}
};
break;
case "bunker" :
this.mcLoop0._rotation = 0;
this.telkogels = 0;
this.tel = gebArr.tel;
this.loopNr = 0;
if (this.occ <= 0) {
this.mast.vlag._visible = false;
}
this.onEnterFrame = function () {
var _local7 = gebArr.occupado;
if (this.schade > 4) {
this.schade = 0;
attachSoldaat(_local7, this._x);
gebArr.occupado = 0;
this.mast.vlag._visible = false;
this.occ = 0;
this.tel = getTimer() + 10000;
attachExplosie(this);
} else if (_local7 > 0) {
this.mast.vlag._visible = true;
hittestPlanesObj(this);
hittestBulletsObj(this);
if (_global.pauzeGame != true) {
var _local10 = Math.atan2(tuig._y - this._y, tuig._x - this._x);
var _local13 = Math.round((_local10 * 180) / Math.PI);
var _local14 = tuig._x - this._x;
var _local9 = this._y - tuig._y;
var _local12 = berekenKogelAfwijking(this, _local9);
var _local11 = _local9 / 30;
var _local4 = _local13 + _local12;
if ((_local4 < -10) && (_local4 > -170)) {
this.mcLoop0._rotation = _local4 + 90;
this.mcLoop1._rotation = _local4 + 90;
var _local8 = 300;
if (this.telkogels < 6) {
if (Math.floor(Math.random() * (5 + _local11)) == 0) {
if ((tuig._x >= (this._x - _local8)) && (tuig._x <= (this._x + _local8))) {
var _local6 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("mcKanonskogel", "kanonskogel" + _local6, _local6);
_local3.type = "kanonskogel";
var _local5 = Math.floor(Math.random() * 2);
_local3._x = this._x + this["mcLoop" + _local5]._x;
_local3._y = this._y + this["mcLoop" + _local5]._y;
_local3.afschieterMc = this;
_local3.hoek = _local4;
_local3.snelheid = 12;
_local3.leven = 0;
this.schietklaar = false;
this.telkogels++;
this["mcLoop" + _local5].gotoAndPlay(2);
autoInitSFX(this, "kanon");
}
}
}
}
}
}
};
}
};
attachGolven = function () {
var _local1 = omgeving.createEmptyMovieClip("golfContainer", 1);
_local1.aantGolven = 0;
};
verwijderGolven = function () {
omgeving.golfContainer.removeMovieClip();
};
initOmgeving = function () {
var _local5 = 1040;
omgeving.aantWolken = 0;
omgeving.tegelBreedte = 80;
omgeving.aantTegels = Math.ceil(_local5 / omgeving.tegelBreedte);
zeeHoogte = mapHoogte - 20;
var _local3 = omgeving.createEmptyMovieClip("zeeTegelContainer", 2);
var _local4 = omgeving.createEmptyMovieClip("wolkContainer", 0);
var _local6 = omgeving.createEmptyMovieClip("golfContainer", 1);
_local6.aantGolven = 0;
_local4.aantWolken = 0;
var _local1 = 0;
while (_local1 < (omgeving.aantTegels + 1)) {
var _local2 = _local3.attachMovie("zeeTegel", "zeeTegel" + _local1, _local3.getNextHighestDepth());
_local2._x = (_local1 * omgeving.tegelBreedte) + omgeving.tegelBreedte;
_local2._y = zeeHoogte;
_local1++;
}
};
regelAchtergrond = function () {
var _local1 = 0;
while (_local1 < aBergenXpos.length) {
var _local4 = aBergenTegel[_local1];
var _local6 = scr._x - ach._x;
var _local2 = ach._x + (aBergenXpos[_local1] * zoemFactor);
if (_local4 == "start") {
var _local5 = 56 * zoemFactor;
if (((_local2 + _local5) >= 0) && (_local2 <= (standaardW / zoemFactor))) {
var _local3 = ach.attachMovie("bergenStart", "achTegel" + _local1, _local1);
_local3._x = aBergenXpos[_local1];
_local3._y = (zeeHoogte - _local3._height) + 4;
_local3.gotoAndStop(aBergenFrames[_local1]);
} else {
ach["achTegel" + _local1].removeMovieClip();
}
} else if (_local4 == "groot") {
var _local5 = bergtegel_w * zoemFactor;
if (((_local2 + _local5) >= 0) && (_local2 <= (standaardW / zoemFactor))) {
var _local3 = ach.attachMovie("mcBergen", "achTegel" + _local1, _local1);
_local3._x = aBergenXpos[_local1];
_local3._y = (zeeHoogte - _local3._height) + 4;
_local3.gotoAndStop(aBergenFrames[_local1]);
} else {
ach["achTegel" + _local1].removeMovieClip();
}
} else {
var _local5 = kleinebergtegel_w * zoemFactor;
if (((_local2 + _local5) >= 0) && (_local2 < standaardW)) {
var _local3 = ach.attachMovie("mcBergenKlein", "achTegel" + _local1, _local1);
_local3._x = aBergenXpos[_local1];
_local3._y = (zeeHoogte - _local3._height) + 4;
_local3.gotoAndStop(aBergenFrames[_local1]);
} else {
ach["achTegel" + _local1].removeMovieClip();
}
}
_local1++;
}
};
verwerkZeeTegels = function () {
this=omgeving;//parameter overwritten
var _local8 = zoemPlus;
var _local7 = 1040;
var _local6 = scrollSnelheid;
if (Math.abs(_local6) > 100) {
_local6 = 0;
}
var _local3 = this.aantTegels;
while (_local3 >= 0) {
var _local2 = this.zeeTegelContainer["zeeTegel" + _local3];
var _local4 = -_local6;
_local2._x = _local2._x + _local4;
if ((_local2._x - this.tegelBreedte) >= _local7) {
if (_local3 == this.aantTegels) {
_local2._x = (this.zeeTegelContainer.zeeTegel0._x - this.tegelBreedte) + _local4;
} else {
_local2._x = this.zeeTegelContainer["zeeTegel" + (_local3 + 1)]._x - this.tegelBreedte;
}
}
if (_local2._x < 0) {
if (_local3 == 0) {
_local2._x = this.zeeTegelContainer["zeeTegel" + this.aantTegels]._x + this.tegelBreedte;
} else {
_local2._x = (this.zeeTegelContainer["zeeTegel" + (_local3 - 1)]._x + this.tegelBreedte) + _local4;
}
}
var _local5 = xPosTravel + _local2._x;
if (eilandlinks != undefined) {
if ((_local5 < eilandlinks) || (_local5 > eilandrechts)) {
_local2.gotoAndStop(1);
} else {
_local2.gotoAndStop(2);
}
} else {
_local2.gotoAndStop(1);
}
_local3--;
}
};
golven = function () {
var _local4 = Math.random();
this=omgeving.golfContainer;//parameter overwritten
omgeving.golfContainer;
sw = 1040;
var _local11 = scrollSnelheid;
if (Math.abs(_local11) > 100) {
_local11 = 0;
}
var _local8 = Math.abs(piloot.xsnelheid);
var _local7 = golfPixels / 2;
var _local12 = _local7 + (langRandomGetal * _local7);
var _local10 = _local8 / _local12;
if (Math.random() < _local10) {
var _local6 = this.getNextHighestDepth();
var _local13 = Math.ceil(_local4 * 3);
var _local3 = this.attachMovie("golf" + _local13, "golf" + _local6, _local6);
_local3.swapDepths(this.zeeTegelContainer);
var _local5 = _local4 * 10;
if (_local5 <= 3) {
_local3.ganaar = 10;
}
if (_local5 >= 7) {
_local3.ganaar = -10;
}
_local3._y = zeeHoogte - _local5;
if (_local11 < 4) {
_local3._x = 0;
} else {
_local3._x = sw;
}
_local3._xscale = (_local4 * 50) + 75;
_local3.extraSpeed = Math.ceil(_local4 * 12) / 8;
_local3.onEnterFrame = function () {
if (_global.pauzeGame != true) {
if (this.ganaar == 10) {
this._y = this._y + (((zeeHoogte - this.ganaar) - this._y) / 50);
} else if (this.ganaar == -10) {
this.tel++;
if (this.tel >= 400) {
this._y = this._y + (((zeeHoogte - this.ganaar) - this._y) / 60);
}
}
var _local4 = scrollSnelheid;
var _local3 = (-_local4) + this.extraSpeed;
this._x = this._x + _local3;
if ((this._x >= (sw + this._width)) || ((this._x + this._width) < 0)) {
this.removeMovieClip();
}
}
};
}
};
wolken = function () {
var _local4 = Math.random();
this=omgeving.wolkContainer;//parameter overwritten
omgeving.wolkContainer;
var sW = 1040;
var _local9 = scrollSnelheid;
if (Math.abs(_local9) > 100) {
_local9 = 0;
}
telwolken = 0;
for (w in this) {
telwolken++;
}
if (telwolken < maxWolken) {
var _local6 = Math.abs(piloot.xsnelheid);
var _local10 = 150 + (langRandomGetal * 100);
var _local11 = _local6 / _local10;
if (Math.random() < _local11) {
var _local5 = this.getNextHighestDepth();
var _local7 = Math.ceil(_local4 * 4);
var _local3 = this.attachMovie("wolk" + _local7, "wolk" + _local5, _local5);
var _local12 = _local4 * 10;
_local3._y = -(_local4 * 180);
if (_local9 < 4) {
_local3._x = 0;
} else {
_local3._x = sW + _local3._width;
}
_local3._xscale = (_local4 * 50) + 75;
_local3.extraSpeed = Math.ceil(_local4 * 12) / 8;
_local3.onEnterFrame = function () {
if (_global.pauzeGame != true) {
var _local4 = scrollSnelheid;
var _local3 = (-_local4) + this.extraSpeed;
this._x = this._x + _local3;
if ((this._x >= (sW * 2)) || (this._x < (-sW))) {
this.removeMovieClip();
}
}
};
}
}
};
startRaket = function (mc) {
mc.leven = 0;
mc.onEnterFrame = function () {
var _local2 = this.speed;
if (_local2 < 25) {
this.speed = this.speed * 1.06;
}
this._y = this._y + ((-_local2) * Math.cos((Math.PI/180) * (this.hoek + 90)));
this._x = this._x + (_local2 * Math.sin((Math.PI/180) * (this.hoek + 90)));
if (this.leven >= 180) {
this.removeMovieClip();
}
this.leven++;
objHittest(this);
};
};
startTuigSeeker = function (mc) {
if (mc.zoekMc == "geen") {
startRaket(mc);
} else {
var _local10 = berekenAfstand(mc, mc.zoekMc);
if (_local10 > 1200) {
startRaket(mc);
} else {
mc.tel = 0;
mc.leven = 0;
mc.onEnterFrame = function () {
this.tel++;
if (this.tel >= 5) {
var _local2 = Math.abs;
var _local8 = _local2(this._rotation);
var _local7 = Math.atan2(this.zoekMc._y - this._y, this.zoekMc._x - this._x);
var _local5 = Math.round((_local7 * 180) / Math.PI);
if (_local2(_local2(_local5) - _local8) < 90) {
var _local4 = _local2(_local5) - _local2(this._rotation);
var _local6 = _local5 - this._rotation;
if (_local2(_local4) > 6) {
((_local6 < 0) ? (_local4 = -6) : (_local4 = 6));
}
this.hoek = this.hoek + _local4;
this._rotation = this.hoek;
this.tel = 0;
}
}
var _local3 = this.speed;
if (_local3 < 25) {
this.speed = this.speed * 1.03;
}
var _local9 = (-_local3) * Math.cos((Math.PI/180) * (this.hoek + 90));
this._y = this._y + ((-_local3) * Math.cos((Math.PI/180) * (this.hoek + 90)));
this._x = this._x + (_local3 * Math.sin((Math.PI/180) * (this.hoek + 90)));
if (this.leven >= 180) {
this.removeMovieClip();
}
this.leven++;
objHittest(this);
};
}
}
};
startTorpedo = function (moederMc) {
var _local11 = bullets.getNextHighestDepth();
var _local6 = bullets.attachMovie("mcTorpedo", "torpedo" + _local11, _local11);
_local6.type = "torpedo";
_local6._x = moederMc._x;
_local6._y = moederMc._y;
_local6.hoek = moederMc.hoek;
_local6.speedx = moederMc.xsnelheid;
_local6.speedy = moederMc.ysnelheid;
_local6.richting = moederMc.richting;
_local6.leven = 0;
_local6.stap = 0;
_local6.onEnterFrame = function () {
if (_global.pauzeGame != true) {
if (this.stap == 0) {
var _local10 = this.hoek;
if (this.speedy < 16) {
this.speedy = this.speedy + 0.5;
}
this.speedx = this.speedx * 0.98;
if (Math.abs(this._rotation) > 90) {
this.hoek = this.hoek + 1;
} else {
this.hoek = this.hoek - 1;
}
this._rotation = this.hoek;
this._x = this._x + this.speedx;
this._y = this._y + this.speedy;
if (this._y > zeeHoogte) {
var _local8 = Math.abs(this._rotation);
if (((_local8 > 160) || (_local8 < 20)) && (this.speedy < 10)) {
this._y = zeeHoogte + 3;
if (this.richting == "rechts") {
this._rotation = 0;
this.gotoAndStop("water_rechts");
} else {
this._rotation = 180;
this.gotoAndStop("water_links");
}
this.stap = 1;
} else {
autoInitSFX(this, "exp_klein");
this.gotoAndStop("knal");
}
}
} else if (this.stap == 1) {
this._x = this._x + this.speedx;
var _local9 = (6 - Math.abs(this.speedx)) / 20;
((this.richting == "rechts") ? ((this.speedx = this.speedx + _local9)) : ((this.speedx = this.speedx - _local9)));
if (mapTravel == 0) {
if ((this._x > eilandlinks) && (this._x < eilandrechts)) {
this.gotoAndStop("knal");
}
var _local6 = aSchepen.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local5 = aSchepen[_local3];
if ((this._x > aSchepen[_local3].links) && (this._x < aSchepen[_local3].rechts)) {
aSchepen[_local3].schade = aSchepen[_local3].schade + aAmmoDamage.torpedo;
autoInitSFX(this, "exp_groot");
this.gotoAndStop("knal");
}
_local3++;
}
}
for (var _local7 in bullets) {
var _local4 = bullets[_local7];
if (this.hitTest(_local4)) {
if (_local4.type == "bullet") {
delete _local4.onEnterFrame;
_local4.parentwis = true;
attachExplosie(_local4);
autoInitSFX(this, "exp_klein");
this.removeMovieClip();
}
}
}
this.leven++;
if (this.leven > 500) {
this.removeMovieClip();
}
}
}
};
};
startBom = function (mc) {
mc.hoek = 1;
if (mc.groot == true) {
mc.gotoAndStop("groot");
}
mc.onEnterFrame = function () {
var _local2 = this.hoek;
if (this.gooiy < 16) {
this.gooiy = this.gooiy + 1;
}
this.gooix = this.gooix * 0.92;
if (_local2 < 90) {
this.hoek = this.hoek * 1.1;
this.hoek = this.hoek + 1;
}
this._rotation = this.hoek;
this._y = this._y + this.gooiy;
this._x = this._x + this.gooix;
objHittest(this);
};
};
startBullet = function (mc) {
if (mc.type == "bullet") {
mc.onEnterFrame = function () {
var _local5 = this._x;
var _local4 = this._y;
var _local2 = this.speed;
var _local3 = (Math.PI/180) * (this.hoek + 90);
this._y = this._y + (((-_local2) * Math.cos(_local3)) / 1.6);
this._x = this._x + (_local2 * Math.sin(_local3));
if (_local4 > zeeHoogte) {
this.removeMovieClip();
} else if ((Math.abs(tuig._x - _local5) > xdraw) || (Math.abs(tuig._y - _local4) > ydraw)) {
this.removeMovieClip();
} else if (this.leven >= 380) {
this.removeMovieClip();
}
this.leven++;
};
} else {
mc.onEnterFrame = function () {
var _local5 = this._x;
var _local4 = this._y;
var _local2 = this.speed;
var _local3 = (Math.PI/180) * (this.hoek + 90);
this._y = this._y + ((-_local2) * Math.cos(_local3));
this._x = this._x + (_local2 * Math.sin(_local3));
if (_local4 > zeeHoogte) {
this.removeMovieClip();
} else if ((Math.abs(tuig._x - _local5) > xdraw) || (Math.abs(tuig._y - _local4) > ydraw)) {
this.removeMovieClip();
} else if (this.leven >= 380) {
this.removeMovieClip();
}
this.leven++;
};
}
};
startVliegTuig = function () {
var _local2 = planes.attachMovie("mcVlieg", "mcVlieg", 0);
tuig = _local2;
initVliegtuig(_local2);
wheelStartY = _local2.wheels._y;
_global.wheelsOut = true;
_local2.klaarVoorHit = true;
_local2.telNaHit = 0;
_local2.telSchiet = 0;
_local2.telBom = 0;
_local2.richting = "links";
_local2.hoek = 180;
_local2.memAngle = _local2.hoek;
memSchermPosElas = 200;
_local2.gotoAndStop("links");
bovenzee = true;
_local2.beschadigd = 22;
_local2.wrak = 26;
_local2.memLEFT = 0;
_local2.memRIGHT = 0;
_local2.fuel = 40;
_local2.maxFuel = 40;
_local2.aYSlug = [];
_local2.slugApos = 0;
_local2.minSnelheid = 10;
_local2.gemSpeed = 14;
_local2.maxSnelheid = 22;
_local2.type = "tuig";
piloot = _local2;
crashCalled = false;
};
startDog = function () {
var _local1 = planes.attachMovie("mcDog", "dog", 1);
_local1._xscale = 85;
_local1._yscale = 85;
dog = _local1;
_local1.dogNr = nrOfDogs;
_local1.opponent = tuig;
_local1._x = 4000;
_local1._y = 200;
_local1.type = "dog";
_local1.absMinHeight = zeeHoogte - 40;
_local1.laagteLat = 0;
_local1.afstandhouden = 200;
initVliegtuig(_local1);
_local1.hoek = 180;
_local1.telOntwijk = 0;
_local1.telSchiet = 0;
_local1.maneuvre = "geen";
_local1.superManeuvre = "geen";
_local1.randomAktie = "geen";
_local1.aktieKans = 10;
_local1.telSchiet = 0;
_local1.beschadigd = 22;
_local1.wrak = 26;
_local1.berekenNieuweHoogte = setInterval(setDogHoogte, 4000, _local1);
_local1.currentRandomAktie = "geen";
aRandomAkties = new Array();
aRandomAkties.rechts = ["op", "neer", "weg", "loop", "loop", "loop", "braketest", "braketest"];
aRandomAkties.ontwijk = ["opsnel", "neersnel", "loop", "loop"];
_local1.speed = 12;
_local1.minSnelheid = 10;
_local1.gemSpeed = 14;
_local1.maxSnelheid = 21;
_local1.iniMaxSnelheid = 21;
attachRadar(_local1);
dogBirth = getTimer();
if (Math.random() > 0.2) {
_local1.mode = "torpedo";
}
};
startFort = function () {
var _local1 = planes.attachMovie("mcFort", "fort", 2);
fort = _local1;
_local1.opponent = tuig;
_local1.fortNr = nrOfForts;
_local1._x = baanlinks;
_local1._y = -100;
_local1.type = "fort";
_local1.absMinHeight = zeeHoogte - 40;
_local1.laagteLat = 0;
_local1.afstandhouden = 200;
initVliegtuig(_local1);
_local1.richting = "rechts";
_local1.hoek = 0;
_local1.telOntwijk = 0;
_local1.telSchiet = 0;
_local1.maneuvre = "geen";
_local1.superManeuvre = "geen";
_local1.randomAktie = "geen";
_local1.aktieKans = 10;
_local1.telSchiet = 0;
_local1.beschadigd = 42;
_local1.wrak = 52;
_local1.berekenNieuweHoogte = setInterval(setDogHoogte, 4000, _local1);
_local1.speed = 10;
_local1.minSnelheid = 8;
_local1.gemSpeed = 12;
_local1.maxSnelheid = 14;
_local1.iniMaxSnelheid = 14;
_local1.bomPauze = 0;
attachRadar(_local1);
};
autoPilot = function () {
mc.tel = 0;
autoPilot = true;
var _local1 = planes.attachMovie("mcVlieg", "dog", 1);
dog = _local1;
piloot = dog;
_local1._x = tuig._x;
_local1._y = tuig._y;
_local1.type = "dog";
_local1.absMinHeight = zeeHoogte - 40;
_local1.laagteLat = 0;
_local1.afstandhouden = 200;
_local1.memSnelheid = 0.005;
_local1.maxMemSnelheid = 1;
_local1.maxMemHoek = 2;
_local1.snelheidAfwijking = 1;
_local1.daalVersnelling = 1.013;
_local1.memx = _local1._x;
_local1.memy = _local1._y;
_local1.speed = tuig.speed;
_local1.xsnelheid = tuig.xsnelheid;
_local1.ysnelheid = tuig.ysnelheid;
_local1.scrollsnelheid = tuig.scrollsnelheid;
_local1.memx = tuig.memx;
_local1.memscroll = tuig.memscroll;
_local1.hoek = tuig.hoek;
_local1._rotation = tuig._rotation;
_local1.memAngle = tuig.memAngle;
_local1.memTeLangzaam = tuig.memTeLangzaam;
_local1.memUP = tuig.memUP;
_local1.memDOWN = tuig.memDOWN;
_local1.memDaalSnelheid = tuig.memDaalSnelheid;
_local1.dif = tuig.dif;
_local1.wrakHoogte = 8;
if (mc.schade == undefined) {
mc.schade = 0;
}
_local1.schade = tuig.schade;
_local1.schadetel = tuig.schadetel;
_local1.richting = tuig.richting;
_local1.opdekop = tuig.opdekop;
_local1.gotoAndStop(tuig._currentframe);
_local1.hoek = tuig.hoek;
_local1.telOntwijk = 0;
_local1.telSchiet = 0;
_local1.maneuvre = "geen";
_local1.superManeuvre = "geen";
_local1.randomAktie = "geen";
_local1.aktieKans = 1;
_local1.telSchiet = 0;
_local1.beschadigd = tuig.beschadigd;
_local1.wrak = tuig.wrak;
_local1.berekenNieuweHoogte = setInterval(setDogHoogte, 4000, _local1);
_local1.currentRandomAktie = "geen";
aRandomAkties = new Array();
aRandomAkties.rechts = ["op", "neer", "weg", "loop", "loop", "loop", "braketest", "braketest"];
aRandomAkties.ontwijk = ["opsnel", "neersnel", "loop", "loop"];
_local1.minSnelheid = tuig.minSnelheid;
_local1.gemSpeed = tuig.gemSpeed;
_local1.maxSnelheid = tuig.maxSnelheid;
dummyTuig = planes.createEmptyMovieClip("dummyTuig", planes.getNextHighestDepth());
dummyTuig._x = (dummyTuig.realX = 2000);
dummyTuig._y = 50;
dummyTuig.richting = "rechts";
dummyTuig.speed = 20;
dummyTuig.maxSnelheid = _local1.maxSnelheid;
dummyTuig.minSnelheid = _local1.minSnelheid;
intAutoPilot = setInterval(setAutoPilot, 5000, dummyTuig);
_local1.opponent = dummyTuig;
tuig.removeMovieClip();
};
initVliegtuig = function (mc) {
mc.tel = 0;
mc.memSnelheid = 0.025;
mc.maxMemSnelheid = 3;
mc.maxMemHoek = 3;
mc.snelheidAfwijking = 1;
mc.daalVersnelling = 1.013;
mc.memy = mc._y;
mc.speed = 0;
mc.xsnelheid = 0;
mc.ysnelheid = 0;
mc.scrollsnelheid = 0;
mc.memx = mc._x;
mc.memy = mc._y;
mc.memscroll = 0;
mc.hoek = 180;
mc.memTeLangzaam = 0;
mc.memUP = 0.2;
mc.memDOWN = 0.2;
mc.memDaalSnelheid = 1;
mc.dif = "vliegt";
mc.wrakHoogte = 8;
mc.schade = 0;
mc.schadetel = 0;
mc.aBewaarhelling = new Array();
mc.sluggish = 0;
};
dogGeland = function (mc) {
var _local1 = mc;
var _local2 = baanrechts - 100;
_local1._x = _local2 - mapTravel;
_local1._y = baanhoogte;
_local1.realX = _local2;
_local1.speed = 0;
_local1.maxSnelheid = _local1.iniMaxSnelheid;
_local1.memx = _local2;
_local1.memscroll = _local2;
_local1.geland = true;
_local1.richting = "links";
_local1.gotoAndStop("links");
_local1.hoek = 180;
_local1.memAngle = 180;
_local1._rotation = 180;
_local1.schade = 0;
_local1.memLEFT = 0;
_local1.memRIGHT = 0;
_local1.dif = "vliegt";
_local1.landing = true;
_local1.tuiglandt = true;
_local1.landStap = null;
_local1.superManeuvre = "geen";
_local1.landingCheck = true;
};
gaCarrier = function () {
if (schipHoogte > (zeeHoogte - 10)) {
gameAktie("gezonken");
} else {
if (swapZeeDepths == true) {
swapZeeDepths = false;
planes.swapDepths(omgeving);
}
tuig.removeMovieClip();
startVliegTuig();
var _local1 = tuig;
var _local2 = schiplinks + 1000;
_local1._x = _local2;
_local1._y = schipHoogte;
_local1.realX = _local2;
_local1.speed = 0;
xPos = _local2;
mapTravel = 0;
containerX = -_local2;
dog._x = dog.realX;
fort._x = fort.realX;
_local1.memx = _local2;
_local1.memscroll = _local2;
_local1.geland = true;
_local1.richting = "links";
_local1.gotoAndStop("links");
_local1.hoek = 180;
_local1.memAngle = 180;
_local1._rotation = 180;
_local1.schade = 0;
_local1.memLEFT = 0;
_local1.memRIGHT = 0;
_local1.speed = 0;
_local1.dif = "vliegt";
_local1.landing = true;
knipperUit(hud.mcHud.mcFuelTekst);
knipperUit(hud.mcHud.mcDamageTekst);
pilootCrash = false;
attachMenu("ammo");
}
};
setAutoPilot = function (dummy) {
var _local2 = dummy.maxSnelheid - dummy.minSnelheid;
dummy.speed = random(_local2) + dummy.minSnelheid;
((random(1) == 0) ? ((dummy.richting = "links")) : ((dummy.richting = "rechts")));
var _local3 = eilandrechts - eilandlinks;
dummy._x = (dummy.realX = random(_local3));
dummy._y = zeeHoogte - random(600);
};
unsetAlles = function (mc) {
unsetRA(mc);
mc.superManeuvre = "geen";
mc.maneuvre = "geen";
if (mc == dog) {
mc.memFunctie = null;
}
};
unsetRA = function (mc) {
mc.randomAktie = "geen";
mc.setRandomAktie = "geen";
mc.currentRandomAktie = "geen";
mc.tedichtbijAktie = false;
};
gaNaarHoogte = function (mc, hoogte, functie, optieOntwijk, optieXpos) {
this=mc;//parameter overwritten
var _local4 = this._y;
if (optieOntwijk == true) {
var _local8 = 100;
} else {
var _local8 = 800;
}
var _local9 = Math.round(this.hoek);
if (this.memFunctie != functie) {
this.memGaNaarHoogte = hoogte + (70 - (intRandomGetal * 140));
}
this.memFunctie = functie;
var _local3 = this.memGaNaarHoogte;
var _local5 = Math.atan2(_local3 - _local4, _local8 * this.lr);
var _local2 = Math.round((_local5 * 180) / Math.PI);
if (Math.abs(_local2) > 90) {
((_local2 < 0) ? (_local2 = _local2 + 180) : (_local2 = _local2 - 180));
}
if (this.richting == "links") {
var _local6 = (_local2 - (this.hoek - 180)) / 4;
} else {
if (this.hoek > 270) {
var _local7 = this.hoek - 360;
} else {
var _local7 = this.hoek;
}
var _local6 = (_local2 - _local7) / 4;
}
this.hoek = this.hoek + _local6;
if ((_local4 > (_local3 - 25)) && (_local4 < (_local3 + 25))) {
unsetAlles(this);
this.memFunctie = null;
}
};
gaNaarPunt = function (mc, doelY, doelX, optieStappen, functie) {
this=mc;//parameter overwritten
var _local5 = this.realX;
if (this.memPuntFunctie != functie) {
this.memGaNaarPuntY = doelY;
this.memGaNaarPuntX = doelX;
}
this.memPuntFunctie = functie;
var _local4 = this.memGaNaarPuntX;
var _local6 = this.memGaNaarPuntY;
if (((_local5 < _local4) && (mc.richting == "links")) || ((_local5 > _local4) && (mc.richting == "rechts"))) {
this.dif = "keer";
} else {
var _local10 = 240;
var _local11 = Math.round(this.hoek);
var _local7 = Math.atan2(_local6 - this._y, _local10 * this.lr);
var _local2 = Math.round((_local7 * 180) / Math.PI);
if (Math.abs(_local2) > 90) {
((_local2 < 0) ? (_local2 = _local2 + 180) : (_local2 = _local2 - 180));
}
if (this.richting == "links") {
var _local8 = (_local2 - (this.hoek - 180)) / 4;
} else {
if (this.hoek > 270) {
var _local9 = this.hoek - 360;
} else {
var _local9 = this.hoek;
}
var _local8 = (_local2 - _local9) / 4;
}
this.hoek = this.hoek + _local8;
if ((_local5 > (_local4 - 125)) && (_local5 < (_local4 + 125))) {
if (optieStappen == true) {
if (mc.landStap == null) {
mc.landStap = 1;
} else {
mc.landStap = mc.landStap + 1;
}
}
unsetAlles(this);
this.memFunctie = null;
}
}
};
fortSchiet = function (tuigx, tuigy) {
this=fort;//parameter overwritten
var _local7 = fort.belly_turet;
var _local6 = this._x - tuig._x;
if (((this.richting == "links") && (_local6 > 0)) || ((this.richting == "rechts") && (_local6 < 0))) {
var _local14 = true;
}
if ((Math.abs(_local6) > 220) && (_local14 == true)) {
_local7 = fort.nose_turet;
} else if (tuig._y > this._y) {
_local7 = fort.belly_turet;
} else {
_local7 = fort.top_turet;
}
var _local5 = _local7.gun;
hitTestBounds(_local5, planes);
var _local10 = _local5.xMin;
var _local9 = _local5.yMax;
var _local13 = 20 - (intRandomGetal * 40);
var _local12 = 3.5;
var _local11 = Math.atan2(tuigy - _local9, tuigx - _local10);
var _local2 = (_local11 * 180) / Math.PI;
if (_local2 > 90) {
var _local4 = Math.abs(_local2 - 180);
} else if (_local2 < -90) {
var _local4 = -(_local2 + 180);
} else if ((_local2 <= 90) || (_local2 >= -90)) {
var _local4 = _local2;
}
if (tuig.richting == "rechts") {
var _local4 = -_local4;
}
var _local4 = _local4 * (1 + ((tuig.speed / tuig.maxSnelheid) * 1.5));
_local4 = _local4 / _local12;
_local7._rotation = ((-this._rotation) + _local2) + _local4;
this.telSchiet++;
if (this.telSchiet == 4) {
this.telSchiet = 0;
var _local8 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("mcBullet", "dogbull" + _local8, _local8);
_local3.type = "e_bullet";
_local3.speed = this.absSpeed + 10;
_local3._x = _local10;
_local3._y = _local9;
_local3.hoek = (_local2 + _local4) + _local13;
_local3.leven = 0;
_local5.gotoAndPlay(2);
startBullet(_local3);
}
};
keerFrames = function (mc) {
if (mc.eersteCall == null) {
mc.memFrame = mc._currentframe;
mc.eersteCall = true;
}
var _local2 = mc._currentframe;
mc.gotoAndStop(_local2 + 1);
if ((_local2 + 1) >= (mc.memFrame + 29)) {
mc.keert = false;
mc.memFrame = null;
mc.eersteCall = null;
mc.dif = "vliegt";
mc.gekeerd = false;
mc.gotoAndStop(mc.richting);
clearInterval(mc.keerInt);
}
};
keer = function (mc) {
if (mc.dif != "vliegt") {
unsetAlles(mc);
if (mc.keert != true) {
mc.keersnelheid = mc.xsnelheid;
if ((mc == tuig) && (mc.landing == true)) {
var _local3 = true;
} else {
var _local3 = false;
}
if (_local3 == true) {
mc.frameVertraging = Math.ceil((Math.abs(mc.xsnelheid) * 1) / 19);
mc.memXsnelheid = mc.xsnelheid;
mc.telTussenFrames = 0;
if (mc.richting == "links") {
if (mc.opdekop != true) {
(mc.gotoAndStop("draailinks"));// not popped
} else {
(mc.gotoAndStop("opdekop_rechtsom"));// not popped
}
} else {
if (mc.opdekop != true) {
(mc.gotoAndStop("draairechts"));// not popped
} else {
(mc.gotoAndStop("opdekop_linksom"));// not popped
}
}
} else {
mc.frameVertraging = Math.ceil((Math.abs(mc.xsnelheid) * 1.4) / 30);
mc.keerPlus = mc.xsnelheid / (15 * (mc.frameVertraging + 1));
mc.memXsnelheid = mc.xsnelheid;
mc.telTussenFrames = 0;
if (mc.richting == "links") {
if (mc.opdekop != true) {
(mc.gotoAndStop("rechtsom"));// not popped
} else {
(mc.gotoAndStop("opdekop_rechtsom"));// not popped
}
} else {
if (mc.opdekop != true) {
(mc.gotoAndStop("linksom"));// not popped
} else {
(mc.gotoAndStop("opdekop_linksom"));// not popped
}
}
}
mc.keert = true;
}
if (mc.gekeerd != true) {
mc.keersnelheid = mc.keersnelheid - mc.keerPlus;
mc._x = mc._x + mc.keersnelheid;
if (mc.telTussenFrames >= mc.frameVertraging) {
mc.gotoAndStop(mc._currentframe + 1);
mc.telTussenFrames = 0;
} else {
mc.telTussenFrames++;
}
} else {
mc.keersnelheid = mc.keersnelheid + mc.keerPlus;
mc._x = mc._x - mc.keersnelheid;
if (mc.telTussenFrames >= mc.frameVertraging) {
mc.gotoAndStop(mc._currentframe + 1);
mc.telTussenFrames = 0;
} else {
mc.telTussenFrames++;
}
if (mc.keerKlaar == true) {
mc.keerKlaar = false;
mc.dif = "vliegt";
mc.keert = false;
mc.gekeerd = false;
mc.gotoAndStop(mc.richting);
}
}
if (mc == piloot) {
mc._y = mc._y + 0.8;
}
var _local2 = mc.speed;
if (_local2 < mc.minSnelheid) {
mc.memTeLangzaam = mc.memTeLangzaam + ((mc.minSnelheid - _local2) / 6);
mc._y = mc._y + mc.memTeLangzaam;
} else if (mc.memTeLangzaam > 0) {
mc.memTeLangzaam = mc.memTeLangzaam - (_local2 / mc.maxSnelheid);
}
if (mc == tuig) {
mc._y = mc._y + mc.sluggish;
}
}
};
exitkeer = function (mc) {
mc.keerKlaar = false;
mc.dif = "vliegt";
mc.keert = false;
mc.gekeerd = false;
mc.gotoAndStop(mc.richting);
if (mc.richting == "rechts") {
mc.hoek = 0;
mc.memAngle = 0;
mc._rotation = 0;
} else {
mc.hoek = 180;
mc.memAngle = 180;
mc._rotation = 180;
}
};
keer2 = function (mc) {
if (mc.dif != "vliegt") {
unsetAlles(mc);
if (mc.keert != true) {
mc.keersnelheid = mc.xsnelheid;
mc.frameVertraging = Math.ceil((Math.abs(mc.xsnelheid) * 1) / 30);
mc.keerPlus = mc.xsnelheid / (15 * (mc.frameVertraging + 1));
mc.memXsnelheid = mc.xsnelheid;
mc.telTussenFrames = 0;
if (mc.richting == "links") {
if (mc.opdekop != true) {
(mc.gotoAndStop("rechtsom"));// not popped
} else {
(mc.gotoAndStop("opdekop_rechtsom"));// not popped
}
} else {
if (mc.opdekop != true) {
(mc.gotoAndStop("linksom"));// not popped
} else {
(mc.gotoAndStop("opdekop_linksom"));// not popped
}
}
mc.keert = true;
}
if (mc.gekeerd != true) {
mc.keersnelheid = mc.keersnelheid - mc.keerPlus;
mc._x = mc._x + mc.keersnelheid;
if (mc.telTussenFrames >= mc.frameVertraging) {
mc.gotoAndStop(mc._currentframe + 1);
mc.telTussenFrames = 0;
} else {
mc.telTussenFrames++;
}
} else {
mc.keersnelheid = mc.keersnelheid + mc.keerPlus;
mc._x = mc._x - mc.keersnelheid;
if (mc.telTussenFrames >= mc.frameVertraging) {
mc.gotoAndStop(mc._currentframe + 1);
mc.telTussenFrames = 0;
} else {
mc.telTussenFrames++;
}
if (mc.keerKlaar == true) {
mc.keerKlaar = false;
mc.dif = "vliegt";
mc.keert = false;
mc.gekeerd = false;
mc.gotoAndStop(mc.richting);
}
}
if (mc == piloot) {
mc._y = mc._y + 0.8;
}
var _local2 = mc.speed;
if (_local2 < mc.minSnelheid) {
mc.memTeLangzaam = mc.memTeLangzaam + ((mc.minSnelheid - _local2) / 6);
mc._y = mc._y + mc.memTeLangzaam;
} else if (mc.memTeLangzaam > 0) {
mc.memTeLangzaam = mc.memTeLangzaam - (_local2 / mc.maxSnelheid);
}
if (mc == tuig) {
mc._y = mc._y + mc.sluggish;
}
}
};
managePlaneCrashes = function (mc, explosie) {
if (mc == fort) {
if ((getTimer() - lastFortCrash) > 6000) {
lastFortCrash = getTimer();
if (mc.fortNr == nrOfForts) {
nrOfForts--;
}
}
if (nrOfForts <= 0) {
removeRadar(mc);
}
if (explosie == true) {
attachExplosie(mc);
} else {
mc.removeMovieClip();
}
} else if (mc == dog) {
if ((getTimer() - lastDogCrash) > 6000) {
lastDogCrash = getTimer();
if (mc.dogNr == nrOfDogs) {
nrOfDogs--;
}
}
if (nrOfDogs <= 0) {
removeRadar(mc);
}
if (explosie == true) {
attachExplosie(mc);
} else {
mc.removeMovieClip();
}
}
};
spawnDog = function () {
startDog();
dogGeland(dog);
};
spawnFort = function () {
startFort();
dogGeland(fort);
};
spawnPlanes = function () {
if (planes.dog == undefined) {
if (nrOfDogs > 0) {
spawnDog();
var _local1 = true;
}
}
if ((planes.fort == undefined) && (_local1 != true)) {
if (nrOfForts > 0) {
spawnFort();
}
}
};
stortneer = function (mc) {
if (erWordtGelandDoor == this) {
unsetLanding(this);
}
var _local8 = mc._rotation;
var _local7 = mc.speed;
if (((_local8 >= 0) && (_local8 < 10)) || ((_local8 <= 180) && (_local8 > 170))) {
if ((_local7 > 8) && (mc.crash != true)) {
mc._y = mc._y - 10;
mc.dif = "vliegt";
mc.schade = mc.schade + (1 + random(5));
mc.speed = mc.speed * 0.9;
var _local11 = planes.getNextHighestDepth();
var _local10 = planes.attachMovie("mcVonk", "vonk" + _local11, _local11);
_local10._x = mc._x;
_local10._y = mc._y;
_local10.speed = mc.speed;
if ((mc.bovenzee == true) && (mc.bovenBaan != true)) {
_local10.spetter = true;
}
_local10.richting = mc.richting;
}
}
if ((((_local8 > 45) && (_local8 < 135)) && (_local7 > 6)) || (mc.groteklap == true)) {
if (mc.geexplodeerd != true) {
if (mc != piloot) {
mc.parentwis = true;
}
mc.gotoAndStop("weg");
mc.schade = mc.wrak;
mc.speed = 0;
mc.geexplodeerd = true;
if (mc == tuig) {
attachExplosie(mc);
gameAktie("neergestort", true);
} else {
managePlaneCrashes(mc, true);
}
}
} else if ((mc.dif != "vliegt") && (mc.geexplodeerd != true)) {
if ((mc._x > schiplinks) && (mc._x < schiprechts)) {
var _local13 = true;
}
mc.crash = true;
mc.glij = "glij";
mc.schade = mc.wrak;
if (mc.richting == "links") {
if (mc == tuig) {
containerX = containerX + _local7;
xPos = xPos - _local7;
}
mc._x = mc._x - _local7;
mc.memAngle = 180;
mc._rotation = 180;
} else {
if (mc == tuig) {
containerX = containerX - _local7;
xPos = xPos + _local7;
}
mc._x = mc._x + _local7;
mc.memAngle = 0;
mc._rotation = 0;
}
if ((((mc.bovenzee == true) && (_local13 != true)) && (mc._y >= (zeeHoogte - 5))) || (noLand == "true")) {
if (mc == tuig) {
if (swapZeeDepths != true) {
planes.swapDepths(omgeving);
swapZeeDepths = true;
}
}
mc.speed = mc.speed * 0.9;
mc._y = mc._y + 0.5;
if ((mc.speed < 0.5) || (mc._y > (zeeHoogte + 10))) {
if (mc == tuig) {
gameAktie("neergestort");
} else {
managePlaneCrashes(mc);
}
}
} else {
mc.speed = mc.speed * 0.96;
var _local6 = 100000 /* 0x0186A0 */;
var _local3 = 0;
while (_local3 < mc.aBewaarhelling.length) {
var _local4 = mc.aBewaarhelling[_local3];
if (_local4 < _local6) {
var _local5 = _local4 + 3;
_local6 = _local4;
}
_local3++;
}
var _local12 = mc._y - _local5;
if (_local12 > 0) {
if ((mc._y - _local5) > 6) {
mc.groteklap = true;
}
mc._y = _local5;
} else {
mc._y = mc._y - (_local12 / 10);
}
}
if ((mc.speed < 0.5) || (mc._y > (zeeHoogte + 10))) {
if (mc == tuig) {
gameAktie("neergestort");
} else {
managePlaneCrashes(mc);
}
}
if (mc == tuig) {
scr._x = -xPos;
}
if (_local7 > 1) {
var _local11 = planes.getNextHighestDepth();
var _local9 = planes.attachMovie("mcVonk", "vonk" + _local11, _local11);
_local9._x = mc._x;
_local9._y = mc._y;
_local9.speed = mc.speed;
if ((mc.bovenzee == true) && (mc.bovenBaan != true)) {
_local9.spetter = true;
}
_local9.richting = mc.richting;
}
}
};
landScript = function (mc) {
if ((mc.realX >= baanlinks) && (mc.realX < baanrechts)) {
var _local5 = baanhoogte;
var _local4 = false;
} else {
var _local5 = schipHoogte;
var _local4 = true;
}
this=mc;//parameter overwritten
var _local3 = this.speed;
this.memTeLangzaam = (this.maxSnelheid + 4) - _local3;
this.landing = false;
if (_local4 == false) {
this.memTeLangzaam = 0;
}
if (this.tuiglandt == true) {
if (((this.landingCheck == true) && (this.speed >= this.gemSpeed)) && (_local4 == false)) {
if (this.richting == "rechts") {
this.hoek = this.hoek - 0.3;
} else {
this.hoek = this.hoek + 0.3;
}
trace(this.richting + " hoek");
} else {
if (this != tuig) {
if (this.speed < this.gemSpeed) {
this.speed++;
}
}
((this == fort) ? ((this._y = _local5 - 4)) : ((this._y = _local5)));
this.daalVersnelling = 0;
this.sluggish = 0;
this.speed = this.speed * 0.98;
if (this.bovenBaan == true) {
if (this.richting == "rechts") {
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
} else {
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
}
}
if (this.speed < this.gemSpeed) {
this.landingCheck = true;
}
}
if (this == tuig) {
if (_local4 == true) {
if ((Math.floor(this.speed) == 0) && (this.geland == false)) {
gaCarrier();
}
}
} else if ((Math.floor(this.speed) == 0) && (this.geland != true)) {
this.landStap = 4;
}
}
var _local2 = Math.abs(this._rotation);
if ((this.groteklap != true) && (this.tuiglandt != true)) {
if (((((_local2 <= 360) && (_local2 > 345)) || ((_local2 >= 0) && (_local2 < 15))) || ((_local2 <= 180) && (_local2 > 165))) || (this != tuig)) {
if ((((this == tuig) && (_local3 > this.gemSpeed)) && (this.crash != true)) && (this.geland != true)) {
this._y = this._y - 10;
this.schade = this.schade + 10;
this.dif = "vliegt";
} else if (this.daalVersnelling > 4) {
this.dif = "stortneer";
} else {
this.tuiglandt = true;
}
} else if ((((this._rotation > 45) && (this._rotation < 135)) && (_local3 > 6)) || (this.groteklap == true)) {
if (this.wrak != true) {
attachExplosie(this, "groot");
}
this.wrak = true;
this.gotoAndStop("wrak");
this._y = bodem;
this.speed = 0;
} else {
this.dif = "stortneer";
}
} else if (this.tuiglandt != true) {
this.dif = "stortneer";
}
};
aiLandScript = function (mc) {
var _local2 = baanhoogte;
var _local3 = false;
this=mc;//parameter overwritten
var _local4 = this.speed;
this.memTeLangzaam = (this.maxSnelheid + 4) - _local4;
this.landing = false;
if (_local3 == false) {
this.memTeLangzaam = 0;
}
if (this.speed < (this.gemSpeed + 2)) {
this.speed = this.speed + 0.5;
}
if ((this.speed >= this.gemSpeed) && (_local3 == false)) {
if (this._y > (baanhoogte - 60)) {
if (this.richting == "rechts") {
this.hoek = this.hoek - 0.3;
} else {
this.hoek = this.hoek + 0.3;
}
}
this.opgestegen = true;
} else if (this.opgestegen != true) {
((this == fort) ? ((this._y = _local2 - 4)) : ((this._y = _local2)));
this.daalVersnelling = 0;
if (this.richting == "rechts") {
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
} else {
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
}
}
};
torpedoScript = function () {
this=dog;//parameter overwritten
this.torpedo._visible = true;
this.torpedoVisible = true;
if (carrierDamage >= maxCarrierDamage) {
unsetTorpedoAktie();
this.mode = null;
}
if (this.opdekop == true) {
if (keerMogelijk(this)) {
this.dif = "keer";
} else {
((this.richting == "links") ? ((this.hoek = this.hoek + 4)) : ((this.hoek = this.hoek - 4)));
}
} else if (dogVanLinks == false) {
if (this.landStap == null) {
trace("landstap null");
gaNaarPunt(this, (schipHoogte - 200) - (intRandomGetal * 100), (schiprechts + 3000) + (intRandomGetal * 1000), true, "stap0");
} else if (this.landStap == 1) {
trace("landstap 1");
if (this.speed > (this.minSnelheid + 0.5)) {
this.speed = this.speed - 0.5;
}
if (this.speed < this.minSnelheid) {
this.speed = this.speed * 1.01;
}
gaNaarPunt(this, schipHoogte + 36, (schiprechts + 1400) + (intRandomGetal * 400), true, "stap1");
} else if (this.landStap == 2) {
trace((("landstap 2 " + this._y) + " ZEE - 60:") + (zeeHoogte - 60));
this._y = this._y + 2.5;
this._memAnge = 180;
this.hoek = 180;
this._rotation = 180;
if (this._y > (zeeHoogte - 50)) {
trace("RELEASE TORPEDO");
unsetTorpedoAktie();
startTorpedo(this);
var _local2 = getTimer();
gaNaarHoogte(this, schipHoogte - (1000 + random(200)), "torpedoScript" + _local2, true);
}
}
} else if (this.landStap == null) {
trace("landstap null");
gaNaarPunt(this, (schipHoogte - 200) - (intRandomGetal * 100), (schiplinks - 3000) - (intRandomGetal * 1000), true, "stap0");
} else if (this.landStap == 1) {
trace("landstap 1");
if (this.speed > (this.minSnelheid + 0.5)) {
this.speed = this.speed - 0.5;
}
if (this.speed < this.minSnelheid) {
this.speed = this.speed * 1.01;
}
gaNaarPunt(this, schipHoogte + 36, (schiplinks - 1400) - (intRandomGetal * 400), true, "stap1");
} else if (this.landStap == 2) {
trace("landstap 2 " + this._y);
this._y = this._y + 2.5;
this._memAnge = 0;
this.hoek = 0;
this._rotation = 0;
trace((("this._y " + this._y) + " ") + (zeeHoogte - 60));
if (this._y > (zeeHoogte - 50)) {
trace("RELEASE TORPEDO");
unsetTorpedoAktie();
startTorpedo(this);
var _local2 = getTimer();
gaNaarHoogte(this, schipHoogte - (1000 + random(200)), "torpedoScript" + _local2, true);
}
}
};
unsetTorpedoAktie = function () {
var _local1 = dog;
_local1.torpedo._visible = false;
_local1.torpedoVisible = false;
_local1.mode = null;
_local1.superManeuvre = "geen";
_local1.landStap = null;
};
landStappenScript = function (mc) {
this=mc;//parameter overwritten
if (this.landStap < 3) {
if (this.speed > (this.minSnelheid + 1)) {
this.speed = this.speed * 0.98;
} else if (this.speed < this.minSnelheid) {
this.speed = this.minSnelheid + 1;
}
}
if (this.opdekop == true) {
if (keerMogelijk(this)) {
this.dif = "keer";
} else {
((this.richting == "links") ? ((this.hoek = this.hoek + 4)) : ((this.hoek = this.hoek - 4)));
}
} else {
if (this == fort) {
var _local2 = 6;
} else {
var _local2 = 0;
}
if (this.landStap == null) {
erWordtGelandDoor = this;
gaNaarPunt(this, (baanhoogte - 300) - (intRandomGetal * 200), (baanlinks - 3500) - (intRandomGetal * 1000), true, "stap0");
} else if (this.landStap == 1) {
gaNaarPunt(this, (baanhoogte - 200) - (intRandomGetal * 100), (baanlinks - 2200) - (intRandomGetal * 600), true, "stap1");
} else if (this.landStap == 2) {
gaNaarPunt(this, baanhoogte - 20, baanlinks, true, "stap2");
} else if (this.landStap == 3) {
if (this._x > baanRechts) {
unsetLanding(this, true);
}
if (this._y >= (baanhoogte - _local2)) {
this.landing = true;
}
if (this.tuiglandt != true) {
this.ation = 0;
this.hoek = 0;
this.memAngle = 0;
if (this.realX > baanlinks) {
this._y = this._y + 0.6;
}
var _local3 = true;
}
} else if (this.landStap == 4) {
if (this._x > baanRechts) {
unsetLanding(this, true);
}
this.geland = true;
this.landStap = 5;
var _local3 = true;
} else if (this.landStap == 5) {
if (this._x > baanRechts) {
unsetLanding(this, true);
}
dogGeland(this);
this.landStap = 6;
var _local3 = true;
} else if (this.landStap == 6) {
if (this._x > baanRechts) {
unsetLanding(this, true);
}
this.speed = this.speed + 0.5;
var _local3 = true;
}
}
};
unsetLanding = function (mc, nieuweLandingsTijd, torpedoMode) {
mc.geland = false;
mc.tuiglandt = false;
mc.tijdOmTeLanden = false;
mc.landStap = null;
mc.landingCheck = false;
erWordtGelandDoor = null;
mc.superManeuvre = "geen";
if (torpedoMode == true) {
if ((Math.random() > 0.4) && (this != fort)) {
this.mode = "torpedo";
}
}
};
keerMogelijk = function (mc, optieGrHoek) {
if (optieGrHoek == "grotehoek") {
var _local2 = 60;
} else {
var _local2 = 20;
}
var _local3 = false;
if (mc.richting == "rechts") {
if ((mc.hoek > (360 - _local2)) || (mc.hoek < _local2)) {
_local3 = true;
}
} else if ((mc.hoek > (180 - _local2)) && (mc.hoek < (180 + _local2))) {
_local3 = true;
}
if (mc == tuig) {
if (mc.tuiglandt == true) {
if (mc.speed > 1) {
_local3 = false;
}
}
}
return(_local3);
};
wheels = function (option) {
if (option == "in") {
if (tuig.richting == "rechts") {
tuig.wheels._y = wheelStartY;
tuig.wheels.onEnterFrame = function () {
this._y = this._y - 0.5;
if (this._y < (wheelStartY - 8)) {
delete this.onEnterFrame;
}
};
} else {
tuig.wheels._y = wheelStartY;
tuig.wheels.onEnterFrame = function () {
this._y = this._y + 0.5;
if (this._y > (wheelStartY + 8)) {
delete this.onEnterFrame;
}
};
}
} else if (tuig.richting == "rechts") {
tuig.wheels._y = wheelStartY - 8;
tuig.wheels.onEnterFrame = function () {
this._y = this._y + 0.5;
if (this._y >= wheelStartY) {
delete this.onEnterFrame;
}
};
} else {
tuig.wheels._y = wheelStartY + 8;
tuig.wheels.onEnterFrame = function () {
this._y = this._y - 0.5;
if (this._y <= wheelStartY) {
delete this.onEnterFrame;
}
};
}
};
verwerkTuig = function (mc) {
this=mc;//parameter overwritten
s = this.speed;
if (Math.abs(this._rotation) > 90) {
this.richting = "links";
if (this._currentframe == 1) {
this.opdekop = true;
} else {
this.opdekop = false;
}
} else {
this.richting = "rechts";
if (this._currentframe == 2) {
this.opdekop = true;
} else {
this.opdekop = false;
}
}
if ((mc.realX < (schiplinks - 4)) || (mc.realX > (schiprechts + 4))) {
mc.bovenBaan = false;
if (mc.tuiglandt == true) {
mc.geland = false;
mc.tuiglandt = false;
this.landingCheck = false;
mc.memAngle = mc.hoek;
}
} else {
mc.bovenBaan = true;
}
if ((mc.realX > (schiplinks - 800)) && (mc.realX < (schiprechts + 800))) {
if (wheelsOut == false) {
_global.wheelsOut = true;
wheels("out");
}
} else if (wheelsOut == true) {
_global.wheelsOut = false;
wheels("in");
}
if ((((this.ammoType == "torpedo") && (this.ammo > 0)) && (this.dif != "keer")) && (this.landing != true)) {
this.torpedo._visible = true;
} else {
this.torpedo._visible = false;
}
if (this.hoek > 360) {
this.memAngle = this.memAngle - 360;
this.hoek = this.hoek - 360;
}
if (this.hoek < 0) {
this.memAngle = this.memAngle + 360;
this.hoek = this.hoek + 360;
}
this.daalVersnelling = 1 + Math.abs(this.ysnelheid / 1000);
schade(this);
berekenAltitude(this);
berekenAbsSnelheid(this);
regelAmmo();
if (this.trilling == true) {
tril(this);
}
if ((this.realX >= eilandlinks) && (this.realX <= eilandrechts)) {
this.bovenzee = false;
} else {
this.bovenzee = true;
}
switch (this.dif) {
case "keer" :
keer(this);
regelContainerPosities();
break;
case "vliegt" :
if (menuaan != true) {
if (Key.isDown(kRi)) {
this.geenacc = false;
if (this.memRIGHT < this.maxMemSnelheid) {
this.memRIGHT = this.memRIGHT + this.memSnelheid;
}
if (this.richting == "links") {
if (keerMogelijk(this)) {
this.dif = "keer";
}
} else if (this.critical != true) {
this.speed = this.speed + this.memRIGHT;
}
} else {
this.memRIGHT = 0;
this.geenacc = true;
}
if (Key.isDown(kLe)) {
this.geenacc = false;
if (this.memLEFT < this.maxMemSnelheid) {
this.memLEFT = this.memLEFT + this.memSnelheid;
}
if (this.richting == "rechts") {
if (keerMogelijk(this)) {
this.dif = "keer";
}
} else if (this.critical != true) {
this.speed = this.speed + this.memLEFT;
}
} else {
this.memLEFT = 0;
this.geenacc = true;
}
if (Key.isDown(kUp)) {
if (this.memDOWN < this.maxMemHoek) {
this.memDOWN = this.memDOWN * 1.38;
}
if (this.richting == "links") {
if (this.opdekop == false) {
this.hoek = this.hoek - this.memDOWN;
} else {
this.hoek = this.hoek + this.memDOWN;
}
} else if (this.opdekop == false) {
this.hoek = this.hoek + this.memDOWN;
} else {
this.hoek = this.hoek - this.memDOWN;
}
} else {
this.memDOWN = 0.2;
}
if (Key.isDown(kDown)) {
if (this.memOP < 45) {
this.memOP = this.memOP + 1;
}
if (this.memUP < this.maxMemHoek) {
this.memUP = this.memUP * 1.38;
}
if (this.richting == "rechts") {
if (this.opdekop == false) {
this.hoek = this.hoek - this.memUP;
} else {
this.hoek = this.hoek + this.memUP;
}
} else if (this.opdekop == false) {
this.hoek = this.hoek + this.memUP;
} else {
this.hoek = this.hoek - this.memUP;
}
} else {
this.memOP = 0;
this.memUP = 0.2;
}
if (Key.isDown(kGun)) {
this.telSchiet++;
if (this.telSchiet >= (3 + Math.round(Math.random() * 3))) {
var _local8 = this.mcGun;
hitTestBounds(_local8, bullets);
var _local15 = _local8.xMin;
var _local14 = _local8.yMax;
this.telSchiet = 0;
var _local11 = bullets.getNextHighestDepth();
var _local6 = bullets.attachMovie("mcBullet", "bull" + _local11, _local11);
_local6.type = "bullet";
ammoFired("bullet");
_local6.speed = this.absSpeed + 15;
_local6._x = _local15;
_local6._y = _local14;
_local6.hoek = this.hoek;
_local6.leven = 0;
_local8.gotoAndPlay(2);
startBullet(_local6);
sfx_gun.stop();
sfx_gun.start();
telgun++;
}
}
}
if ((this.geenacc == true) && (this.tuiglandt != true)) {
this.speed = this.speed + ((this.minSnelheid - s) / 60);
}
var s = this.speed;
if (s >= this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
if (this._rotation < 0) {
this.stijg = true;
} else {
this.stijg = false;
}
var _local10 = this.slugApos;
var _local13 = (-s) * Math.cos((Math.PI/180) * (this.hoek + 90));
if (_local10 > 8) {
this.slugApos = 0;
}
this.aYSlug[_local10] = _local13;
this.slugApos++;
var _local5 = 0;
var _local3 = 0;
while (_local3 < this.aYSlug.length) {
_local5 = _local5 + this.aYSlug[_local3];
_local3++;
}
_local5 = _local5 / this.aYSlug.length;
this._y = this._y + (_local5 * 0.5);
if (this.ysnelheid > 80) {
this.ysnelheid = 0;
}
var _local16 = this.ysnelheid / 80;
if (this.stijg == false) {
if (this.sluggish < 1.4) {
this.sluggish = this.sluggish + _local16;
}
} else if (this.sluggish > 0) {
this.sluggish = this.sluggish - (this.speed / 100);
}
if (this.sluggish > 0.5) {
this._y = this._y + this.sluggish;
}
var s = this.speed;
var _local12 = this.memAngle - this.hoek;
var _local7 = Math.abs(((this.maxSnelheid - s) / 2) + 2);
if (_local7 > 8) {
_local7 = 8;
}
if (Math.abs(_local12) > _local7) {
if (_local12 > 0) {
this.hoek = this.memAngle - _local7;
} else {
this.hoek = this.memAngle + _local7;
}
}
this.memAngle = this.hoek;
var _local17 = this.memAngle;
this._rotation = this.hoek;
if (this.tuiglandt == true) {
if (this.richting == "links") {
this._x = this._x - s;
} else {
this._x = this._x + s;
}
} else {
this._x = this._x + (s * Math.sin((Math.PI/180) * (this.hoek + 90)));
}
if (this.tuiglandt != true) {
var _local9 = this.absSpeed;
if (s < this.minSnelheid) {
this.memTeLangzaam = this.memTeLangzaam + ((this.minSnelheid - _local9) / 20);
} else if (this.memTeLangzaam > 0) {
this.memTeLangzaam = this.memTeLangzaam - (_local9 / this.maxSnelheid);
}
}
if (this.memTeLangzaam > 0.5) {
this._y = this._y + this.memTeLangzaam;
}
this.curr_snelheid = s;
break;
case "stortneer" :
stortneer(this);
}
if ((this.landing == true) && (this.dif != "stortneer")) {
landScript(this);
}
this.xsnelheid = tuig._x - this.memx;
this.realX = this._x + mapTravel;
this.memx = tuig._x;
this.ysnelheid = this._y - this.memy;
this.memy = this._y;
};
verwerkDog = function (mc) {
this=mc;//parameter overwritten
if ((mc.realX < baanlinks) || (mc.realX > baanrechts)) {
mc.bovenBaan = false;
if (mc.tuiglandt == true) {
unsetLanding(mc, true, true);
}
} else {
mc.bovenBaan = true;
}
if (mc.tel >= 30) {
trace((((((((((((("DSOG " + dog.realX) + " ") + dog.mode) + " ") + dog.maneuvre) + " ") + dog.superManeuvre) + " ") + dog.randomAktie) + " ") + dog.dif) + " ") + dog.tuiglandt);
mc.tel = 0;
}
mc.tel++;
if (this.hoek < 0) {
this.memAngle = this.memAngle + 360;
this.hoek = this.hoek + 360;
} else if (this.hoek > 360) {
this.hoek = this.hoek - 360;
this.memAngle = this.memAngle - 360;
}
if (!planes.mcVlieg) {
var _local2 = dummyTuig._x;
var _local3 = dummyTuig._y;
var _local32 = dummyTuig.richting;
var _local8 = dummyTuig.speed;
var _local31 = 180;
var _local4 = dummyTuig;
} else {
var _local4 = this.opponent;
var _local2 = _local4._x;
var _local3 = _local4._y;
var _local32 = _local4.richting;
var _local8 = _local4.speed;
var _local31 = _local4._rotation;
}
berekenAbsSnelheid(this);
if (Math.abs(this._rotation) > 90) {
this.richting = "links";
this.lr = -1;
if (this._currentframe == 1) {
this.opdekop = true;
} else {
this.opdekop = false;
}
} else {
this.richting = "rechts";
this.lr = 1;
if (this._currentframe == 2) {
this.opdekop = true;
} else {
this.opdekop = false;
}
}
this.daalVersnelling = 1 + Math.abs(this.ysnelheid / 1000);
inDeBuurt(this);
if ((this.indebuurt == true) || (this.dif == "stortneer")) {
if (this.trilling == true) {
tril(this);
}
if (this.geraakt == true) {
this.telNaGeraakt++;
}
if (this.telNaGeraakt > 50) {
this.telNaGeraakt = 0;
this.geraakt = false;
}
} else {
hitTestBounds(this);
}
schade(this);
this.minHeight = this.groundLevel - this.laagteLat;
if ((this.realX >= eilandlinks) && (this.realX <= eilandrechts)) {
this.bovenzee = false;
} else {
this.bovenzee = true;
}
var _local13 = berekenAfstand(_local4, this);
var _local10 = this.afstand - _local13;
if (Math.abs(_local10) > 20) {
if (_local10 > 0) {
var _local9 = 20;
} else {
var _local9 = -20;
}
} else {
var _local9 = _local10;
}
this.impactSnelheid = _local9;
this.afstand = _local13;
this.yafstand = Math.abs(dog._y - _local3);
this.xafstand = Math.abs(dog._y - _local3);
switch (this.dif) {
case "keer" :
keer(this);
break;
case "klim" :
this.geland = false;
this.tuiglandt = false;
this._y = this._y - 1;
if (this._y < (schipHoogte - 20)) {
this.dif = "vliegt";
}
break;
case "vliegt" :
if (this._rotation < 0) {
this.stijg = true;
} else {
this.stijg = false;
}
dogStopScript++;
var _local21 = this.snelheidAfwijking - (intRandomGetal * (this.snelheidAfwijking * 2));
if (this.speed < (this.gemSpeed + _local21)) {
if (this.critical != true) {
if ((erWordtGelandDoor != this) && (this.superManeuvre != "torpedo")) {
if (this.maneuvre != "volg") {
if (this.superManeuvre != "tedichtbij") {
if (this.dif != "stortneer") {
if (this.currentRandomAktie != "braketest") {
if (Math.abs(this.afstand) > 400) {
this.speed = this.speed + ((this.maxSnelheid - this.speed) / 20);
} else {
this.speed = this.speed + (((this.gemSpeed + _local21) - this.speed) / 20);
}
}
}
}
}
}
}
}
if (dogStopScript > 10) {
dogStopScript = 0;
if (((this._x > _local2) && (this.richting == "rechts")) || ((this._x < _local2) && (this.richting == "links"))) {
if (this._y < (this.minHeight - 20)) {
if ((this.superManeuvre != "torpedo") && (this.tuiglandt != true)) {
if (keerMogelijk(this, "grotehoek")) {
if ((_local10 * this.afstand) < (-3000 + (intRandomGetal * -15000))) {
if (keerMogelijk(this)) {
if (intRandomGetal > 0.2) {
if (this.speed >= this.minSnelheid) {
this.dif = "keer";
}
} else if (this.superManeuvre == "geen") {
((this.richting == "links") ? ((this.superManeuvre = "looplinks")) : ((this.superManeuvre = "looprechts")));
}
} else if (this.superManeuvre == "geen") {
((this.richting == "links") ? ((this.superManeuvre = "looplinks")) : ((this.superManeuvre = "looprechts")));
}
}
}
}
}
}
if (this.braketest != false) {
if (this.richting == "rechts") {
if (this._x > _local4._x) {
var _local14 = this.afstandhouden + naderAfstand;
if ((afstand > _local14) && (afstand < (_local14 + 150))) {
if (this.intRandomGetal < 0.3) {
this.superManeuvre = "braketest";
}
}
}
} else if (this.richting == "links") {
if (this._x < _local4._x) {
var _local14 = this.afstandhouden + naderAfstand;
if ((afstand > _local14) && (afstand < (_local14 + 150))) {
if (this.intRandomGetal < 0.3) {
this.superManeuvre = "braketest";
}
}
}
}
} else {
this.speed = this.speed * 1.01;
if (this.speed >= this.gemSpeed) {
this.braketest = true;
}
}
if ((this.afstand < (this.afstandhouden + naderAfstand)) && (this.tedichtbijAktie != true)) {
if ((this.superManeuvre != "looplinks") && (this.superManeuvre != "looprechts")) {
this.superManeuvre = "tedichtbij";
}
}
if (this.mode == "torpedo") {
if (this.tuiglandt != true) {
this.superManeuvre = "torpedo";
}
} else if (this._y > this.minHeight) {
this.superManeuvre = "telaag";
} else if (_local9 > 0) {
var naderAfstand = (_local9 * 10);
} else {
naderAfstand = 0;
}
if (this.geraakt == true) {
if (this.superManeuvre == "torpedo") {
unsetTorpedoAktie();
startTorpedo(this);
}
if (kortRandomGetal < 0.6) {
if ((this.richting == "rechts") && (this.superManeuvre != "looplinks")) {
this.superManeuvre = "looprechts";
} else if ((this.richting == "links") && (this.superManeuvre != "looprechts")) {
this.superManeuvre = "looplinks";
}
} else if (kortRandomGetal > 0.9) {
this.dif = "keer";
}
}
}
if (this.superManeuvre != "geen") {
unsetRA(this);
this.maneuvre = "geen";
}
switch (this.superManeuvre) {
case "landen" :
if (this.critical == true) {
unsetLanding(this, true);
} else {
landStappenScript(this);
}
break;
case "torpedo" :
torpedoScript();
break;
case "telaag" :
gaNaarHoogte(this, zeeHoogte - (langRandomGetal * 1000), "telaag");
break;
case "tedichtbij" :
var _local27;
((_local8 < this.minSnelheid) ? (_local27 = this.minSnelheid) : (_local27 = _local8));
if (this.richting == "rechts") {
if (this._x < _local2) {
if (this.richting != _local4.richting) {
if (_local9 > 2) {
gaNaarHoogte(this, this._y - 300, "ontwijkrechts", true);
if (this.speed > (this.minSnelheid + 1)) {
this.speed = this.speed * 0.98;
}
var _local29 = true;
}
}
} else if (this.richting == _local4.richting) {
this.setRandomAktie = "rechts";
this.aktieKans = 20;
}
if (this.afstand > ((this.afstandhouden + naderAfstand) + 20)) {
this.superManeuvre = "geen";
}
} else if (this.richting == "links") {
if (this._x > _local2) {
if (this.richting != _local4.richting) {
if (_local9 > 2) {
gaNaarHoogte(this, this._y - 300, "ontwijklinks", true);
if (this.speed > (this.minSnelheid + 1)) {
this.speed = this.speed * 0.98;
}
var _local29 = true;
}
}
} else if (this.richting == _local4.richting) {
this.setRandomAktie = "rechts";
this.aktieKans = 20;
}
if (this.afstand > ((this.afstandhouden + naderAfstand) + 20)) {
this.superManeuvre = "geen";
}
}
break;
case "looprechts" :
if (this.richting == "links") {
if (_local2 < this._x) {
var _local16 = Math.atan2(_local3 - this._y, _local2 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (Math.abs(_local12) > 90) {
((_local12 < 0) ? (_local12 = _local12 + 180) : (_local12 = _local12 - 180));
}
var _local26 = (_local12 - (this.hoek - 180)) / 4;
this.hoek = this.hoek + _local26;
this.telloop++;
} else {
unsetAlles(this);
gaNaarHoogte(this, _local3, "uitlooplinks");
}
if (this.telloop >= 200) {
this.superManeuvre = "geen";
}
} else {
if (this.speed > (this.minSnelheid + 0.5)) {
this.speed = this.speed - 0.5;
}
this.hoek = this.hoek - 6;
this.telloop = 0;
}
break;
case "looplinks" :
if (this.richting == "rechts") {
if (_local2 > this._x) {
var _local16 = Math.atan2(_local3 - this._y, _local2 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (this.hoek > 270) {
var _local30 = this.hoek - 360;
} else {
var _local30 = this.hoek;
}
var _local26 = (_local12 - _local30) / 4;
this.hoek = this.hoek + _local26;
this.telloop++;
} else {
unsetAlles(this);
gaNaarHoogte(this, _local3, "uitlooprechts");
}
if (this.telloop >= 200) {
this.superManeuvre = "geen";
}
} else {
this.hoek = this.hoek + 6;
this.telloop = 0;
}
}
if (this.currentRandomAktie == "geen") {
switch (this.setRandomAktie) {
case "rechts" :
if (this.currentRandomAktie != "rechts") {
var _local23 = random(aRandomAkties.rechts.length);
if (Math.floor(Math.random() * this.aktieKans) == 0) {
this.randomAktie = aRandomAkties.rechts[_local23];
this.raGetal = Math.random() * 100;
this.pakHoogte = this._y;
this.currentRandomAktie = "rechts";
this.superManeuvre = "geen";
this.tedichtbijAktie = true;
}
}
break;
case "ontwijk" :
if (this.currentRandomAktie == "ontwijk") {
break;
}
var _local23 = Math.floor(Math.random() * aRandomAkties.ontwijk.length);
if (Math.floor(Math.random() * this.aktieKans) != 0) {
break;
}
this.randomAktie = aRandomAkties.ontwijk[_local23];
this.raGetal = Math.random() * 300;
this.pakHoogte = this._y;
this.currentRandomAktie = "ontwijk";
}
}
if (this.superManeuvre == "geen") {
switch (this.randomAktie) {
case "op" :
gaNaarHoogte(this, this.pakHoogte - this.raGetal, "op");
break;
case "neer" :
gaNaarHoogte(this, this.pakHoogte + this.raGetal, "neer");
break;
case "opsnel" :
gaNaarHoogte(this, this.pakHoogte - this.raGetal, "opsnel");
break;
case "neersnel" :
gaNaarHoogte(this, this.pakHoogte + this.raGetal, "neersnel");
break;
case "weg" :
this.speed = this.speed + 1;
if (this.speed >= this.maxSnelheid) {
this.speed = this.maxSnelheid;
unsetRA(this);
}
break;
case "braketest" :
if ((this.speed > this.minSnelheid) && (this.braketest != true)) {
this.braketest = true;
this.brakewacht = 0;
}
this.speed = this.speed * 0.9;
this.brakewacht++;
if (this.brakewacht >= 20) {
unsetRA(this);
}
if (this.speed < this.minSnelheid) {
this.speed = this.minSnelheid;
}
break;
case "loop" :
if (this.richting == "links") {
this.superManeuvre = "looplinks";
}
if (this.richting != "rechts") {
break;
}
this.superManeuvre = "looprechts";
}
}
if ((this.superManeuvre == "geen") && (this.currentRandomAktie == "geen")) {
if (this.maneuvre == "geen") {
if (Math.abs(this._y - this.hoogte) > 10) {
if ((((this.richting == "links") && (_local2 > this._x)) || ((this.richting == "rechts") && (_local2 < this._x))) || (_local4 == undefined)) {
this.maneuvre = "nieuwehoogte";
}
}
}
if (this.speed >= this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
if (this.richting == "rechts") {
if (this._x < _local2) {
if ((this.afstand > this.afstandhouden) && (this.afstand < (this.afstandhouden + 50))) {
this.maneuvre = "volg";
}
}
} else if (this._x > _local2) {
if ((this.afstand > this.afstandhouden) && (this.afstand < (this.afstandhouden + 50))) {
this.maneuvre = (this.maneuvre = "volg");
}
}
switch (this.maneuvre) {
case "volg" :
if (_local8 >= this.minSnelheid) {
this.speed = this.speed + ((_local8 - this.speed) / 20);
if (Math.round(this.speed) == Math.round(_local8)) {
this.speed = _local8;
}
}
if (_local3 < this.minHeight) {
if (this.richting == "rechts") {
var _local16 = Math.atan2(_local3 - this._y, _local2 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (this.hoek > 270) {
var _local30 = this.hoek - 360;
} else {
var _local30 = this.hoek;
}
var _local26 = (_local12 - _local30) / 4;
this.hoek = this.hoek + _local26;
if (this._x > _local2) {
this.maneuvre = "geen";
}
} else {
var _local16 = Math.atan2(_local3 - this._y, _local2 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (Math.abs(_local12) > 90) {
((_local12 < 0) ? (_local12 = _local12 + 180) : (_local12 = _local12 - 180));
}
var _local26 = (_local12 - (this.hoek - 180)) / 4;
this.hoek = this.hoek + _local26;
if (this._x < _local2) {
this.maneuvre = "geen";
}
}
} else if (this.afstand > (this.afstandhouden + 150)) {
this.maneuvre = "geen";
}
break;
case "nieuwehoogte" :
var _local24 = getTimer();
gaNaarHoogte(this, this.hoogte, "nieuwehoogte" + _local24);
break;
case "remmen" :
this.speed = this.speed * 0.95;
}
}
if (_local4.dif == "vliegt") {
if ((((((this.superManeuvre != "telaag") && (erWordtGelandDoor != this)) && (this.superManeuvre != "torpedo")) && (this.superManeuvre != "looprechts")) && (this.superManeuvre != "looplinks")) && (_local29 != true)) {
if (this.afstand > 500) {
if (_local3 > (this.minHeight - 150)) {
var _local15 = _local3 - 280;
gaNaarHoogte(this, _local15, "stuur");
} else {
var _local15 = _local3 + (plusminRand * 240);
gaNaarHoogte(this, _local15, "stuur2");
}
var _local17 = _local2 + (plusminRand * 60);
} else {
var _local15 = _local3;
var _local17 = _local2;
}
if (this.richting == "rechts") {
if (_local2 > this._x) {
var _local16 = Math.atan2(_local15 - this._y, _local17 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (this.hoek > 270) {
var _local30 = this.hoek - 360;
} else {
var _local30 = this.hoek;
}
var _local26 = (_local12 - _local30) / 4;
this.hoek = this.hoek + _local26;
}
} else if (_local2 < this._x) {
var _local16 = Math.atan2(_local15 - this._y, _local17 - this._x);
var _local12 = Math.round((_local16 * 180) / Math.PI);
if (Math.abs(_local12) > 90) {
((_local12 < 0) ? (_local12 = _local12 + 180) : (_local12 = _local12 - 180));
}
var _local26 = (_local12 - (this.hoek - 180)) / 4;
this.hoek = this.hoek + _local26;
}
}
}
if (Key.isDown(68)) {
this.speed = this.speed + 1;
}
if (Key.isDown(65)) {
this.speed = this.speed - 1;
}
if (Key.isDown(83)) {
this.hoek = this.hoek - 4;
}
if (Key.isDown(87)) {
this.hoek = this.hoek + 4;
}
var _local7 = this.speed;
var _local28 = _local7;
if (_local7 >= this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
if (this._rotation < 0) {
this.stijg = true;
} else {
this.stijg = false;
}
if (Math.abs(this._rotation) <= 90) {
this._y = this._y + (((this._rotation / 90) * _local7) / 2);
} else {
var _local19 = Math.abs(this._rotation) - 180;
if (this.stijg == true) {
this._y = this._y + ((_local19 / 90) * (_local7 / 2));
}
if (this.stijg == false) {
this._y = this._y - ((_local19 / 90) * (_local7 / 2));
}
}
var _local20 = this.memAngle - this.hoek;
var _local11 = ((this.maxSnelheid + 1) - this.speed) / 3.4;
if (Math.abs(_local20) > _local11) {
if (_local20 > 0) {
this.hoek = this.memAngle - _local11;
} else {
this.hoek = this.memAngle + _local11;
}
}
this.memAngle = this.hoek;
this._rotation = this.hoek;
if (this.ysnelheid > 0) {
this.laagteLat = Math.pow(this.ysnelheid, 3);
} else {
this.laagteLat = 0;
}
this._x = this._x + (_local7 * Math.sin((Math.PI/180) * (this.hoek + 90)));
if (this.tuiglandt != true) {
if (this.speed < this.minSnelheid) {
this.memTeLangzaam = this.memTeLangzaam + ((this.minSnelheid - this.speed) / 3);
} else if (this.memTeLangzaam > 0) {
this.memTeLangzaam = this.memTeLangzaam - (this.speed / this.maxSnelheid);
}
if (this.memTeLangzaam > 0.5) {
this._y = this._y + this.memTeLangzaam;
}
}
if (this.speed > this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
this.curr_snelheid = _local28;
if (this.afstand < 800) {
var _local22 = 4 - (intRandomGetal * 8);
var _local16 = Math.atan2(_local3 - this._y, _local2 - this._x);
if (this.richting == "rechts") {
var _local12 = (((_local16 * 180) / Math.PI) + this.yVerschilSnelheid) + _local22;
} else {
var _local12 = (((_local16 * 180) / Math.PI) - this.yVerschilSnelheid) + _local22;
}
var _local25 = false;
if ((Math.abs(_local12) > 170) && (Math.abs(this._rotation) > 170)) {
_local25 = true;
} else if (Math.abs(this._rotation - _local12) < 20) {
_local25 = true;
}
if (autoPilot == true) {
_local25 = false;
}
if (_local25 == true) {
this.telSchiet++;
if (this.telSchiet == 4) {
this.telSchiet = 0;
var _local18 = bullets.getNextHighestDepth();
var _local6 = bullets.attachMovie("mcBullet", "dogbull" + _local18, _local18);
_local6.type = "e_bullet";
_local6.speed = (this.speed * 2) + 16;
_local6._x = this._x;
_local6._y = this._y;
_local6.hoek = _local12;
_local6.leven = 0;
this.mcGun.gotoAndPlay(2);
startBullet(_local6);
}
}
}
break;
case "stortneer" :
stortneer(this);
}
if (((this.dif != "stortneer") && (this.bovenBaan == true)) && (this._y >= baanhoogte)) {
this.landing = true;
} else if (((this.dif != "stortneer") && (this.bovenBaan == true)) && (this.landingCheck == true)) {
this.landing = true;
}
if (this.landing == true) {
if (this.critical == true) {
unsetLanding(this, true);
} else {
aiLandScript(this);
}
}
if (mc._y > (zeeHoogte + 30)) {
managePlaneCrashes(mc);
}
this.realX = this._x + mapTravel;
this.xsnelheid = this._x - this.memx;
this.memx = this._x;
this.ysnelheid = this._y - this.memy;
this.memy = this._y;
this.yVerschilSnelheid = (this._y - _local3) - this.memyVerschilSnelheid;
this.memyVerschilSnelheid = this._y - _local3;
};
verwerkFort = function (mc) {
this=mc;//parameter overwritten
if (mc.tel == 80) {
mc.tel = 0;
}
mc.tel++;
if ((mc.realX < baanlinks) || (mc.realX > baanrechts)) {
mc.bovenBaan = false;
if (mc.tuiglandt == true) {
unsetLanding(mc, true);
}
} else {
mc.bovenBaan = true;
}
if (this.hoek < 0) {
this.memAngle = this.memAngle + 360;
this.hoek = this.hoek + 360;
} else if (this.hoek > 360) {
this.hoek = this.hoek - 360;
this.memAngle = this.memAngle - 360;
}
var _local5 = this.opponent;
var _local15 = _local5._x;
var _local6 = _local5._y;
berekenAbsSnelheid(this);
if (Math.abs(this._rotation) > 90) {
this.richting = "links";
this.lr = -1;
} else {
this.richting = "rechts";
this.lr = 1;
}
this.daalVersnelling = 1 + Math.abs(this.ysnelheid / 1000);
inDeBuurt(this);
if ((this.indebuurt == true) || (this.dif == "stortneer")) {
if (this.trilling == true) {
tril(this);
}
if (this.geraakt == true) {
this.telNaGeraakt++;
}
if (this.telNaGeraakt > 50) {
this.telNaGeraakt = 0;
this.geraakt = false;
}
} else {
hitTestBounds(this);
}
schade(this);
this.minHeight = this.groundLevel - this.laagteLat;
if (this.minHeight > 150) {
this.minHeight = 150;
}
if ((this.realX >= eilandlinks) && (this.realX <= eilandrechts)) {
this.bovenzee = false;
} else {
this.bovenzee = true;
}
if ((langRandomGetal > 0.5) && (carrierDamage < maxCarrierDamage)) {
this.doel = "schip";
} else {
this.doel = "eiland";
}
var doel = this.doel;
var _local10 = berekenAfstand(_local5, this);
var _local9 = this.afstand - _local10;
if (Math.abs(_local9) > 20) {
if (_local9 > 0) {
var _local18 = 20;
} else {
var _local18 = -20;
}
} else {
var _local18 = _local9;
}
this.impactSnelheid = _local18;
this.afstand = _local10;
this.yafstand = Math.abs(this._y - _local6);
this.xafstand = Math.abs(this._y - _local6);
if (this.tuiglandt != true) {
if (keerMogelijk(this)) {
var _local7 = langRandomGetal * 1000;
if (this.doel == "eiland") {
if (this.richting == "links") {
if (this._x < ((_local5._x - 2000) - _local7)) {
this.dif = "keer";
}
} else if (this._x > ((_local5._x + 2000) + _local7)) {
this.dif = "keer";
}
} else if (this.richting == "links") {
if (this.realX < (schiplinks - _local7)) {
this.dif = "keer";
}
} else if (this.realX > (schiprechts + _local7)) {
this.dif = "keer";
}
}
}
if ((this.realX > schiplinks) && (this.realX < schiprechts)) {
if (carrierDamage < maxCarrierDamage) {
if (this.bomPauze <= 0) {
if (random(15) == 0) {
var _local11 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("mcBom", "bom" + _local11, _local11);
_local3.type = "bom";
_local3._x = this._x;
_local3._y = this._y;
_local3.gooix = this.xsnelheid;
_local3.gooiy = this.ysnelheid;
_local3.richting = this.richting;
_local3.leven = 0;
_local3.groot = true;
startBom(_local3);
this.bomPauze = 5;
}
}
}
this.bomPauze--;
}
switch (this.dif) {
case "keer" :
keer(this);
break;
case "vliegt" :
if (this._rotation < 0) {
this.stijg = true;
} else {
this.stijg = false;
}
var _local14 = this.snelheidAfwijking - (intRandomGetal * (this.snelheidAfwijking * 2));
if (this.speed < (this.gemSpeed + _local14)) {
if (this.critical != true) {
if (this.dif != "stortneer") {
if (Math.abs(this.afstand) > 600) {
this.speed = this.speed + ((this.maxSnelheid - this.speed) / 20);
} else {
this.speed = this.speed + (((this.gemSpeed + _local14) - this.speed) / 20);
}
}
}
}
if (this.superManeuvre != "geen") {
unsetRA(this);
this.maneuvre = "geen";
}
switch (this.superManeuvre) {
case "landen" :
if (this.critical == true) {
unsetLanding(this, true);
} else {
landStappenScript(this);
}
break;
case "telaag" :
}
if (this.superManeuvre == "geen") {
if (Math.abs(this._y - this.hoogte) > 10) {
this.maneuvre = "nieuwehoogte";
}
}
if (!(this.maneuvre === "nieuwehoogte")) {
} else {
var _local16 = getTimer();
gaNaarHoogte(this, this.hoogte, "nieuwehoogte" + _local16);
}
var _local4 = this.speed;
var _local17 = _local4;
if (_local4 >= this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
if (this._rotation < 0) {
this.stijg = true;
} else {
this.stijg = false;
}
if (Math.abs(this._rotation) <= 90) {
this._y = this._y + (((this._rotation / 90) * _local4) / 2);
} else {
var _local12 = Math.abs(this._rotation) - 180;
if (this.stijg == true) {
this._y = this._y + ((_local12 / 90) * (_local4 / 2));
}
if (this.stijg == false) {
this._y = this._y - ((_local12 / 90) * (_local4 / 2));
}
}
var _local13 = this.memAngle - this.hoek;
var _local8 = ((this.maxSnelheid + 1) - this.speed) / 6;
if (Math.abs(_local13) > _local8) {
if (_local13 > 0) {
this.hoek = this.memAngle - _local8;
} else {
this.hoek = this.memAngle + _local8;
}
}
this.memAngle = this.hoek;
this._rotation = this.hoek;
if (this.ysnelheid > 0) {
this.laagteLat = Math.pow(this.ysnelheid, 3);
} else {
this.laagteLat = 0;
}
this._x = this._x + (_local4 * Math.sin((Math.PI/180) * (this.hoek + 90)));
if (this.tuiglandt != true) {
if (this.speed < this.minSnelheid) {
this.memTeLangzaam = this.memTeLangzaam + ((this.minSnelheid - this.speed) / 3);
} else if (this.memTeLangzaam > 0) {
this.memTeLangzaam = this.memTeLangzaam - (this.speed / this.maxSnelheid);
}
if (this.memTeLangzaam > 0.5) {
this._y = this._y + this.memTeLangzaam;
}
}
if (this.speed > this.maxSnelheid) {
this.speed = this.maxSnelheid;
}
this.curr_snelheid = _local17;
if (this.afstand < 600) {
fortSchiet(_local15, _local6);
}
break;
case "stortneer" :
stortneer(this);
}
if (((this.dif != "stortneer") && (this.bovenBaan == true)) && (this.yMax >= baanhoogte)) {
this.landing = true;
}
if (this.landing == true) {
if (this.critical == true) {
unsetLanding(this, true);
} else {
aiLandScript(this);
}
}
if (mc._y > (zeeHoogte + 30)) {
managePlaneCrashes(mc);
}
this.realX = this._x + mapTravel;
this.xsnelheid = this._x - this.memx;
this.memx = this._x;
this.ysnelheid = this._y - this.memy;
this.memy = this._y;
this.yVerschilSnelheid = (this._y - _local6) - this.memyVerschilSnelheid;
this.memyVerschilSnelheid = this._y - _local6;
};
schade = function (mc) {
var _local2 = mc.schade;
var _local4 = mc.wrak;
var _local6 = mc.beschadigd;
var _local7 = hud.mcHud.mcDamageTekst;
if (_local2 >= _local4) {
mc.schade = _local4;
}
hud.mcHud.mcDamage.bar._xscale = (100 / tuig.wrak) * (tuig.wrak - tuig.schade);
if (rook == true) {
if (_local2 > (_local6 - 4)) {
if (_local2 != undefined) {
mc.schadetel++;
}
if (mc.schadetel >= (((10 - _local2) * Math.random()) * 20)) {
var _local5 = planes.getNextHighestDepth();
var _local3 = planes.attachMovie("mcRook", "rook" + _local5, _local5);
_local3._x = mc._x;
_local3._y = mc._y;
_local3.richting = mc.richting;
_local3.speed = Math.round(mc.speed);
mc.schadetel = 0;
}
}
}
if (_local2 >= _local6) {
if (mc == tuig) {
if (_local7.knipper != true) {
knipperAlert(_local7);
}
}
mc.maxSnelheid = mc.minSnelheid;
}
if (_local2 >= _local4) {
mc.critical = true;
if (mc.speed > 0) {
mc.speed = mc.speed * 0.99;
}
}
};
fuel = function () {
var _local1 = tuig;
if (_local1.schade > (_local1.beschadigd - 4)) {
if (langRandomGetal > 0.6) {
_local1.fuellek = true;
}
}
_local1.fuel = _local1.fuel - (_local1.speed / 20);
if (_local1.fuellek == true) {
_local1.fuel = _local1.fuel - 5;
}
var _local3 = _local1.fuel;
var _local5 = _local1.maxFuel;
var _local4 = hud.mcHud.mcFuelTekst;
var _local2 = (_local3 / _local5) * 100;
if (_local2 < 0) {
_local2 = 0;
}
hud.mcHud.mcFuel.bar._xscale = _local2;
if (_local3 < (_local5 / 10)) {
if (_local4.knipper != true) {
knipperAlert(_local4);
}
}
if (_local3 <= 0) {
_local1.critical = true;
if (_local1.speed > 0) {
_local1.speed = _local1.speed * 0.98;
}
}
};
scheepsRegister = function () {
aantschepen = aSchepen.length;
var _local3 = oX.length;
var _local2 = 0;
while (_local2 < aantschepen) {
aSchepen[_local2].mcs = new Array();
var _local1 = 0;
while (_local1 < _local3) {
if ((oX[_local1] > aSchepen[_local2].links) && (oX[_local1] < aSchepen[_local2].rechts)) {
if (oX[_local1] != undefined) {
aSchepen[_local2].mcs.push(_local1);
}
}
_local1++;
}
_local2++;
}
};
setDogHoogte = function (mc) {
if (mc == fort) {
mc.hoogte = 150 - (intRandomGetal * 400);
} else {
mc.hoogte = mc.minHeight - ((intRandomGetal * 400) - 50);
}
};
berekenZeeniveau = function () {
zeeniveau = scr._y + (mapHoogte * zoemFactor);
};
regelLucht = function () {
main.mcLuchtContainer.mcLucht._y = zeeniveau;
};
mainLoop = function () {
if (_global.pauzeGame != true) {
if (planes.mcVlieg) {
verwerkTuig(tuig);
}
regelContainerPosities();
if (planes.dog) {
verwerkDog(dog);
verwerkRadar(dog);
}
if (planes.fort) {
verwerkFort(fort);
verwerkRadar(fort);
}
verwerkVijanden();
verwerkObjecten();
if (_global.enemyLoop != undefined) {
if (enemyShipSunk != true) {
regelShipLoops();
}
}
berekenZeeniveau();
regelZee();
verwerkZeeTegels();
if (drawBG == true) {
regelAchtergrond();
}
regelLucht();
dr();
hittestPlanes();
ticks++;
syncContainers();
schaalContainers(zoemPerc);
}
};
autoPilotLoop = function () {
regelContainerPosities();
verwerkDog(dog);
verwerkVijanden();
verwerkObjecten();
berekenZeeniveau();
regelZee();
verwerkZeeTegels();
if (drawBG == true) {
regelAchtergrond();
}
regelLucht();
dr();
ticks++;
syncContainers();
schaalContainers(zoemPerc);
};
intLoop500 = function () {
var _local1 = sW + 500;
if (swapZeeDepths != true) {
if (nrOfShips > 1) {
if ((zeeBoven != true) && (((tuig.realX > (schiplinks - _local1)) && (tuig.realX < (schiprechts + _local1))) || ((tuig.realX > (baanlinks - _local1)) && (tuig.realX < (baanrechts + _local1))))) {
omgeving.swapDepths(scr);
zeeBoven = true;
}
if (((zeeBoven == true) && ((tuig.realX < (schiplinks - _local1)) || (tuig.realX > (schiprechts + _local1)))) && ((tuig.realX < (baanlinks - _local1)) || (tuig.realX > (baanrechts + _local1)))) {
omgeving.swapDepths(scr);
zeeBoven = false;
}
} else {
if ((zeeBoven != true) && ((tuig.realX > (schiplinks - _local1)) && (tuig.realX < (schiprechts + _local1)))) {
omgeving.swapDepths(scr);
zeeBoven = true;
}
if ((zeeBoven == true) && ((tuig.realX < (schiplinks - _local1)) || (tuig.realX > (schiprechts + _local1)))) {
omgeving.swapDepths(scr);
zeeBoven = false;
}
}
}
};
regelZee = function () {
if (((xPos + mapTravel) > eilandlinks) && (((xPos + mapTravel) + sW) < eilandrechts)) {
if (displayGolven != false) {
verwijderGolven();
displayGolven = false;
}
} else if (displayGolven != true) {
attachGolven();
displayGolven = true;
}
};
intLoop200 = function () {
wolken();
golven();
if (planes.dog) {
setGroundLevel(dog);
}
if (planes.fort) {
setGroundLevel(fort);
}
};
maakMiniMap = function () {
hud.attachMovie("mcHud", "mcHud", 0);
var _local3 = hud.mcHud;
_local3._y = standaardH;
var _local1 = _local3.mcMap;
var _local5 = _local1._width;
var _local7 = maprechts - maplinks;
var _local2 = _local5 / _local7;
var _local8 = (eilandrechts - eilandlinks) * _local2;
var _local6 = (eilandlinks - maplinks) * _local2;
_local1.eiland._x = _local6;
_local1.eiland._width = _local8;
if (noLand == "true") {
_local1.eiland._visible = false;
} else {
_local1.eiland._visible = true;
}
var _local4 = ((((schiprechts - schiplinks) / 2) + schiplinks) - maplinks) * _local2;
_local1.schip._x = _local4;
if (nrOfShips == 2) {
_local4 = ((((baanrechts - baanlinks) / 2) + baanlinks) - maplinks) * _local2;
_local1.schip2._x = _local4;
} else {
_local1.schip2._visible = false;
}
var _local9 = setInterval(regelMiniMap, 500, _local2);
};
regelMiniMap = function (factor) {
var _local1 = hud.mcHud.mcMap;
var _local2 = tuig._x + mapTravel;
if (tuig.richting == "links") {
_local1.tuig.gotoAndStop("links");
} else {
_local1.tuig.gotoAndStop("rechts");
}
if (_local2 < maplinks) {
_local1.rechts._visible = false;
_local1.links._visible = true;
_local1.tuig._visible = false;
} else if (_local2 > maprechts) {
_local1.links._visible = false;
_local1.rechts._visible = true;
_local1.tuig._visible = false;
} else {
_local1.links._visible = false;
_local1.rechts._visible = false;
_local1.tuig._x = (_local2 - maplinks) * factor;
_local1.tuig._visible = true;
}
};
attachHud = function () {
var _local4 = hud.attachMovie("mcTopHud", "mcTopHud", 1);
_local4.mcExit.onRelease = function () {
_root.reset();
};
if (muteSounds != true) {
_local4.mute.red._visible = false;
}
_local4.mute.onRelease = function () {
if (_global.userData[_global.currentPlayer].mute != true) {
stopAllSounds();
this.red._visible = true;
_global.userData[_global.currentPlayer].mute = true;
muteSounds = true;
} else {
this.red._visible = false;
_global.userData[_global.currentPlayer].mute = false;
muteSounds = false;
memSnd = null;
engineSound();
}
};
};
attachRadar = function (mc) {
if (mc == fort) {
var _local1 = hud.attachMovie("mcRadar", "mcRadar2", 3);
_local1.pijltje.gotoAndStop(2);
} else {
var _local1 = hud.attachMovie("mcRadar", "mcRadar", 2);
}
_local1._x = standaardW / 2;
_local1._y = (standaardH + sOffy) / 2;
};
removeRadar = function (mc) {
if (mc == dog) {
hud.mcRadar.removeMovieClip();
} else if (mc == fort) {
hud.mcRadar2.removeMovieClip();
}
};
maakAchtergrond = function () {
aBergenXpos = [];
aBergenFrames = [];
aBergenTegel = [];
var _local8 = (eilandrechts - eilandlinks) / 2;
var _local6 = Math.floor(_local8 / bergtegel_w);
var _local10 = _local8 % bergtegel_w;
var _local9 = Math.floor(_local10 / kleinebergtegel_w);
var _local7 = _local6 + _local9;
var _local4 = _local7;
var _local2 = eilandlinks / 2;
aBergenTegel[0] = "start";
aBergenXpos[0] = _local2;
aBergenFrames[0] = 1;
_local2 = _local2 + 56;
var _local3 = 1;
while (_local3 < (_local7 + 2)) {
if (random(_local4) < _local6) {
var _local5 = (random(3) * 2) + 1;
var _local1 = 0;
while (_local1 < 2) {
aBergenTegel.push("groot");
aBergenXpos.push(_local2);
aBergenFrames.push(_local5 + _local1);
_local2 = _local2 + (bergtegel_w / 2);
_local1++;
}
_local4--;
_local6--;
} else {
var _local5 = random(3) + 1;
aBergenTegel.push("klein");
aBergenXpos.push(_local2);
aBergenFrames.push(_local5);
_local2 = _local2 + kleinebergtegel_w;
_local4--;
}
_local3++;
}
aBergenTegel.push("start");
aBergenXpos.push(_local2);
aBergenFrames.push(2);
};
attachHealthBars = function () {
var _local1 = 0;
while (_local1 < aHealthBars.length) {
var _local3 = aHealthBars[_local1][2];
var _local5 = aHealthBars[_local1][0];
var _local4 = aHealthBars[_local1][1];
var _local2 = aktie.attachMovie("mcSchipHealth", _local3, aktie.getNextHighestDepth());
_local2._x = _local5;
_local2._y = _local4;
_local1++;
}
};
startRootEnterFrame = function () {
this.onEnterFrame = mainLoop;
trace(this + " enterFrame");
intLoop500 = setInterval(intLoop500, 500);
intLoop200 = setInterval(intLoop200, 200);
intMissionComplete = setInterval(checkMissionComplete, 3000);
};
beginVars = function () {
var _local1 = schiplinks + 1000;
tuig._x = _local1;
tuig.realX = _local1;
tuig.geland = true;
tuig._y = schipHoogte;
tuig.speed = 0;
xPos = _local1;
tuig.memx = _local1;
tuig.memscroll = _local1;
hud.mcTopHud.mcTuigIconen.gotoAndStop(vliegtuigen);
};
reset = function (optieMain) {
stopSound();
var _local3 = 100000 /* 0x0186A0 */;
while (_local3--) {
clearInterval(_local3);
}
verwijderMenu();
for (var _local4 in _global.root) {
if (_global.root[_local4] != _level0) {
delete _global.root[_local4];
var _local2 = _global.root[_local4];
_local2.removeMovieClip();
}
}
main.removeMovieClip();
_global.root.gotoAndPlay("as");
if (optieMain != true) {
_global.root.inGame = true;
}
};
maakLucht = function () {
var _local1 = main.mcLuchtContainer.createEmptyMovieClip("bgKleur", 0);
var _local2 = main.mcLuchtContainer.attachMovie("mcLucht", "mcLucht", 1);
var _local4 = standaardW;
var _local3 = sH;
_local1.beginFill(2127541, 100);
_local1.moveTo(0, 0);
_local1.lineTo(_local4, 0);
_local1.lineTo(_local4, _local3);
_local1.lineTo(0, _local3);
_local1.lineTo(0, 0);
_local2._x = 0;
_local2._y = sH;
_local2._width = standaardW;
};
_global.startini = function (xmlfile) {
showAreas = false;
showBoundingBoxes = false;
sOffx = 0;
sOffy = -40;
standaardW = 520;
standaardH = 460;
sW = standaardW;
sH = standaardH + sOffy;
mapHoogte = 400;
pilootCrash = false;
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.onLoad = function (success) {
if (success) {
loadMap(this);
} else {
trace("Error loading XML file");
}
};
_local2.load(xmlfile);
};
verwerkVijanden = function () {
var _local13 = xPosTravel + (sW / 2);
var _local10 = xdraw;
var _local11 = ydraw;
var _local12 = tuig._y;
var _local1 = 0;
while (_local1 < aVijanden.length) {
var _local3 = aVijanden[_local1];
var _local4 = aktie["v_" + _local1];
var _local5 = _local3.status;
var _local8 = _local3.xpos;
var _local7 = _local3.ypos;
var _local6 = _local3.type;
if ((Math.abs(_local13 - _local8) < _local10) && (Math.abs(_local12 - _local7) < _local11)) {
if (!_local4) {
if ((_local5 == "actief") || (_local5 == "kia")) {
var _local9 = aktie.getNextHighestDepth();
var _local2 = aktie.attachMovie(_local6, "v_" + _local1, _local9);
_local2._x = _local8;
_local2._y = _local7;
_local2.type = _local6;
_local2.status = _local5;
if (_local6 == "soldaat") {
_local2.richting = _local3.richting;
} else {
_local2.schade = _local3.schade;
}
start_aktie(_local2, _local1);
}
}
} else if (_local4) {
bewaarKenmerken(_local4, _local1);
removeMovieClip(_local4);
} else if ((_local6 == "soldaat") && (_local5 == "actief")) {
berekenLokaties(_local1);
}
_local1++;
}
};
attachSoldaat = function (aantal, x, y) {
var _local7 = aantal;
var _local1 = 0;
while (_local1 < aVijanden.length) {
if (_local7 <= 0) {
break;
}
var _local3 = aVijanden[_local1];
var _local4 = _local3.type;
if (_local4 == "soldaat") {
var _local6 = aktie["v_" + _local1];
if (!_local6) {
if (_local3.status == "binnen") {
var _local5 = aktie.getNextHighestDepth();
var _local2 = aktie.attachMovie(_local4, "v_" + _local1, _local5);
_local2._x = x + (_local1 * 20);
_local2._y = (_local3.ypos = zeeHoogte - 8);
_local2.type = _local4;
_local3.status = "actief";
if (Math.random() < 0.5) {
_local2.richting = "links";
} else {
_local2.richting = "rechts";
}
start_aktie(_local2, _local1);
_local7--;
}
}
}
_local1++;
}
};
berekenLokaties = function (arrayNr) {
var _local9 = aVijanden[arrayNr].status;
var _local1 = aVijanden[arrayNr];
var _local6 = _local1.loopsnelheid;
var _local5 = _local1.xpos;
var _local8 = _local1.richting;
var _local4 = 0;
while (_local4 < aKeerpunten.length) {
var _local2 = aKeerpunten[_local4];
if (_local8 == "rechts") {
if ((_local5 > _local2) && (_local5 <= (_local2 + 10))) {
_local1.richting = "links";
_local1.xpos = _local2;
}
} else if (_local8 == "links") {
if ((_local5 < (_local2 + 10)) && (_local5 > _local2)) {
_local1.richting = "rechts";
_local1.xpos = _local2 + 10;
}
}
if (_local6 != undefined) {
if (_local1.richting == "links") {
_local1.xpos = _local1.xpos - _local6;
} else {
_local1.xpos = _local1.xpos + _local6;
}
}
_local4++;
}
if (_local9 == "actief") {
_local4 = 0;
while (_local4 < aGebouwen.length) {
var _local3 = aGebouwen[_local4];
if (_local3.status == "actief") {
if (_local3.occupado < _local3.maxOccupado) {
var _local7 = Math.abs(_local3.xpos - _local1.xpos);
if (_local7 < 10) {
if (getTimer() >= _local3.tel) {
_local1.status = "binnen";
_local3.occupado = _local3.occupado + 1;
}
}
}
}
_local4++;
}
}
};
bewaarKenmerken = function (mc, arrayNr) {
switch (mc.type) {
case "aa_gun" :
aVijanden[arrayNr].schade = mc.schade;
break;
case "soldaat" :
aVijanden[arrayNr].xpos = mc._x;
aVijanden[arrayNr].loopsnelheid = mc.loopsnelheid;
aVijanden[arrayNr].richting = mc.richting;
}
};
berekenKogelAfwijking = function (mc, hoogteverschil) {
var _local3 = tuig._x - mc._x;
var _local2 = hoogteverschil / 160;
var _local1 = (Math.abs(tuig.xsnelheid) * 1.5) * _local2;
if (tuig.richting == "rechts") {
_local1 = _local1 * 1;
} else {
_local1 = _local1 * -1;
}
return(_local1);
};
soldaatGeraakt = function (mc, bullet) {
var _local3 = 10 + random(10);
delete mc.onEnterFrame;
if (Math.abs(bullhoek) > 90) {
mc.gotoAndPlay("hitlinks");
stuiterMc(mc, -_local3, -10);
} else {
mc.gotoAndPlay("hitrechts");
stuiterMc(mc, _local3, -10);
}
autoInitSFX(this, "soldhit");
};
start_aktie = function (mc, arrayNr) {
switch (mc.type) {
case "aa_gun" :
var _local18 = aVijanden[arrayNr].status;
if (_local18 == "kia") {
mc.gotoAndStop("kia");
} else {
this=mc;//parameter overwritten
this.mcLoop._rotation = -11;
this.telkogels = 0;
this.onEnterFrame = function () {
if (this.schade > 16) {
aVijanden[arrayNr].status = "kia";
this.gotoAndStop(2);
attachExplosie(this);
autoInitSFX(this, "exp_klein");
delete this.onEnterFrame;
} else {
hitTestBounds(this);
var _local9 = this.xMin;
var _local7 = this.xMax;
var _local10 = this.yMin;
var _local8 = this.yMax;
for (var _local11 in bullets) {
var _local3 = bullets[_local11];
if ((_local3._x >= _local9) && (_local3._x <= _local7)) {
if ((_local3._y >= _local10) && (_local3._y <= _local8)) {
if (_local3.type == "bullet") {
this.schade = this.schade + 1;
_local3.removeMovieClip();
var _local5 = this.getNextHighestDepth();
var _local4 = this.attachMovie("gebouw_brokken", "aa_brok" + i, _local5 + i);
_local4.moederMc = this;
_local4._x = 0;
_local4._y = 0;
_local4.bottom = this._y;
ammoHit("bullet", _local3);
speelSimpelSFX("objecthit");
} else if (_local3.type == "bom") {
this.schade = this.schade + 5;
attachExplosieNieuw(this);
speelSimpelSFX("exp_klein");
_local3.removeMovieClip();
ammoHit("bom", _local3);
} else if (_local3.type == "raket") {
this.schade = this.schade + 5;
attachExplosieNieuw(this);
speelSimpelSFX("exp_klein");
_local3.removeMovieClip();
ammoHit("raket", _local3);
}
}
}
}
if (_global.pauzeGame != true) {
var _local13 = this.mcLoop.looppunt;
hitTestBounds(_local13, aktie);
var _local18 = _local13.xMin;
var _local17 = _local13.yMax;
var _local21 = tuig._x - _local18;
var _local19 = Math.atan2(tuig._y - _local17, _local21);
var _local23 = Math.round((_local19 * 180) / Math.PI);
var _local16 = mc._y - tuig._y;
var _local20 = _local16 / 100;
var _local22 = berekenKogelAfwijking(this, _local16);
var _local12 = _local23 + _local22;
if ((_local12 < -10) && (_local12 > -170)) {
this.mcLoop._rotation = _local12 + 90;
var _local15 = 300;
if (this.telkogels < 5) {
if (Math.floor(Math.random() * (10 + _local20)) == 0) {
if ((tuig_x >= (this._x - _local15)) && (tuig_x <= (this._x + _local15))) {
var _local14 = bullets.getNextHighestDepth();
var _local6 = bullets.attachMovie("mcKanonskogel", "kanonskogel" + _local14, _local14);
_local6.type = "kanonskogel";
_local6._x = _local18;
_local6._y = _local17;
_local6.snelheid = 12;
_local6.afschieterMc = this;
_local6.hoek = _local12;
_local6.leven = 0;
autoInitSFX(this, "kanon");
this.schietklaar = false;
this.telkogels++;
}
}
}
}
}
}
};
}
break;
case "soldaat" :
_local18 = aVijanden[arrayNr].status;
if (_local18 == "kia") {
mc.gotoAndStop("kia");
} else {
if (aVijanden[arrayNr].loopsnelheid != undefined) {
mc.loopsnelheid = aVijanden[arrayNr].loopsnelheid;
} else {
mc.loopsnelheid = 2.5;
}
if (mc.richting == "links") {
mc.gotoAndPlay("links");
} else {
mc.gotoAndPlay("rechts");
}
mc.imuun = 15;
mc.onEnterFrame = function () {
if (_global.pauzeGame != true) {
hitTestBounds(this);
var _local11 = this.xMin;
var _local9 = this.xMax;
var _local12 = this.yMin;
var _local10 = this.yMax;
if (this.imuun < 0) {
for (var _local8 in bullets) {
var _local3 = bullets[_local8];
if (_local3.hitTest(this)) {
if (_local3.type == "bullet") {
aVijanden[arrayNr].status = "kia";
soldaatGeraakt(this, _local3);
ammoHit("bullet", _local3);
_local3.removeMovieClip();
}
if (_local3.type == "bom") {
aVijanden[arrayNr].status = "kia";
soldaatGeraakt(this, _local3);
_local3.gotoAndStop("knal");
ammoHit("bom", _local3);
delete _local3.onEnterFrame;
autoInitSFX(_local3, "inslag");
}
if (_local3.type == "raket") {
aVijanden[arrayNr].status = "kia";
soldaatGeraakt(this, _local3);
_local3.gotoAndStop("knal");
ammoHit("raket", _local3);
delete _local3.onEnterFrame;
autoInitSFX(_local3, "inslag");
}
}
}
} else {
this.imuun--;
}
var _local6 = 0;
while (_local6 < aKeerpunten.length) {
var _local5 = aKeerpunten[_local6];
if (this.richting == "rechts") {
if ((this._x > _local5) && (this._x <= (_local5 + 10))) {
this.richting = "links";
this.gotoAndPlay("links");
this._x = _local5;
}
} else if (this.richting == "links") {
if ((this._x < (_local5 + 10)) && (this._x > _local5)) {
this.richting = "rechts";
this.gotoAndPlay("rechts");
this._x = _local5 + 10;
}
}
_local6++;
}
if (this.richting == "rechts") {
this._x = this._x + this.loopsnelheid;
} else {
this._x = this._x - this.loopsnelheid;
}
aVijanden[arrayNr].xpos = this._x;
if (aVijanden[arrayNr].status == "actief") {
_local6 = 0;
while (_local6 < aGebouwen.length) {
var _local4 = aGebouwen[_local6];
if (_local4.status == "actief") {
if (_local4.occupado < _local4.maxOccupado) {
if ((_local4.xpos >= this.xMin) && (_local4.xpos <= this.xMax)) {
var _local7 = objecten["geb_" + _local6];
if (getTimer() >= _local7.tel) {
aVijanden[arrayNr].status = "binnen";
if (!_local7) {
_local4.occupado = _local4.occupado + 1;
} else {
_local7.occ = _local7.occ + 1;
_local4.occupado = _local4.occupado + 1;
}
this.removeMovieClip();
}
}
}
}
_local6++;
}
}
}
};
}
}
};
hittest = function (mc) {
hitTestBounds(mc);
var _local7 = mc.xMin;
var _local6 = mc.xMax;
var _local8 = mc.yMin;
var _local12 = mc.yMax;
var _local2 = mc.realX;
var _local13 = mc._y;
mc.aBewaarhelling = [];
mc.aBewaarhelling.push(zeeHoogte);
if (mc.glij == "glij") {
mc.dif = "stortneer";
for (var _local14 in scr) {
var _local4 = scr[_local14];
var _local5 = _local4._x;
var _local3 = _local4._y;
var _local10 = _local5 + _local4._width;
switch (mc.richting) {
case "rechts" :
if ((_local6 >= _local5) && (_local6 <= _local10)) {
mc.aBewaarhelling.push(_local3);
}
break;
case "links" :
if (!((_local7 >= _local5) && (_local7 <= _local10))) {
break;
}
mc.aBewaarhelling.push(_local3);
}
}
} else if ((_local12 > zeeHoogte) && (mc.bovenBaan != true)) {
mc.dif = "stortneer";
diepte = aktie.getNextHighestDepth();
if (mc.speed > 1) {
var _local9 = aktie.attachMovie("mcVonk", "vonk" + diepte, diepte);
_local9._x = _local2;
_local9._y = _local13;
}
} else {
for (var _local14 in scr) {
var _local4 = scr[_local14];
var _local5 = _local4._x;
var _local3 = _local4._y;
var _local10 = _local5 + _local4._width;
var _local11 = _local3 + _local4._height;
switch (mc.richting) {
case "rechts" :
if ((_local6 >= _local5) && (_local6 <= _local10)) {
if (_local8 > _local11) {
} else if (_local12 > _local3) {
if (((_local2 > schiplinks) && (_local2 < schiprechts)) || ((_local2 > baanlinks) && (_local2 < baanrechts))) {
if (_local12 > (_local3 + 8)) {
mc.landing = true;
}
} else {
mc.dif = "stortneer";
diepte = main.getNextHighestDepth();
if (mc.speed > 1) {
var _local9 = main.attachMovie("mcVonk", "vonk" + diepte, diepte);
_local9._x = 270;
_local9._y = _local13;
}
}
if (_local8 > _local3) {
mc.dif = "stortneer";
mc.groteklap = true;
}
}
}
break;
case "links" :
if (!((_local7 >= _local5) && (_local7 <= _local10))) {
break;
}
if (_local8 > _local11) {
} else {
if (_local12 <= _local3) {
break;
}
if (((_local2 > schiplinks) && (_local2 < schiprechts)) || ((_local2 > baanlinks) && (_local2 < baanrechts))) {
mc.landing = true;
} else {
mc.dif = "stortneer";
diepte = main.getNextHighestDepth();
if (mc.speed > 1) {
var _local9 = main.attachMovie("mcVonk", "vonk" + diepte, diepte);
_local9._x = 270;
_local9._y = _local13;
}
}
if (_local8 <= _local3) {
break;
}
mc.dif = "stortneer";
mc.groteklap = true;
}
}
}
}
};
hitTestTuig = function () {
this=tuig;//parameter overwritten
hitTestBounds(this);
var _local8 = this.xMin;
var _local6 = this.xMax;
var _local9 = this.yMin;
var _local7 = this.yMax;
for (var _local10 in bullets) {
var _local2 = bullets[_local10];
if ((_local2._x >= _local8) && (_local2._x <= _local6)) {
if ((_local2._y >= _local9) && (_local2._y <= _local7)) {
if (_local2.type == "kanonskogel") {
var _local5 = intRandomGetal;
_local2.afschieterMc.telkogels--;
_local2.removeMovieClip();
if (rook == true) {
var _local4 = planes.getNextHighestDepth();
var _local3 = planes.attachMovie("mcRook", "rook" + _local4, _local4);
_local3._x = this._x;
_local3._y = this._y;
}
this._y = this._y - ((_local5 * 6) + 4);
this.trilling = true;
this.tril = (_local5 * 12) + 2;
if (this.speed > 1) {
this.speed = this.speed * 0.96;
}
this.hoek = this.hoek + (15 - (_local5 * 40));
this.schade = this.schade + 2;
startHit();
speelSimpelSFX("hittuig");
}
if (_local2.type == "e_bullet") {
var _local5 = intRandomGetal;
_local2.removeMovieClip();
var _local4 = planes.getNextHighestDepth();
if (rook == true) {
var _local3 = planes.attachMovie("mcRook", "rook" + _local4, _local4);
_local3._x = this._x;
_local3._y = this._y;
_local3.richting = this.richting;
_local3.speed = Math.round(this.speed);
}
this.trilling = true;
this.tril = (_local5 * 4) + 2;
if (this.speed > 1) {
this.speed = this.speed * 0.99;
}
this.hoek = this.hoek + (5 - (_local5 * 20));
this.schade = this.schade + 0.2;
speelSimpelSFX("hittuig");
}
}
}
}
};
objHittest = function (mc) {
hitTestBounds(mc);
var _local9 = mc.xMin;
var _local8 = mc.xMax;
var _local10 = mc.yMin;
var _local4 = mc.yMax;
var _local7 = mc._x;
if (_local4 >= zeeHoogte) {
if (mc.type != "torpedo") {
var _local3 = true;
}
} else {
for (var _local5 in scr) {
var _local1 = scr[_local5];
if ((mc._x >= _local1._x) && (mc._x <= (_local1._x + _local1._width))) {
if (_local4 > _local1._y) {
checkSchipHit(int(_local1._name), mc.type, mc);
var _local3 = true;
}
}
}
}
if (_local3 == true) {
if ((_local7 < xPos) || (_local7 > (xPos + sW))) {
var _local6 = checkBovenEenSchip(mc);
if (_local6 != null) {
_local6.schade = _local6.schade + aAmmoDamage[mc.type];
}
}
mc.gotoAndStop("knal");
delete mc.onEnterFrame;
autoInitSFX(mc, "inslag");
}
};
hittestDog = function (mc) {
this=mc;//parameter overwritten
for (var _local5 in bullets) {
var _local2 = bullets[_local5];
if ((_local2._x >= this.xMin) && (_local2._x <= this.xMax)) {
if ((_local2._y >= this.yMin) && (_local2._y <= this.yMax)) {
if (_local2.type == "bullet") {
_local2.removeMovieClip();
var _local3 = planes.getNextHighestDepth();
var _local4 = planes.attachMovie("mcRook", "rook" + _local3, _local3);
_local4._x = this._x;
_local4._y = this._y;
this._y = this._y - ((Math.random() * 4) + 2);
this.trilling = true;
this.tril = (Math.random() * 12) + 4;
if (this.speed > 1) {
this.speed = this.speed - (1 - (1 / this.tril));
}
this.hoek = this.hoek + (20 - (Math.random() * 40));
this.schade = this.schade + 1;
this.geraakt = true;
this.telNaGeraakt = 0;
ammoHit("bullet", _local2);
autoInitSFX(this, "hitdog");
}
if (_local2.type == "raket") {
_local2.removeMovieClip();
var _local3 = aktie.getNextHighestDepth();
var _local4 = aktie.attachMovie("mcRook", "rook" + _local3, _local3);
_local4._x = this._x;
_local4._y = this._y;
this._y = this._y - ((Math.random() * 4) + 2);
this.trilling = true;
this.tril = (Math.random() * 8) + 2;
if (this.speed > 1) {
this.speed = this.speed - (1 - (1 / this.tril));
}
this.hoek = this.hoek + (20 - (Math.random() * 40));
this.schade = this.schade + 30;
ammoHit("raket", _local2);
attachExplosie(this);
}
}
}
}
};
midAirCollision = function (mc) {
var _local3 = tuig;
var _local2 = mc;
if (_local3.klaarVoorHit == false) {
_local3.telNaHit++;
}
if (_local3.telNaHit > 50) {
_local3.telNaHit = 0;
_local3.klaarVoorHit = true;
}
if (_local3.klaarVoorHit == true) {
if (_local3.hitTest(_local2)) {
_local3.klaarVoorHit = false;
if (Math.abs(_local2.impactSnelheid) >= 9) {
var _local6 = planes.getNextHighestDepth();
var _local7 = _local3.richting;
var _local5 = _local2.impactSnelheid / 4;
var _local9 = _local3._x;
var _local8 = _local3._y;
var _local10 = _local3.type + "_brok";
var _local4 = 1;
while (_local4 < 8) {
var _local1 = planes.attachMovie(_local10, "tuigbrok" + _local4, _local6 + _local4);
_local1.moederMc = _local3;
_local1._x = _local9;
_local1._y = _local8;
_local1.impact = _local5;
_local1.frame = _local4;
_local1.bottom = zeeniveau;
_local1.richting = _local7;
_local4++;
}
if (_local2.type == "fort") {
var _local11 = Math.round(Math.abs(_local2.impactSnelheid));
_local2.schade = _local2.schade + (Math.round(_local11 / 2) + random(_local11));
} else {
_local2.schade = _local2.wrak;
}
if (_local2.schade >= _local2.wrak) {
_local6 = planes.getNextHighestDepth();
_local7 = _local2.richting;
_local9 = _local2._x;
_local8 = _local2._y;
_local10 = _local2.type + "_brok";
_local4 = 1;
while (_local4 < 8) {
var _local1 = planes.attachMovie(_local10, "dogbrok" + _local4, _local6 + _local4);
_local1.moederMc = _local2;
_local1._x = _local9;
_local1._y = _local8;
_local1.impact = _local5;
_local1.frame = _local4;
_local1.bottom = zeeniveau;
_local1.richting = _local7;
_local4++;
}
managePlaneCrashes(_local2);
}
_local3.gotoAndStop("weg");
tuig.dif = null;
startHit();
speelSimpelSFX("midair");
gameAktie("neergestort", true);
} else {
var _local11 = Math.round(Math.abs(_local2.impactSnelheid));
var _local12 = ((_local2.maxSnelheid + _local3.maxSnelheid) - (_local2.speed + _local3.speed)) / (_local2.maxSnelheid + _local3.maxSnelheid);
speelSimpelSFX("midair2");
if (_local3._y > _local2._y) {
_local3._y = _local3._y + _local3.speed;
_local2._y = _local2._y - _local2.speed;
} else {
_local3._y = _local3._y - _local3.speed;
_local2._y = _local2._y + _local2.speed;
}
if (_local3._x < _local2._x) {
if (_local3.richting == "rechts") {
_local3.speed = _local3.speed * 0.8;
_local3._x = _local3._x - 10;
_local2.speed = _local2.speed * 1.2;
_local2._x = _local2._x + 10;
} else {
_local2.speed = _local2.speed * 0.8;
_local2._x = _local2._x - 10;
_local3.speed = _local3.speed * 1.2;
_local3._x = _local3._x + 10;
}
} else if (_local3.richting == "rechts") {
_local2.speed = _local2.speed * 0.8;
_local2._x = _local2._x - 10;
_local3.speed = _local3.speed * 1.2;
_local3._x = _local3._x + 10;
} else {
_local3.speed = _local3.speed * 0.8;
_local3._x = _local3._x - 10;
_local2.speed = _local2.speed * 1.2;
_local2._x = _local2._x + 10;
}
_local3.trilling = true;
_local3.tril = random(12) + 4;
_local3.schade = _local3.schade + (Math.round(_local11 / 2) + random(_local11));
_local2.trilling = true;
_local2.tril = random(12) + 4;
_local2.schade = _local2.schade + (Math.round(_local11 / 2) + random(_local11));
}
}
}
};
hittestPlanesObj = function (mc) {
var _local1 = tuig;
if ((_local1._x >= mc.xMin) && (_local1._x <= mc.xMax)) {
if ((_local1._y >= mc.yMin) && (_local1._y <= mc.yMax)) {
if (mc.type == "groen") {
setNieuweHoek(_local1, 50 - random(100));
_local1.speed = _local1.speed * 0.8;
} else {
_local1.dif = "stortneer";
_local1.groteklap = true;
}
}
}
};
hittestPlanes = function () {
if (planes.dog) {
if (((dog.indebuurt == true) || (dog.dif == "stortneer")) || (dog.landStap >= 3)) {
midAirCollision(dog);
hittest(dog);
hittestDog(dog);
}
}
if (planes.fort) {
if ((fort.indebuurt == true) || (fort.dif == "stortneer")) {
midAirCollision(fort);
hittest(fort);
hittestDog(fort);
}
}
hitTestTuig();
hittest(tuig);
};
hittestBulletsObj = function (mc) {
var _local2 = mc;
var _local8 = _local2.xMin;
var _local6 = _local2.xMax;
var _local9 = _local2.yMin;
var _local7 = _local2.yMax;
for (var _local10 in bullets) {
var _local1 = bullets[_local10];
if ((_local1._x >= _local8) && (_local1._x <= _local6)) {
if ((_local1._y >= _local9) && (_local1._y <= _local7)) {
if (_local1.type == "bullet") {
_local2.schade = _local2.schade + 1;
_local1.removeMovieClip();
ammoHit("bullet", _local1);
var _local4 = aktie.getNextHighestDepth();
var _local3 = aktie.attachMovie("gebouw_brokken", "gebouw_brok" + _local4, _local4);
_local3._x = _local2._x;
_local3._y = _local2._y;
_local3.bottom = zeeHoogte;
speelSimpelSFX("objecthit");
}
if (_local1.type == "bom") {
_local2.schade = _local2.schade + 5;
_local1.parentwis = true;
ammoHit("bom", _local1);
attachExplosieNieuw(mc);
speelSimpelSFX("exp_klein");
_local1.removeMovieClip();
}
if (_local1.type == "raket") {
_local2.schade = _local2.schade + 5;
_local1.parentwis = true;
ammoHit("raket", _local1);
attachExplosieNieuw(mc);
speelSimpelSFX("exp_klein");
_local1.removeMovieClip();
}
}
}
}
};
engineSoundOud = function () {
var _local4 = Math.floor(piloot.speed / 2);
if (_local4 > 11) {
_local4 = 11;
}
var _local3 = _root["sfx_engine" + _local4];
var _local2 = 0;
while (_local2 < 11) {
if (_local3 != memSnd) {
_root["sfx_engine" + _local2].stop();
_local3.start(0, 999);
_local3.setVolume(30);
memSnd = _local3;
}
_local2++;
}
};
engineSound = function () {
if (muteSounds != true) {
var _local2 = Math.floor(piloot.speed / 2);
if (_local2 > 11) {
_local2 = 11;
}
var _local1 = 0;
while (_local1 < 11) {
if (_local2 != memSnd) {
sfx_engine.stop();
sfx_engine.attachSound("engine" + _local2);
sfx_engine.start(0, 999);
sfx_engine.setVolume(24);
memSnd = _local2;
}
_local1++;
}
}
};
_global.startMenuLoop = function () {
var _local2 = _global.root.createEmptyMovieClip("menuloop", 1);
_global.menuloop = new Sound(_global.root.menuloop);
_global.menuloop.setVolume(100);
_global.menuloop.attachSound("menuloop");
_global.menuloop.start(0, 999);
trace("start mus " + _local2);
};
initSFX = function () {
soundEffects.createEmptyMovieClip("gun", 2);
sfx_gun = new Sound(soundEffects.gun);
sfx_gun.attachSound("gun");
soundEffects.createEmptyMovieClip("engine", 1);
sfx_engine = new Sound(soundEffects.engine);
sound.createEmptyMovieClip("effects", 3);
sound.createEmptyMovieClip("explosies", 4);
sound.createEmptyMovieClip("kanon", 5);
soundEffects.createEmptyMovieClip("soldiers", 3);
sound.createEmptyMovieClip("inslag", 7);
sound.createEmptyMovieClip("bullethit", 8);
sound.createEmptyMovieClip("explosies", 9);
unloadMovieNum (1);
_global.musicPlaying = 2;
engineInt = setInterval(engineSound, 150);
};
speelSimpelSFX = function (naam) {
if (muteSounds != true) {
sound.setVolume(100);
switch (naam) {
case "midair" :
var _local4 = new Sound(soundEffects);
_local4.setVolume(100);
_local4.attachSound("midair");
_local4.start();
break;
case "raket_tuig" :
var _local6 = new Sound(soundEffects);
_local6.setVolume(100);
_local6.attachSound("raket");
_local6.start();
break;
case "midair2" :
_local4 = new Sound(soundEffects);
_local4.setVolume(100);
_local4.attachSound("midair2");
_local4.start();
break;
case "hittuig" :
var _local3 = new Sound(soundEffects);
_local3.setVolume(100);
_local3.attachSound("hittuig");
_local3.start();
break;
case "exp_groot" :
var _local2 = new Sound(soundEffects);
_local2.setVolume(100);
_local2.attachSound("exp_groot");
_local2.start();
break;
case "exp_klein" :
var _local5 = new Sound(soundEffects);
_local5.setVolume(100);
_local5.attachSound("exp_klein");
_local5.start();
break;
case "objecthit" :
var _local1 = new Sound(soundEffects);
_local1.setVolume(100);
_local1.attachSound("objecthit");
_local1.start();
}
}
};
speelSFX = function (naam, volume) {
if (muteSounds != true) {
switch (naam) {
case "kanon" :
var _local2 = new Sound(sound.kanon);
_local2.setVolume(volume);
_local2.attachSound("kanon");
_local2.start();
break;
case "turet" :
var _local4 = new Sound(sound.kanon);
_local4.setVolume(volume);
_local4.attachSound("rocket");
_local4.start();
break;
case "exp_klein" :
var _local5 = new Sound(sound.explosies);
_local5.setVolume(volume);
_local5.attachSound("exp_klein");
_local5.start();
break;
case "exp_groot" :
var _local3 = new Sound(sound.explosies);
_local3.setVolume(volume);
_local3.attachSound("exp_groot");
_local3.start();
break;
case "inslag" :
_local5 = new Sound(sound.inslag);
_local5.setVolume(volume);
_local5.attachSound("exp_klein");
_local5.start();
break;
case "hitdog" :
var _local7 = new Sound(sound.bullethit);
_local7.setVolume(volume);
_local7.attachSound("hittuig");
_local7.start();
break;
case "soldhit" :
var _local6 = new Sound(soundEffects.soldiers);
_local6.setVolume(volume);
_local6.attachSound("soldhit");
_local6.start();
}
}
};
stopSound = function () {
stopAllSounds();
sfx_engine.stop();
delete sfx_engine;
};
autoInitSFX = function (mc, effect) {
var _local2 = berekenAfstand(tuig, mc);
var _local1 = 100 - (_local2 / 10);
if (_local1 < 20) {
_local1 = 20;
}
speelSFX(effect, _local1);
};
verwerkSchepen = function () {
var _local9 = aSchepen.length;
var _local7 = 0;
while (_local7 < _local9) {
var _local3 = aSchepen[_local7];
var _local4 = _local3.schade;
var _local6 = _local3.maxschade;
var _local5 = _local3.schipnaam;
if (_local4 > _local6) {
var _local8 = _local3.mcs.length;
var _local1 = 0;
while (_local1 < _local8) {
var _local2 = _local3.mcs[_local1];
oY[_local2] = oY[_local2] + 1;
scr[_local2]._y = scr[_local2]._y + 1;
graphs[_local2]._y = graphs[_local2]._y + 1;
_local1++;
}
if (_local5 == "carrier") {
schipHoogte = schipHoogte + 1;
} else if (_local5 == "enemycarrier") {
baanhoogte = baanhoogte + 1;
}
aktie[_local5]._y = aktie[_local5]._y + 1;
}
if (_local4 > _local6) {
_local4 = _local6;
}
aktie[_local5].groen._xscale = 100 - ((_local4 / _local6) * 100);
if (_local5 == "carrier") {
carrierDamage = _local4;
if (memCarrierDamage != carrierDamage) {
attachCarrierUnderAttack();
}
memCarrierDamage = carrierDamage;
}
_local7++;
}
};
regelShipLoops = function () {
this=_global.enemyLoop;//parameter overwritten
_global.enemyLoop;
var _local6 = this.looppunt;
hitTestBounds(_local6, aktie);
var _local4 = _local6.xMin;
var _local8 = _local6.yMax;
var _local15 = tuig._x - _local4;
var _local12 = Math.atan2(tuig._y - _local8, _local15);
var _local16 = Math.round((_local12 * 180) / Math.PI);
var _local11 = _local8 - tuig._y;
var _local14 = _local11 / 100;
var _local17 = tuig._x - _local4;
var _local13 = _local11 / 180;
var _local7 = (Math.abs(tuig.xsnelheid) * 1.7) * _local13;
if (tuig.richting == "rechts") {
_local7 = _local7 * 1;
} else {
_local7 = _local7 * -1;
}
var _local5 = _local16 + _local7;
if ((_local5 < -10) && (_local5 > -170)) {
this._rotation = _local5 + 90;
var _local10 = 300;
if (Math.floor(Math.random() * (10 + _local14)) == 0) {
if ((tuig._x >= (_local4 - _local10)) && (tuig._x <= (_local4 + _local10))) {
var _local9 = bullets.getNextHighestDepth();
var _local3 = bullets.attachMovie("mcKanonskogel", "kanonskogel" + _local9, _local9);
_local3.type = "kanonskogel";
_local3._x = _local4;
_local3._y = _local8;
_local3.snelheid = 18;
_local3.afschieterMc = this;
_local3.hoek = _local5;
_local3.leven = 0;
autoInitSFX(this, "kanon");
this.schietklaar = false;
}
}
}
};
checkCarrierSunk = function () {
var _local6 = aSchepen.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local1 = aSchepen[_local2];
var _local3 = _local1.maxschade;
var _local5 = _local1.schipnaam;
if (_local5 == "carrier") {
var _local4 = _local1.schade;
if (_local4 >= _local3) {
if (schipHoogte > (zeeHoogte - 8)) {
return(true);
}
} else {
return(false);
}
}
_local2++;
}
};
checkEnemyShipSunk = function () {
var _local6 = aSchepen.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local1 = aSchepen[_local2];
var _local3 = _local1.maxschade;
var _local5 = _local1.schipnaam;
if (_local5 == "enemycarrier") {
var _local4 = _local1.schade;
if (_local4 >= _local3) {
enemyShipSunk = true;
return(true);
}
return(false);
}
_local2++;
}
};
checkBovenEenSchip = function (mc) {
var _local3 = mc._x;
var _local4 = null;
var _local5 = aSchepen.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local1 = aSchepen[_local2];
if ((_local3 > _local1.links) && (_local3 < _local1.rechts)) {
_local4 = _local1;
}
_local2++;
}
return(_local4);
};
checkSchipHit = function (tileNr, typeWapen, wapenMc) {
if (mapTravel == 0) {
var _local9 = aSchepen.length;
var _local2 = 0;
while (_local2 < _local9) {
var _local5 = aSchepen[_local2].mcs.length;
var _local1 = 0;
while (_local1 < _local5) {
var _local3 = aSchepen[_local2].mcs[_local1];
if (tileNr == _local3) {
var _local4 = aAmmoDamage[typeWapen];
ammoHit(typeWapen, wapenMc);
aSchepen[_local2].schade = aSchepen[_local2].schade + _local4;
}
_local1++;
}
_local2++;
}
}
};
Frame 177
stop();
trace("START _");
_global.root = this;
var menu = this.attachMovie("mcHoofdMenu", "mcHoofdMenu", 0);
if ((_global.userData[_global.currentPlayer].mute != true) && (_global.musicPlaying != true)) {
_global.startMenuLoop();
_global.musicPlaying = true;
}
userSettings = SharedObject.getLocal("user_data");
_global.userData = userSettings.data;
Frame 178
removeMovieClip(_root.xxc1);
removeMovieClip(_root.xxc2);
removeMovieClip(_root.xxc3);
removeMovieClip(_root.xxc4);
Frame 179
_root.menu.removeMovieClip();
_root.gameid = "Overlord";
_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 181
cale = "http://www.freeonlinegames.com/scoreboard/score.php?game=" + _root.gameid;
loadVariablesNum (cale, 0, "POST");
Frame 189
if (done != 1) {
gotoAndPlay ("loopLoad");
} else {
gotoAndPlay ("scoreTable");
}
Frame 193
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 194
stop();
if (_root.best > everscor[100]) {
scoreWind.gotoAndStop("submitScoreYes");
} else {
scoreWind.gotoAndStop("submitScoreNo");
}
if (_root.xdada == 1) {
scoreWind.gotoAndStop("topEver");
}
Symbol 3 MovieClip [mcCarrierUnderAttack] Frame 1
this.tel = 0;
this.onEnterFrame = function () {
this.tel++;
if (this.tel > 30) {
this._alpha = this._alpha - 10;
if (this._alpha < 20) {
this.removeMovieClip();
}
}
};
Symbol 5 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?Overlord", "_blank");
}
Symbol 9 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 50
stop();
_parent.play();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 28
gotoAndPlay ("loop");
Symbol 64 MovieClip [bomen] Frame 1
this.type = "groen";
Symbol 83 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Symbol 101 MovieClip [gebouwen] Frame 1
Symbol 101 MovieClip [gebouwen] Frame 2
stop();
Symbol 101 MovieClip [gebouwen] Frame 3
Symbol 101 MovieClip [gebouwen] Frame 4
stop();
Symbol 101 MovieClip [gebouwen] Frame 5
Symbol 101 MovieClip [gebouwen] Frame 6
Symbol 101 MovieClip [gebouwen] Frame 7
stop();
Symbol 101 MovieClip [gebouwen] Frame 8
stop();
Symbol 101 MovieClip [gebouwen] Frame 9
stop();
Symbol 145 MovieClip Frame 1
this._visible = false;
Symbol 146 MovieClip Frame 1
_global.enemyLoop = this;
Symbol 259 MovieClip [beach] Frame 1
stop();
Symbol 259 MovieClip [beach] Frame 2
stop();
Symbol 341 MovieClip [mcExplosie] Frame 1
if (this._parent.groot == true) {
this._width = this._width * 1.6;
this._height = this._height * 1.6;
}
Symbol 341 MovieClip [mcExplosie] Frame 22
if (this._parent.parentwis == true) {
this._parent.removeMovieClip();
}
this.removeMovieClip();
Symbol 356 MovieClip [mcRook] Frame 1
var rand = Math.random();
var sp = (this.speed * 2);
var stijg = (2 + (rand * 10));
this._xscale = (rand * 100) + 100;
this._yscale = (rand * 200) + 100;
this._y = this._y + (5 - (rand * 10));
this._x = this._x + (5 - (rand * 10));
this.onEnterFrame = function () {
if (this.richting == "links") {
this._x = this._x + (rand * sp);
} else {
this._x = this._x - (rand * sp);
}
this._y = this._y - stijg;
this._alpha = this._alpha - 10;
};
Symbol 356 MovieClip [mcRook] Frame 8
this.removeMovieClip();
Symbol 365 MovieClip [mcVonk] Frame 1
gooiOp = function (mc, dx, dy) {
mc.speedx = dx;
mc.speedy = dy;
mc.onEnterFrame = function () {
this.speedy = this.speedy + 10;
this.speedx = this.speedx * 0.95;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
if (this._y > this.bottom) {
delete mc.onEnterFrame;
this.removeMovieClip();
}
};
};
this.bottom = this._y;
if (this.richting == "links") {
pmfactor = 1;
} else {
pmfactor = -1;
}
gooiOp(this, Math.random() * (((this.speed * 2) - 20) * pmfactor), (Math.random() * ((-(this.speed * 2)) - 20)) - 5);
if (this.spetter == true) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(Math.ceil(Math.random() * 2));
}
Symbol 367 MovieClip [vuur] Frame 1
scale = Number(random(50)) + 30;
this._x = Math.random() * 15;
this._yscale = scale;
Symbol 367 MovieClip [vuur] Frame 25
var p = this._parent;
p._parent.vuur = false;
if (p.tel == undefined) {
p.tel = 0;
}
p.tel++;
if (p.tel >= 12) {
p.removeMovieClip();
}
this.removeMovieClip();
Symbol 382 MovieClip [dog_brok] Frame 1
this.gotoAndStop(this.frame);
this.rotspeed = 60 - random(120);
gooiOp = function (mc, dx, dy) {
if (dx != 0) {
mc.speedx = dx;
}
if (dy != 0) {
mc.speedy = dy;
}
mc.onEnterFrame = function () {
this.speedy = this.speedy + 1;
this.speedx = this.speedx * 0.95;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
this._rotation = this._rotation + this.rotspeed;
if (this._y > this.bottom) {
delete mc.onEnterFrame;
removeMovieClip(this);
}
};
};
trace("impy" + this.impact);
if (this.gooiRichting == "rechts") {
gooiOp(this, (Math.random() * ((-(this.impact * 2)) - 20)) - 5, (Math.random() * ((-(this.impact * 2)) - 20)) - 5);
} else {
gooiOp(this, (Math.random() * ((this.impact * 2) + 20)) + 5, (Math.random() * ((this.impact * 2) + 20)) + 5);
}
Symbol 393 MovieClip [fort_brok] Frame 1
this.gotoAndStop(this.frame);
this.rotspeed = 60 - random(120);
gooiOp = function (mc, dx, dy) {
if (dx != 0) {
mc.speedx = dx;
}
if (dy != 0) {
mc.speedy = dy;
}
mc.onEnterFrame = function () {
this.speedy = this.speedy + 1;
this.speedx = this.speedx * 0.95;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
this._rotation = this._rotation + this.rotspeed;
if (this._y > this.bottom) {
delete mc.onEnterFrame;
removeMovieClip(this);
}
};
};
trace("impy" + this.impact);
if (this.gooiRichting == "rechts") {
gooiOp(this, (Math.random() * ((-(this.impact * 2)) - 20)) - 5, (Math.random() * ((-(this.impact * 2)) - 20)) - 5);
} else {
gooiOp(this, (Math.random() * ((this.impact * 2) + 20)) + 5, (Math.random() * ((this.impact * 2) + 20)) + 5);
}
Symbol 404 MovieClip [gebouw_brokken] Frame 1
this.gotoAndStop(Math.floor(Math.random() * 5) + 1);
var r40 = random(40);
this._xscale = 120 - r40;
this._yscale = 120 - random(40);
this.rotspeed = 60 - random(120);
gooiOp = function (mc, dx, dy) {
mc.speedx = dx;
mc.speedy = dy;
mc.onEnterFrame = function () {
this.speedy = this.speedy + 3;
this.speedx = this.speedx * 0.95;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
this._rotation = this._rotation + this.rotspeed;
if (this._y > this.bottom) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
};
gooiOp(this, r40 - 20, -(r40 + 20));
Symbol 413 MovieClip [tuig_brok] Frame 1
this.gotoAndStop(this.frame);
this.rotspeed = 60 - random(120);
gooiOp = function (mc, dx, dy) {
if (dx != 0) {
mc.speedx = dx;
}
if (dy != 0) {
mc.speedy = dy;
}
mc.onEnterFrame = function () {
this.speedy = this.speedy + 1;
this.speedx = this.speedx * 0.95;
this._y = this._y + this.speedy;
this._x = this._x + this.speedx;
this._rotation = this._rotation + this.rotspeed;
if (this._y > this.bottom) {
delete mc.onEnterFrame;
removeMovieClip(this);
}
};
};
if (this.gooiRichting == "rechts") {
gooiOp(this, (Math.random() * ((-(this.impact * 2)) - 20)) - 5, (Math.random() * ((-(this.impact * 2)) - 20)) - 5);
} else {
gooiOp(this, (Math.random() * ((this.impact * 2) + 20)) + 5, (Math.random() * ((this.impact * 2) + 20)) + 5);
}
Symbol 421 MovieClip [aa_gun] Frame 1
stop();
Symbol 516 MovieClip [soldaat] Frame 20
gotoAndPlay ("rechts");
Symbol 516 MovieClip [soldaat] Frame 40
gotoAndPlay ("links");
Symbol 516 MovieClip [soldaat] Frame 87
gotoAndPlay ("linkslig");
Symbol 516 MovieClip [soldaat] Frame 134
gotoAndPlay ("rechtslig");
Symbol 526 MovieClip [mcOmgeving] Frame 1
Symbol 530 MovieClip [zeeTegel] Frame 1
stop();
Symbol 530 MovieClip [zeeTegel] Frame 2
stop();
Symbol 553 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 1
this.tel = 0;
this.onEnterFrame = function () {
if (this.tel > 10) {
this._visible = false;
}
if (this.tel > 20) {
this._visible = true;
this.tel = 0;
}
this.tel++;
};
Symbol 563 MovieClip Frame 1
this.tel = 0;
this.onEnterFrame = function () {
if (this.tel > 10) {
this._visible = false;
}
if (this.tel > 20) {
this._visible = true;
this.tel = 0;
}
this.tel++;
};
Instance of Symbol 585 MovieClip in Symbol 586 MovieClip [mcHud] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 597 MovieClip Frame 1
stop();
Instance of Symbol 591 MovieClip "mcIndicator" in Symbol 598 MovieClip [mcRadar] Frame 1
onClipEvent (enterFrame) {
this._rotation = -this._parent._rotation;
}
Symbol 613 MovieClip Frame 1
stop();
Symbol 623 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wxnume;
getURL (targetul3, "_blank");
}
Symbol 624 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wxnume;
getURL (targetul2, "_blank");
}
Symbol 625 Button
on (release) {
_parent.mainMenuFunction();
}
Symbol 626 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wxnume) + ".exe";
getURL (targetul1);
}
Symbol 627 Button
on (release, keyPress "p") {
_parent.pauseFunction();
}
Symbol 628 Button
on (release, keyPress "s") {
_parent.soundFunction();
}
Symbol 642 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 642 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 642 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 642 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 642 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 642 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 642 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 642 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 647 Button
on (press) {
_parent.play();
}
Symbol 650 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 650 MovieClip Frame 2
tg._x = 147;
tg._y = 1.1;
Symbol 650 MovieClip Frame 3
tg._x = 147;
tg._y = -174.9;
Symbol 650 MovieClip Frame 4
tg._x = 1.5;
tg._y = -174.9;
Symbol 650 MovieClip Frame 5
tg._x = 147;
tg._y = -152.4;
Symbol 650 MovieClip Frame 6
tg._x = 147;
tg._y = -128.9;
Symbol 650 MovieClip Frame 7
tg._x = 147;
tg._y = -104.9;
Symbol 650 MovieClip Frame 8
tg._x = 1.5;
tg._y = -151.4;
Symbol 650 MovieClip Frame 9
tg._x = 1.5;
tg._y = -128.4;
Symbol 650 MovieClip Frame 10
tg._x = 1.5;
tg._y = -104.9;
Symbol 669 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 670 MovieClip Frame 1
stop();
if ((_parent.wxaliniere == "Stanga-Sus") || (_parent.wxaliniere == "Dreapta-Sus")) {
this.gotoAndStop(2);
}
Symbol 671 MovieClip Frame 1
function pauseFunction() {
}
function soundFunction() {
if (_global.userData[_global.currentPlayer].mute != true) {
stopAllSounds();
_global.userData[_global.currentPlayer].mute = true;
_root.muteSounds = true;
} else {
this.red._visible = false;
_global.userData[_global.currentPlayer].mute = false;
_root.muteSounds = false;
_root.memSnd = null;
_root.engineSound();
}
}
function mainMenuFunction() {
_root.reset();
}
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 671 MovieClip Frame 10
stop();
Instance of Symbol 671 MovieClip in Symbol 672 MovieClip [mcTopHud] Frame 1
//component parameters
onClipEvent (construct) {
wxnume = "Overlord";
wxaliniere = "Stanga-Sus";
wxculoare = 13158;
wxdownload = true;
wxpause = false;
wxsound = true;
}
Symbol 674 MovieClip [outofammo] Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 6;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
Symbol 678 MovieClip [mcBom] Frame 1
stop();
Symbol 678 MovieClip [mcBom] Frame 2
delete this.onEnterFrame;
var e = this.attachMovie("mcExplosie", "bom", 1);
this.parentwis = true;
Symbol 683 MovieClip [mcKanonskogel] Frame 1
this.onEnterFrame = function () {
this._y = this._y + ((-this.snelheid) * Math.cos((Math.PI/180) * (this.hoek + 90)));
this._x = this._x + (this.snelheid * Math.sin((Math.PI/180) * (this.hoek + 90)));
if (this.leven >= 120) {
this.afschieterMc.telkogels--;
this.removeMovieClip();
}
this.leven++;
};
Symbol 693 MovieClip [mcRaket] Frame 1
Symbol 693 MovieClip [mcRaket] Frame 6
this.gotoAndPlay(1);
Symbol 693 MovieClip [mcRaket] Frame 7
delete this.onEnterFrame;
var e = this.attachMovie("mcExplosie", "bom", 1);
this.parentwis = true;
Symbol 694 MovieClip [mcSeeker] Frame 1
Symbol 694 MovieClip [mcSeeker] Frame 7
this.gotoAndPlay(2);
Symbol 694 MovieClip [mcSeeker] Frame 8
delete this.onEnterFrame;
var e = this.attachMovie("mcExplosie", "bom", 1);
this.parentwis = true;
Symbol 700 MovieClip [mcTorpedo] Frame 1
stop();
Symbol 700 MovieClip [mcTorpedo] Frame 4
delete this.onEnterFrame;
this.parentwis = true;
this.attachMovie("mcExplosie", "bom", 1);
Symbol 703 MovieClip [tuigSeeker] Frame 1
stop();
Symbol 703 MovieClip [tuigSeeker] Frame 2
delete this.onEnterFrame;
var e = this.attachMovie("mcExplosie", "bom", 1);
this.parentwis = true;
Symbol 724 MovieClip Frame 1
var nm = this._name;
var posarray = nm.split("_");
this.apos = int(posarray[1]) - 1;
this._alpha = 4;
this.onRollOver = function () {
this._alpha = 100;
};
this.onRollOut = function () {
this._alpha = 0;
};
this.onReleaseOutside = function () {
this._alpha = 0;
};
this.onRelease = function () {
trace((("mousePOS " + nm) + " ") + this.apos);
this._parent.pos = this.apos;
_global.verwerkMenu("enter");
};
Symbol 725 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
getURL (targetul1);
}
Symbol 732 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 732 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 732 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 733 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
getURL (targetul2, "_blank");
}
Symbol 740 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 740 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 740 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 741 Button
on (release) {
targetul3 = "http://www.freegamesforyourwebsite.com/?" + _parent.wynume;
getURL (targetul3, "_blank");
}
Symbol 742 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 742 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 742 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 747 Button
on (release) {
targetul1 = ("http://www.freeonlinegames.com/downloads/" + _parent.wynume) + ".exe";
getURL (targetul1);
}
Symbol 748 MovieClip Frame 1
stop();
Symbol 751 Button
on (release) {
targetul2 = "http://www.freeonlinegames.com/?" + _parent.wynume;
getURL (targetul2, "_blank");
}
Symbol 752 MovieClip Frame 1
stop();
Symbol 753 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 760 MovieClip Frame 1
stop();
if (_parent.wyaliniere == "Centru") {
this.gotoAndStop(2);
}
if (_parent.wyaliniere == "Dreapta") {
this.gotoAndStop(3);
}
Symbol 760 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 760 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 761 Button
on (release, keyPress "p") {
_parent.instructionsFunction();
}
Symbol 762 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 1
function instructionsFunction() {
}
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 763 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 763 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 763 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 763 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 763 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 771 MovieClip [mcMenu] Frame 1
this.aantalItems = 4;
Symbol 771 MovieClip [mcMenu] Frame 2
this.aantalItems = 2;
Instance of Symbol 763 MovieClip in Symbol 771 MovieClip [mcMenu] Frame 2
//component parameters
onClipEvent (construct) {
wynume = "Overlord";
wyculoare = 26265;
wyasezare = "Vertical";
wyaliniere = "Stanga";
wypozitie = "Sus";
wyinstructions = false;
}
Symbol 771 MovieClip [mcMenu] Frame 3
this.aantalItems = 2;
Symbol 803 MovieClip Frame 1
this._visible = false;
Symbol 806 MovieClip Frame 1
stop();
Symbol 1020 MovieClip [mcDog] Frame 1
if (this.torpedoVisible != true) {
this.torpedo._visible = false;
}
stop();
Symbol 1020 MovieClip [mcDog] Frame 2
if (this.torpedoVisible != true) {
this.torpedo._visible = false;
}
stop();
Symbol 1020 MovieClip [mcDog] Frame 20
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1020 MovieClip [mcDog] Frame 34
this.keerKlaar = true;
stop();
Symbol 1020 MovieClip [mcDog] Frame 52
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1020 MovieClip [mcDog] Frame 66
this.keerKlaar = true;
stop();
Symbol 1020 MovieClip [mcDog] Frame 85
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1020 MovieClip [mcDog] Frame 100
this.keerKlaar = true;
stop();
Symbol 1020 MovieClip [mcDog] Frame 118
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1020 MovieClip [mcDog] Frame 134
this.keerKlaar = true;
stop();
Symbol 1149 MovieClip [mcFort] Frame 1
stop();
Symbol 1149 MovieClip [mcFort] Frame 2
stop();
Symbol 1149 MovieClip [mcFort] Frame 20
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1149 MovieClip [mcFort] Frame 34
this.keerKlaar = true;
stop();
Symbol 1149 MovieClip [mcFort] Frame 52
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1149 MovieClip [mcFort] Frame 68
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 1
if (this.torpedoVisible != true) {
this.torpedo._visible = false;
}
trace(wheelsOut + " OUT");
if (_global.wheelsOut == false) {
this.wheels._y = this.wheels._y - 8;
}
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 2
if (this.torpedoVisible != true) {
this.torpedo._visible = false;
}
if (_global.wheelsOut == false) {
this.wheels._y = this.wheels._y + 8;
}
Symbol 1450 MovieClip [mcVlieg] Frame 20
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1450 MovieClip [mcVlieg] Frame 35
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 53
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1450 MovieClip [mcVlieg] Frame 68
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 87
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1450 MovieClip [mcVlieg] Frame 102
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 121
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1450 MovieClip [mcVlieg] Frame 136
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 150
this.gekeerd = true;
this.richting = "rechts";
this.hoek = 0;
this.memAngle = 0;
this._rotation = 0;
Symbol 1450 MovieClip [mcVlieg] Frame 159
this.keerKlaar = true;
stop();
Symbol 1450 MovieClip [mcVlieg] Frame 172
this.gekeerd = true;
this.richting = "links";
this.hoek = 180;
this.memAngle = 180;
this._rotation = 180;
Symbol 1450 MovieClip [mcVlieg] Frame 181
this.keerKlaar = true;
stop();
Symbol 1453 MovieClip [mcHitBlind] Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 1476 MovieClip [mcStopLoop] Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1488 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 1497 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 1506 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 1507 MovieClip [DownArrow] Frame 1
stop();
Symbol 1507 MovieClip [DownArrow] Frame 2
stop();
Symbol 1507 MovieClip [DownArrow] Frame 3
stop();
Symbol 1513 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 1522 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 1527 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 1528 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 1536 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 1544 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 1552 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 1553 MovieClip [UpArrow] Frame 1
stop();
Symbol 1553 MovieClip [UpArrow] Frame 2
stop();
Symbol 1553 MovieClip [UpArrow] Frame 3
stop();
Symbol 1554 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 1556 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 1557 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 1568 MovieClip Frame 1
stop();
this.bg._alpha = 100;
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(2);
};
Symbol 1568 MovieClip Frame 2
this.bg._alpha = 70;
Symbol 1573 MovieClip Frame 1
stop();
this.bg._alpha = 100;
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(2);
};
Symbol 1573 MovieClip Frame 2
this.bg._alpha = 50;
Symbol 1577 MovieClip Frame 1
stop();
this.bg._alpha = 100;
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(2);
};
Symbol 1577 MovieClip Frame 2
this.bg._alpha = 50;
Symbol 1581 MovieClip Frame 1
stop();
this.bg._alpha = 100;
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(2);
};
Symbol 1581 MovieClip Frame 2
this.bg._alpha = 70;
Symbol 1588 MovieClip Frame 1
this.beg_game.rotplus = 4;
this.onRollOver = function () {
this.rotplus = 4;
this.beg_game.onEnterFrame = function () {
this._rotation = this._rotation + this.rotplus;
if (this.rotplus < 38) {
this.rotplus = this.rotplus * 1.05;
}
};
};
this.onRollOut = function () {
this.beg_game.onEnterFrame = function () {
this._rotation = this._rotation + this.rotplus;
this.rotplus = this.rotplus * 0.95;
if (this.rotplus <= 0.5) {
delete this.onEnterFrame;
}
};
};
this.onReleaseOutside = function () {
};
Symbol 1599 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?Overlord", "_blank");
}
Symbol 1666 MovieClip Frame 1
stop();
Symbol 1670 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1673 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1686 MovieClip Frame 1
stop();
Symbol 1696 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
stop();
Symbol 1696 MovieClip Frame 3
delete this.onRollOver;
delete this.onRollOut;
delete this.onReleaseOutside;
Symbol 1707 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1723 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1726 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1729 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1732 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1747 MovieClip Frame 1
stop();
Symbol 1747 MovieClip Frame 2
stop();
Symbol 1759 MovieClip Frame 1
this.onRelease = function () {
this.play();
};
stop();
Symbol 1759 MovieClip Frame 2
stop();
Symbol 1763 MovieClip Frame 1
this.onRelease = function () {
this.play();
};
stop();
Symbol 1763 MovieClip Frame 2
stop();
Symbol 1763 MovieClip Frame 3
stop();
Symbol 1765 MovieClip Frame 1
this.onRelease = function () {
this.play();
};
stop();
Symbol 1765 MovieClip Frame 2
stop();
Symbol 1765 MovieClip Frame 3
stop();
Symbol 1775 MovieClip [mcHoofdMenu] Frame 1
this.spitfire._alpha = 64;
var bnr = userData[_global.currentPlayer].level;
if (bnr == undefined) {
bnr = 1;
}
this.badge.nr.text = bnr;
initBackButton = function (geenButton, backToMain, cancel, disabled) {
if (cancel != true) {
(back.gotoAndStop(1));// not popped
} else {
(back.gotoAndStop(2));// not popped
}
((geenButton == true) ? ((back._visible = false)) : ((back._visible = true)));
if (backToMain == true) {
this.memFrame = 1;
}
back.goto = this.memFrame;
this.memFrame = this._currentframe;
var nr;
((cancel == true) ? ((nr = 2)) : ((nr = 1)));
if (disabled != true) {
back.onRelease = function () {
this._parent.gotoAndStop(this.goto);
};
back.onRollOver = function () {
this.gotoAndStop(nr + 2);
};
back.onRollOut = function () {
this.gotoAndStop(nr);
};
back.onReleaseOutside = function () {
this.gotoAndStop(nr);
};
} else {
delete back.onRelease;
delete back.onRollOver;
delete back.onRollOut;
delete back.onReleaseOutside;
back.gotoAndStop(back._currentframe + 2);
}
};
defaultKeys = function (array) {
array.left = 37;
array.up = 38;
array.right = 39;
array.down = 40;
array.gun = 32;
array.weapon = 17;
array.pauze = 80;
};
defaultDetail = function (array) {
array.zoom = 1;
array.quality = 1;
array.waves = 1;
array.clouds = 1;
array.smoke = 1;
array.bg = 1;
array.graphs = 1;
array.light = 1;
};
aDetail = new Array("zoom", "quality", "waves", "clouds", "smoke", "bg", "graphs", "light");
schaalElas = function (mc, doelX, doelY, inertia, k) {
var xplus = 0;
var yplus = 0;
mc.onEnterFrame = function () {
var _local2 = (-mc._xscale) + doelX;
var _local1 = (-mc._yscale) + doelY;
xplus = (xplus * inertia) + (_local2 * k);
yplus = (yplus * inertia) + (_local1 * k);
mc._xscale = mc._xscale + xplus;
mc._yscale = mc._yscale + yplus;
};
};
maakMenuWolken = function () {
var _local5 = menuWolken;
var _local3 = Math.random();
var _local6 = (tel = 1);
for (var _local2 in menuWolken) {
tel++;
}
if (tel < 3) {
if (random(tel) == 0) {
var _local4 = _local5.getNextHighestDepth();
var _local1 = _local5.attachMovie("wolk" + (random(3) + 1), "wolk" + _local4, _local4);
if (random(2) == 0) {
_local1._x = 0;
_local1._y = _local3 * 250;
_local1.speed = 2 + int(_local3 * 5);
} else {
_local1._x = Stage.width + _local1._width;
_local1._y = 100 + (_local3 * 200);
_local1.speed = (2 + int(_local3 * 5)) * -1;
}
}
}
};
verplaatsWolken = function () {
for (var _local2 in menuWolken) {
var _local1 = menuWolken[_local2];
_local1._x = _local1._x + _local1.speed;
if (_local1.speed > 0) {
if ((_local1._x - _local1._width) > Stage.width) {
_local1.removeMovieClip();
}
} else if (_local1._x < 0) {
_local1.removeMovieClip();
}
}
};
menuWolken._alpha = 60;
if (menuWolkInt == null) {
menuWolkInt = setInterval(maakMenuWolken, 2000);
}
if (verplaatsWolkInt == null) {
verplaatsWolkInt = setInterval(verplaatsWolken, 70);
}
intro = function () {
this.spitfire._alpha = 100;
this.spitfire._xscale = 300;
this.spitfire._yscale = 300;
this.mcTitel._alpha = 0;
this.menu._alpha = 0;
this.spitfire.onEnterFrame = function () {
if ((this._xscale <= 100) && (this._yscale <= 100)) {
this._xscale = 100;
this._yscale <= 100;
this._alpha = this._alpha - 2;
if (this._alpha <= 64) {
this._alpha = 64;
if ((this._parent.mcTitel._alpha >= 100) && (this._parent.menu._alpha >= 100)) {
_global.startIntro = false;
delete this.onEnterFrame;
} else {
this._parent.mcTitel._alpha = this._parent.mcTitel._alpha + 10;
this._parent.menu._alpha = this._parent.menu._alpha + 10;
}
}
} else {
this._xscale = this._xscale - 20;
this._yscale = this._yscale - 20;
}
};
};
stop();
var userData = _global.userData;
startMusic = function () {
if (_global.userData[_global.currentPlayer].mute != true) {
if (_global.musicPlaying != true) {
_global.startMenuLoop();
_global.musicPlaying = true;
}
} else {
stopAllSounds();
_global.musicPlaying = false;
}
};
if (_global.currentPlayer == null) {
_global.startIntro = true;
this.gotoAndStop("selectplayer");
} else if (_root.inGame == true) {
this.gotoAndStop("levels");
startMusic();
} else {
startMusic();
this.cpText = "Current Player: " + _global.currentPlayer;
this.begin.onRelease = function () {
this._parent.gotoAndStop("levels");
};
this.players.onRelease = function () {
this._parent.gotoAndStop("playermenu");
};
this.options.onRelease = function () {
this._parent.gotoAndStop("options");
};
this.credits.onRelease = function () {
this._parent.gotoAndStop("credits");
};
this.highscores.onRelease = function () {
this._parent.gotoAndStop("highscores");
};
}
initBackButton(true, false);
Instance of Symbol 763 MovieClip in Symbol 1775 MovieClip [mcHoofdMenu] Frame 1
//component parameters
onClipEvent (construct) {
wynume = "Overlord";
wyculoare = 26265;
wyasezare = "Orizontal";
wyaliniere = "Centru";
wypozitie = "Sus";
wyinstructions = false;
}
Symbol 1775 MovieClip [mcHoofdMenu] Frame 2
stop();
var motherMc = this;
_root.inGame = false;
var userData = _global.userData;
if (userData[_global.currentPlayer].level > 6) {
userData[_global.currentPlayer].level = 6;
}
if (userData[_global.currentPlayer].level != null) {
_global.userLevel = userData[_global.currentPlayer].level;
} else {
userData[_global.currentPlayer].level = 1;
_global.userLevel = 1;
}
this.cheat.onRelease = function () {
userData[_global.currentPlayer].level = 6;
_global.userLevel = 6;
manageLevels();
};
manageLevels = function () {
motherMc.mcMissions.gotoAndStop(selectedMission);
if (_global.userLevel >= selectedMission) {
this.takeOff.gotoAndStop(1);
} else {
this.takeOff.gotoAndStop("locked");
}
if (_global.userLevel < 6) {
if (selectedMission == 5) {
this.next._visible = false;
} else {
this.next._visible = true;
}
} else if (selectedMission == 6) {
this.next._visible = false;
} else {
this.next._visible = true;
}
if (selectedMission == 1) {
this.prev._visible = false;
} else {
this.prev._visible = true;
}
};
this.next.onRelease = function () {
selectedMission++;
if (selectedMission > 6) {
selectedMission = 6;
}
manageLevels();
};
this.prev.onRelease = function () {
selectedMission--;
if (selectedMission < 1) {
selectedMission = 1;
}
manageLevels();
};
this.takeOff.onRelease = function () {
if (_global.userLevel >= selectedMission) {
var _local2 = selectedMission;
stopAllSounds();
_global.musicPlaying = false;
_global.startini(("level" + _local2) + ".xml");
}
};
initBackButton(false, true);
selectedMission = _global.userLevel;
manageLevels();
Symbol 1775 MovieClip [mcHoofdMenu] Frame 3
stop();
Selection.setFocus("userInput");
stop();
((_global.currentPlayer == null) ? (initBackButton(false, false, true, true)) : (initBackButton(false, false, true, false)));
var userData = _global.userData;
this.ok.onRelease = function () {
var _local6 = this._parent.userInput.text;
_global.currentPlayer = _local6;
var _local4 = [];
_local4.push(_local6);
var _local3 = 0;
while (_local3 < userData.aPlayers.length) {
if (userData.aPlayers[_local3] != undefined) {
_local4.push(userData.aPlayers[_local3]);
}
_local3++;
}
userData.aPlayers = _local4;
var _local5 = (userData[_local6] = []);
_local5.level = 1;
var _local7 = (_local5.aKeys = []);
defaultKeys(_local7);
var _local8 = (_local5.aDetail = []);
defaultDetail(_local8);
_local5.mute = false;
this._parent.gotoAndStop("main");
};
Symbol 1775 MovieClip [mcHoofdMenu] Frame 4
stop();
var userData = _global.userData;
this.currplayer = ("delete " + _global.currentPlayer) + " ?";
this.ok.onRelease = function () {
delete userData[_global.currentPlayer];
var _local4 = [];
var _local3 = 0;
while (_local3 < userData.aPlayers.length) {
if ((userData.aPlayers[_local3] != undefined) && (userData.aPlayers[_local3] != _global.currentPlayer)) {
_local4.push(userData.aPlayers[_local3]);
}
_local3++;
}
userData.aPlayers = _local4;
_global.currentPlayer = null;
this._parent.gotoAndStop("main");
};
initBackButton(false, false, true);
Symbol 1775 MovieClip [mcHoofdMenu] Frame 5
if (_global.startIntro == true) {
intro();
this.back._visible = false;
} else {
this.back._visible = true;
}
stop();
var userData = _global.userData;
if (_global.startIntro != true) {
initBackButton(false, false, false, false);
}
if (userData.aPlayers == null) {
userData.aPlayers = [];
this.gotoAndStop("newplayer");
} else if (userData.aPlayers.length == 0) {
this.gotoAndStop("newplayer");
} else {
var i = 0;
while (i < 3) {
var player = userData.aPlayers[i];
if (player != null) {
this.menu["badge" + i].nr.text = userData[player].level;
this.menu["select" + i].usernm = player;
this.menu["select" + i].onRelease = function () {
_global.currentPlayer = this.usernm;
this._parent._parent.gotoAndStop("main");
};
}
i++;
}
}
Symbol 1775 MovieClip [mcHoofdMenu] Frame 6
stop();
var userData = _global.userData;
this.currPlayer = _global.currentPlayer;
this.levelText = userData[_global.currentPlayer].level;
initBackButton(false, false);
Symbol 1775 MovieClip [mcHoofdMenu] Frame 7
var userData = _global.userData;
this.addplayer.onRelease = function () {
if (userData.aPlayers.length >= 3) {
this._parent.message = "Maximum number of players is three. Please remove a player before adding a new one";
this._parent.gotoAndStop("message");
} else {
this._parent.gotoAndStop("newplayer");
}
};
this.deleteplayer.onRelease = function () {
if (userData.aPlayers.length == 0) {
this._parent.message = "No players to delete";
this._parent.gotoAndStop("message");
} else {
this._parent.gotoAndStop("delplayer");
}
};
this.selectplayer.onRelease = function () {
this._parent.gotoAndStop("selectplayer");
};
this.playerinfo.onRelease = function () {
this._parent.gotoAndStop("playerinfo");
};
initBackButton(false, true);
Symbol 1775 MovieClip [mcHoofdMenu] Frame 8
this.messageText = this.message;
this.ok.onRelease = function () {
this._parent.gotoAndStop("playermenu");
this._parent.message = null;
};
initBackButton(true);
Symbol 1775 MovieClip [mcHoofdMenu] Frame 9
function getKeynames(xml) {
aKeynames = [];
var _local6 = xml.firstChild;
var _local2 = _local6.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
var _local4 = _local2[_local1].childNodes;
var _local3 = int(_local2[_local1].attributes.code);
var _local5 = _local2[_local1].attributes.name;
aKeynames[_local3] = [];
aKeynames[_local3].name = _local2[_local1].attributes.name;
_local1++;
}
verwerkSettings();
}
initBackButton(false, false, true);
var keys_xml = new XML();
keys_xml.ignoreWhite = true;
keys_xml.onLoad = function (success) {
if (success) {
getKeynames(this);
} else {
trace("Error loading XML file");
}
};
keys_xml.load("keynames.xml");
luisterToetsen = function () {
tuigListener = new Object();
tuigListener.onKeyDown = function () {
var _local1 = Key.getCode();
var _local2 = aKeynames[_local1].name;
keySelected.gotoAndStop(1);
keySelected.naam = _local2;
keySelected.code = _local1;
keySelected._parent.error = "";
};
Key.addListener(tuigListener);
};
printKeyNames = function () {
var _local3 = _global.userData[_global.currentPlayer].aKeys;
this.keyLeft.naam = aKeynames[_local3.left].name;
this.keyLeft.code = _local3.left;
this.keyRight.naam = aKeynames[_local3.right].name;
this.keyRight.code = _local3.right;
this.keyUp.naam = aKeynames[_local3.up].name;
this.keyUp.code = _local3.up;
this.keyDown.naam = aKeynames[_local3.down].name;
this.keyDown.code = _local3.down;
this.keyGun.naam = aKeynames[_local3.gun].name;
this.keyGun.code = _local3.gun;
this.keyWeapon.naam = aKeynames[_local3.weapon].name;
this.keyWeapon.code = _local3.weapon;
this.keyPauze.naam = aKeynames[_local3.pauze].name;
this.keyPauze.code = _local3.pauze;
};
printDetailSettings = function () {
var _local5 = _global.userData[_global.currentPlayer].aDetail;
var _local3 = 0;
while (_local3 < aDetail.length) {
var _local4 = aDetail[_local3];
this[_local4 + "Sw"].gotoAndStop(_local5[_local4]);
_local3++;
}
};
saveDetailSettings = function () {
var _local5 = _global.userData[_global.currentPlayer].aDetail;
var _local3 = 0;
while (_local3 < aDetail.length) {
var _local4 = aDetail[_local3];
_local5[_local4] = this[_local4 + "Sw"]._currentframe;
_local3++;
}
};
resetVelden = function () {
this.keyLeft.gotoAndStop(1);
this.keyRight.gotoAndStop(1);
this.keyUp.gotoAndStop(1);
this.keyDown.gotoAndStop(1);
this.keyGun.gotoAndStop(1);
this.keyWeapon.gotoAndStop(1);
this.keyPauze.gotoAndStop(1);
};
checkForConflict = function (code) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < aConflictingKeys.length) {
if (code == aConflictingKeys[_local1]) {
_local2++;
}
_local1++;
}
if (_local2 > 0) {
conflictError = true;
}
aConflictingKeys.push(code);
};
verwerkSettings = function () {
printKeyNames();
printDetailSettings();
luisterToetsen();
this.keyGun.onRelease = (this.keyWeapon.onRelease = (this.keyPauze.onRelease = (this.keyDown.onRelease = (this.keyUp.onRelease = (this.keyRight.onRelease = (this.keyLeft.onRelease = function () {
resetVelden();
this.gotoAndStop(2);
keySelected = this;
}))))));
this.ok.onRelease = function () {
aConflictingKeys = [];
conflictError = false;
checkForConflict(this._parent.keyLeft.code);
checkForConflict(this._parent.keyRight.code);
checkForConflict(this._parent.keyUp.code);
checkForConflict(this._parent.keyDown.code);
checkForConflict(this._parent.keyGun.code);
checkForConflict(this._parent.keyWeapon.code);
checkForConflict(this._parent.keyPauze.code);
if (conflictError != true) {
_global.userData[_global.currentPlayer].aKeys.left = this._parent.keyLeft.code;
_global.userData[_global.currentPlayer].aKeys.right = this._parent.keyRight.code;
_global.userData[_global.currentPlayer].aKeys.right = this._parent.keyRight.code;
_global.userData[_global.currentPlayer].aKeys.up = this._parent.keyUp.code;
_global.userData[_global.currentPlayer].aKeys.down = this._parent.keyDown.code;
_global.userData[_global.currentPlayer].aKeys.gun = this._parent.keyGun.code;
_global.userData[_global.currentPlayer].aKeys.weapon = this._parent.keyWeapon.code;
_global.userData[_global.currentPlayer].aKeys.pauze = this._parent.keyPauze.code;
saveDetailSettings();
this._parent.gotoAndStop("main");
} else {
this._parent.error = "Conflicting Keys";
}
};
};
Symbol 1775 MovieClip [mcHoofdMenu] Frame 10
this.ok.onRelease = function () {
this._parent.gotoAndStop("main");
};
Symbol 1775 MovieClip [mcHoofdMenu] Frame 11
this.ok.onRelease = function () {
this._parent.gotoAndStop("main");
};
Symbol 1797 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1802 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1803 MovieClip [mcMissionComplete] Frame 1
stop();
Symbol 1803 MovieClip [mcMissionComplete] Frame 2
Selection.setFocus("name");
Symbol 1804 MovieClip Frame 1
stop();
Instance of Symbol 1554 MovieClip [FUIComponentSymbol] in Symbol 1804 MovieClip Frame 94
//component parameters
onClipEvent (construct) {
}
Instance of Symbol 1557 MovieClip [FScrollBarSymbol] in Symbol 1804 MovieClip Frame 95
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}
Symbol 1805 Button
on (release) {
_root.reset();
_root.xdada = 0;
_global.scor = 1550;
_root.gotoAndPlay("submitScore");
}
Symbol 1810 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 1817 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 2122 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 1557 MovieClip [FScrollBarSymbol] "scroll1" in Symbol 2122 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}
Symbol 2128 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 2144 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 2150 Button
on (release) {
_root.gotoAndStop("coperta");
}
Symbol 2154 MovieClip Frame 1
stop();
Symbol 2154 MovieClip Frame 9
stop();
Symbol 2154 MovieClip Frame 22
stop();
Symbol 2154 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 2154 MovieClip Frame 45
if (_root.updated != 1) {
gotoAndPlay ("loop");
} else {
_root.best = 0;
_root.score = 0;
_root.xdada = 1;
_root.gotoAndPlay("submitScore");
}