Frame 1
btload = _root.getBytesLoaded();
totbt = _root.getBytesTotal();
sclbar = (btload * 100) / totbt;
sclbar = Math.round(sclbar);
setProperty(_root.orangebar, _xscale , sclbar);
barwid = getProperty(_root.orangebar, _width);
barwid = barwid + getProperty(_root.orangebar, _x);
setProperty(_root.ldper, _x , barwid);
Frame 2
if (btload >= totbt) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 7
gotoAndStop (8);
Symbol 5 MovieClip [Player Splat 3] Frame 15
stop();
Symbol 9 MovieClip [Player Splat 2] Frame 15
stop();
Symbol 13 MovieClip [Player Splat 1] Frame 15
stop();
Symbol 24 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 26 MovieClip [Enemy Type 1] Frame 11
stop();
Symbol 26 MovieClip [Enemy Type 1] Frame 51
stop();
_parent.removeMe();
Symbol 26 MovieClip [Enemy Type 1] Frame 66
stop();
_parent.removeMe();
Symbol 35 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 38 MovieClip [Enemy Type 7] Frame 11
stop();
Symbol 38 MovieClip [Enemy Type 7] Frame 51
stop();
_parent.removeMe();
Symbol 38 MovieClip [Enemy Type 7] Frame 66
stop();
_parent.removeMe();
Symbol 43 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 44 MovieClip [Enemy Type 6] Frame 11
stop();
Symbol 44 MovieClip [Enemy Type 6] Frame 51
stop();
_parent.removeMe();
Symbol 44 MovieClip [Enemy Type 6] Frame 66
stop();
_parent.removeMe();
Symbol 49 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 50 MovieClip [Enemy Type 5] Frame 11
stop();
Symbol 50 MovieClip [Enemy Type 5] Frame 51
stop();
_parent.removeMe();
Symbol 50 MovieClip [Enemy Type 5] Frame 66
stop();
_parent.removeMe();
Symbol 57 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 58 MovieClip [Enemy Type 4] Frame 11
stop();
Symbol 58 MovieClip [Enemy Type 4] Frame 51
stop();
_parent.removeMe();
Symbol 58 MovieClip [Enemy Type 4] Frame 66
stop();
_parent.removeMe();
Symbol 67 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 68 MovieClip [Enemy Type 3] Frame 11
stop();
Symbol 68 MovieClip [Enemy Type 3] Frame 51
stop();
_parent.removeMe();
Symbol 68 MovieClip [Enemy Type 3] Frame 66
stop();
_parent.removeMe();
Symbol 78 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 79 MovieClip [Enemy Type 2] Frame 11
stop();
Symbol 79 MovieClip [Enemy Type 2] Frame 51
stop();
_parent.removeMe();
Symbol 79 MovieClip [Enemy Type 2] Frame 66
stop();
_parent.removeMe();
Symbol 88 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 89 MovieClip Frame 1
myColour = new Color("splat");
myColour.setRGB(_parent._parent._parent._parent.playerColourHex);
Symbol 90 MovieClip [Enemy Type 0] Frame 1
play();
Symbol 90 MovieClip [Enemy Type 0] Frame 11
stop();
Symbol 90 MovieClip [Enemy Type 0] Frame 51
stop();
_parent.removeMe();
Symbol 90 MovieClip [Enemy Type 0] Frame 66
stop();
_parent.removeMe();
Symbol 92 MovieClip [Enemy] Frame 1
function setUp(enemyType) {
var movieName = ("Enemy Type " + type);
attachMovie(movieName, "graphics", 0);
timeCreated = getTimer();
}
function disappear() {
graphics.gotoAndPlay("Moving Out");
}
function fire() {
_parent._parent.enemyFire(type);
graphics.gotoAndPlay("Firing");
}
function checkFire() {
if (((timeBeforeShooting < (getTimer() - timeCreated)) && (!enemyFired)) && (!enemyHit)) {
if (typeType eq "M and M") {
enemyFired = 1;
fire();
} else {
enemyFired = 1;
disappear();
}
}
}
function hit() {
enemyHit = 1;
graphics.gotoAndPlay("Hit");
}
function removeMe() {
_parent._parent.removeEnemy(_name);
}
var timeCreated;
var type;
var positionNo;
var enemyFired;
var enemyHit;
var timeBeforeShooting;
var typeType;
stop();
Instance of Symbol 91 MovieClip in Symbol 92 MovieClip [Enemy] Frame 1
onClipEvent (load) {
_parent.setUp();
}
onClipEvent (enterFrame) {
_parent.checkFire();
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (load) {
_parent._parent._parent._parent.registerDepthIndicator(_parent._name);
}
Symbol 109 MovieClip [Player Splat 1] Frame 15
stop();
Symbol 110 MovieClip [Wall Splat] Frame 5
myColor = new Color(splat);
myColor.setRGB(0);
Symbol 110 MovieClip [Wall Splat] Frame 10
stop();
Symbol 126 MovieClip Frame 1
startAmmo = 10;
maxEnemies = 3;
checkAddTargetLoopTime = 100;
gunAccuracy = 30;
speedTestTime = 13000;
powerUpMinX = -250;
powerUpMaxX = 250;
powerUpMinY = -150;
powerUpMaxY = 150;
powerUpDisplayTime = 20000;
submitURL = "http://www.m-ms.nl/game/Updatedata.asp";
playerSplatStartDistance = 170;
playerSplatShift = 10;
minPlayerSplatScale = 30;
playerSplatsBeforeDead = 10;
maxPlayerSplatTypes = 3;
politicianPercentage = 0;
playerMessage = new Array();
playerMessage["Too Slow"] = "Sorry, je computer is te traag voor dit spel.";
playerMessage["Begin Level"] = "Get Ready: Click to begin...";
playerMessage["End Level"] = "Well done. You finished the level.";
playerMessage.Dead = "Game Over! ";
playerColourName = new Array();
playerColourName[0] = "aqua";
playerColourName[1] = "pink";
playerColourName[2] = "purple";
playerColourHex = new Array();
playerColourHex[0] = 65484;
playerColourHex[1] = 16751052 /* 0xFF99CC */;
playerColourHex[2] = 10066431 /* 0x9999FF */;
noLevels = 4;
levelBackground = new Array();
levelBackground[1] = "Outside Background";
levelBackground[2] = "Outside Background";
levelBackground[3] = "Inside Background";
levelBackground[4] = "Inside Background";
levelForeground = new Array();
levelForeground[1] = "Outside Foreground";
levelForeground[2] = "Outside Foreground";
levelForeground[3] = "Inside Foreground";
levelForeground[4] = "Inside Foreground";
enemiesPerLevel = new Array();
enemiesPerLevel[1] = 10;
enemiesPerLevel[2] = 15;
enemiesPerLevel[3] = 30;
enemiesPerLevel[4] = 1000;
fireSpeed = new Array();
fireSpeed[1] = 0;
fireSpeed[2] = 300;
fireSpeed[3] = 500;
fireSpeed[4] = 1000;
levelEnemyFrequency = new Array();
levelEnemyFrequency[1] = 5;
levelEnemyFrequency[2] = 6;
levelEnemyFrequency[3] = 7;
levelEnemyFrequency[4] = 10;
powerUpFrequency = new Array();
powerUpFrequency[1] = 1;
powerUpFrequency[2] = 1;
powerUpFrequency[3] = 1;
powerUpFrequency[4] = 1;
noTypes = 5;
noMandMs = 5;
noPoliticians = 0;
timeBeforeShooting = new Array();
timeBeforeShooting[0] = 2400;
timeBeforeShooting[1] = 2200;
timeBeforeShooting[2] = 2000;
timeBeforeShooting[3] = 1800;
timeBeforeShooting[4] = 1600;
timeBeforeShooting[5] = 1600;
timeBeforeShooting[6] = 1600;
timeBeforeShooting[7] = 1600;
scorePerType = new Array();
scorePerType[0] = 50;
scorePerType[1] = 75;
scorePerType[2] = 100;
scorePerType[3] = 125;
scorePerType[4] = 150;
scorePerType[5] = 300;
scorePerType[6] = 350;
scorePerType[7] = 400;
enemyPaintColour = new Array();
enemyPaintColour[0] = 65280;
enemyPaintColour[1] = 255;
enemyPaintColour[2] = 16750848 /* 0xFF9900 */;
enemyPaintColour[3] = 16776960 /* 0xFFFF00 */;
enemyPaintColour[4] = 16711680 /* 0xFF0000 */;
typeType = new Array();
typeType[0] = "M and M";
typeType[1] = "M and M";
typeType[2] = "M and M";
typeType[3] = "M and M";
typeType[4] = "M and M";
typeType[5] = "Politician";
typeType[6] = "Politician";
typeType[7] = "Politician";
enemyXPosition = new Array();
enemyYPosition = new Array();
positionRotation = new Array();
positionSize = new Array();
enemyXPosition[1] = new Array();
enemyYPosition[1] = new Array();
positionRotation[1] = new Array();
positionSize[1] = new Array();
enemyXPosition[1][0] = -158;
enemyYPosition[1][0] = 51;
positionSize[1][0] = 80;
enemyXPosition[1][1] = -205;
enemyYPosition[1][1] = 51;
positionSize[1][1] = 80;
enemyXPosition[1][2] = 248;
enemyYPosition[1][2] = -24;
positionSize[1][2] = 30;
positionRotation[1][2] = 300;
enemyXPosition[1][3] = -81;
enemyYPosition[1][3] = 176;
positionSize[1][3] = 90;
enemyXPosition[1][4] = 125;
enemyYPosition[1][4] = 49;
positionSize[1][4] = 90;
enemyXPosition[1][5] = 145;
enemyYPosition[1][5] = 48;
positionSize[1][5] = 45;
enemyXPosition[1][6] = 47;
enemyYPosition[1][6] = 48;
positionSize[1][6] = 45;
enemyXPosition[1][7] = -165;
enemyYPosition[1][7] = -146;
positionSize[1][7] = 90;
positionRotation[1][7] = 180;
enemyXPosition[1][8] = 205;
enemyYPosition[1][8] = -146;
positionSize[1][8] = 90;
positionRotation[1][8] = 180;
enemyXPosition[1][9] = 248;
enemyYPosition[1][9] = 24;
positionSize[1][9] = 30;
positionRotation[1][9] = 300;
enemyXPosition[2] = new Array();
enemyYPosition[2] = new Array();
positionRotation[2] = new Array();
positionSize[2] = new Array();
enemyXPosition[2][0] = -158;
enemyYPosition[2][0] = 51;
positionSize[2][0] = 80;
enemyXPosition[2][1] = -205;
enemyYPosition[2][1] = 51;
positionSize[2][1] = 80;
enemyXPosition[2][2] = 248;
enemyYPosition[2][2] = -24;
positionSize[2][2] = 30;
positionRotation[2][2] = 300;
enemyXPosition[2][3] = -81;
enemyYPosition[2][3] = 176;
positionSize[2][3] = 90;
enemyXPosition[2][4] = 125;
enemyYPosition[2][4] = 49;
positionSize[2][4] = 90;
enemyXPosition[2][5] = 145;
enemyYPosition[2][5] = 48;
positionSize[2][5] = 45;
enemyXPosition[2][6] = 47;
enemyYPosition[2][6] = 48;
positionSize[2][6] = 45;
enemyXPosition[2][7] = -165;
enemyYPosition[2][7] = -146;
positionSize[2][7] = 90;
positionRotation[2][7] = 180;
enemyXPosition[2][8] = 205;
enemyYPosition[2][8] = -146;
positionSize[2][8] = 90;
positionRotation[2][8] = 180;
enemyXPosition[2][9] = 248;
enemyYPosition[2][9] = 24;
positionSize[2][9] = 30;
positionRotation[2][9] = 300;
enemyXPosition[3] = new Array();
enemyYPosition[3] = new Array();
positionRotation[3] = new Array();
positionSize[3] = new Array();
enemyXPosition[3][0] = -197;
enemyYPosition[3][0] = 28;
positionSize[3][0] = 88;
positionRotation[3][0] = 0;
enemyXPosition[3][1] = -131;
enemyYPosition[3][1] = 55;
positionSize[3][1] = 88;
positionRotation[3][1] = 0;
enemyXPosition[3][2] = -58;
enemyYPosition[3][2] = 49;
positionSize[3][2] = 88;
positionRotation[3][2] = 25;
enemyXPosition[3][3] = 25;
enemyYPosition[3][3] = 160;
positionSize[3][3] = 100;
positionRotation[3][3] = 0;
enemyXPosition[3][4] = 105;
enemyYPosition[3][4] = 180;
positionSize[3][4] = 100;
positionRotation[3][4] = 0;
enemyXPosition[3][5] = 205;
enemyYPosition[3][5] = 43;
positionSize[3][5] = 85;
positionRotation[3][5] = 0;
enemyXPosition[3][6] = 98;
enemyYPosition[3][6] = 52;
positionSize[3][6] = 53;
positionRotation[3][6] = 0;
enemyXPosition[3][7] = 15;
enemyYPosition[3][7] = 0;
positionSize[3][7] = 37;
positionRotation[3][1] = 0;
enemyXPosition[3][8] = -12;
enemyYPosition[3][8] = 41;
positionSize[3][8] = 37;
positionRotation[3][8] = -25;
enemyXPosition[3][9] = -260;
enemyYPosition[3][9] = -50;
positionSize[3][9] = 41;
positionRotation[3][9] = 30;
enemyXPosition[3][10] = 260;
enemyYPosition[3][10] = -100;
positionSize[3][10] = 50;
positionRotation[3][10] = -30;
enemyXPosition[4] = new Array();
enemyYPosition[4] = new Array();
positionRotation[4] = new Array();
positionSize[4] = new Array();
enemyXPosition[4] = enemyXPosition[3];
enemyYPosition[4] = enemyYPosition[3];
positionRotation[4] = positionRotation[3];
positionSize[4] = positionSize[3];
Symbol 135 Button
on (release) {
setPlayerColour(0);
play();
}
Symbol 137 Button
on (release) {
setPlayerColour(1);
play();
}
Symbol 139 Button
on (release) {
setPlayerColour(2);
play();
}
Symbol 165 Button
on (release) {
play();
}
Symbol 171 MovieClip Frame 1
function appear() {
gotoAndPlay (10);
onScreen = 1;
}
function disappear() {
gotoAndPlay (58);
onScreen = 0;
}
function checkForDisappear() {
var thisTime = getTimer();
if (_parent.gameData.powerUpDisplayTime < (thisTime - appearTime)) {
disappear();
}
}
var onScreen;
var appearTime = getTimer();
stop();
Symbol 171 MovieClip Frame 57
gotoAndPlay (18);
checkForDisappear();
Symbol 178 MovieClip Frame 1
function updatePosition() {
if (_parent.gamePlaying) {
var xDist = (_parent._xmouse - this._x);
var yDist = (_parent._ymouse - this._y);
newXPos = this._x + (xDist / 1.3);
newYPos = this._y + (yDist / 1.3);
this._x = newXPos;
this._y = newYPos;
}
}
function fire() {
if (_parent.noAmmo < 1) {
this.gotoAndPlay("Out Of Ammo");
_parent.gunFired();
} else if (_parent.gamePlaying) {
this.gotoAndPlay("Fire");
_parent.gunFired();
}
}
stop();
Instance of Symbol 175 MovieClip in Symbol 178 MovieClip Frame 1
onClipEvent (mouseMove) {
_parent.updatePosition();
updateAfterEvent();
}
onClipEvent (mouseUp) {
_parent.fire();
}
Symbol 178 MovieClip Frame 18
gotoAndStop (1);
Symbol 178 MovieClip Frame 29
gotoAndStop (1);
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 16
gotoAndStop (1);
Symbol 185 MovieClip Frame 21
stop();
Symbol 185 MovieClip Frame 36
gotoAndStop (21);
Symbol 185 MovieClip Frame 41
stop();
Symbol 185 MovieClip Frame 56
gotoAndPlay (41);
Symbol 187 MovieClip Frame 1
function updatePosition() {
if (_parent.gamePlaying) {
bounds = _parent.getBounds();
gameXMax = bounds.xMax;
gameXMin = bounds.xMin;
gameWidth = gameXMax - gameXMin;
newDirection = Math.round((_root.game._xMouse * 3) / gameWidth);
if (newDirection != direction) {
changeDirection(newDirection);
}
newXPos = _root.game._xMouse / 3;
this._x = newXPos;
}
}
function changeDirection(newDirection) {
direction = newDirection;
if (direction == -1) {
graphics.gotoAndStop("Gun Left");
} else if (direction == 0) {
graphics.gotoAndStop("Gun Middle");
} else if (direction == 1) {
graphics.gotoAndStop("Gun Right");
}
}
function fire() {
if (1 < _parent.noAmmo) {
if (direction == -1) {
graphics.gotoAndPlay("Gun Left Firing");
} else if (direction == 0) {
graphics.gotoAndPlay("Gun Middle Firing");
} else if (direction == 1) {
graphics.gotoAndPlay("Gun Right Firing");
}
}
}
var direction = 0;
Instance of Symbol 186 MovieClip in Symbol 187 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.updatePosition();
}
onClipEvent (mouseUp) {
_parent.fire();
}
Symbol 192 Button
on (release) {
if ((_parent.email eq "") || (_parent.name eq "")) {
fieldsMissingMessage._alpha = 100;
} else {
_parent.submitScore();
}
}
Symbol 202 MovieClip Frame 1
function submitData(url) {
txtUserName = _parent.name;
intScore = _parent.score;
txtEmail = _parent.email;
txtColour = _parent.playerColourName;
getURL (url, "_parent", "POST");
}
Symbol 203 MovieClip Frame 1
function startSpeedTest() {
speedTestStartTime = getTimer();
}
function endSpeedTest() {
if (gameData.speedTestTime < (getTimer() - speedTestStartTime)) {
gotoAndPlay (37);
} else {
gotoAndPlay (51);
}
}
function setupGame() {
name = "";
email = "";
enemiesSoFarInGame = 0;
levelNo = 1;
score = 0;
noPlayerSplats = 0;
noAmmo = gamedata.startAmmo;
var counter = 0;
while (counter < gameData.maxEnemies) {
enemyName[counter] == "";
counter++;
}
gotoAndPlay (5);
}
function nextLevel() {
levelNo++;
gotoAndPlay (70);
}
function setUpLevel() {
setUpBackDrop();
noPlayerSplats = 0;
depthIndicatorName = new Array();
noEnemiesOnScreen = 0;
enemiesSoFarInLevel = 0;
myColour = new Color("colourDisplay");
myColour.setRGB(playerColourHex);
}
function setPlayerColour(colour) {
playerColour = colour;
playerColourName = gameData.playerColourName[colour];
playerColourHex = gameData.playerColourHex[colour];
}
function setUpBackDrop() {
backgroundContainer.attachMovie(gameData.levelBackground[levelNo], "Background", 0);
foregroundContainer.attachMovie(gameData.levelForeground[levelNo], "Foreground", 20);
}
function startPlaying() {
lastTimeCheck = getTimer();
gamePlaying = 1;
Mouse.hide();
}
function endLevel() {
gamePlaying = 0;
Mouse.show();
gotoAndPlay (100);
}
function die() {
Mouse.show();
gamePlaying = 0;
gotoAndPlay (120);
}
function checkForEndOfLevel() {
if ((noEnemiesOnScreen == 0) && (enemiesSoFarInLevel >= gameData.enemiesPerLevel[levelNo])) {
endLevel();
}
}
function checkAddTarget() {
if (gameData.checkAddTargetLoopTime < (getTimer() - lastTimeCheck)) {
var randomPercentage = (Math.random() * 100);
if (((noEnemiesOnScreen < gameData.maxEnemies) && (enemiesSoFarInLevel < gameData.enemiesPerLevel[levelNo])) && (gameData.levelEnemyFrequency[levelNo] >= randomPercentage)) {
placeEnemy();
}
var randomPercentage = (Math.random() * 100);
if ((gameData.powerUpFrequency[levelNo] >= randomPercentage) && (powerUp.onScreen < 1)) {
placePowerUp();
}
lastTimeCheck = getTimer();
}
}
function placePowerUp() {
powerUpXSpan = gameData.powerUpMaxX - gameData.powerUpMinX;
powerUpYSpan = gameData.powerUpMaxY - gameData.powerUpMinY;
powerUpXPos = parseInt(Math.random() * powerUpXSpan) + gameData.powerUpMinX;
powerUpYPos = parseInt(Math.random() * powerUpYSpan) + gameData.powerUpMinY;
powerUp._x = powerUpXPos;
powerUp._y = powerUpYPos;
powerUp.appear();
}
function registerEnemy(instanceName) {
var counter = 0;
while (counter < gameData.maxEnemies) {
if (enemyName[counter] eq "") {
enemyName[counter] = instanceName;
return;
}
counter++;
}
}
function removeEnemy(instanceName) {
var counter = 0;
while (counter < gameData.maxEnemies) {
if (enemyName[counter] == instanceName) {
enemyName[counter] = "";
noEnemiesOnScreen--;
}
counter++;
}
enemyHolder[instanceName].removeMovieClip();
}
function placeEnemy() {
enemiesSoFarInGame++;
enemiesSoFarInLevel++;
noEnemiesOnScreen++;
noPositionsThisLevel = gameData.enemyXPosition[levelNo].length;
var rand = Math.random();
newPosition = parseInt(rand * noPositionsThisLevel);
var rand = parseInt(Math.random() * 100);
if (rand < gameData.politicianPercentage) {
var typeType = "Politician";
} else {
var typeType = "M and M";
}
do {
newType = parseInt(Math.random() * gameData.noTypes);
} while (gameData.typeType[newType] ne typeType);
instanceName = "enemy" + enemiesSoFarInGame;
registerEnemy(instanceName);
enemyHolder.attachMovie("Enemy", instanceName, enemiesSoFarInGame);
enemyX = gameData.enemyXPosition[levelNo][newPosition];
enemyY = gameData.enemyYPosition[levelNo][newPosition];
enemyHolder[instanceName]._x = enemyX;
enemyHolder[instanceName]._y = enemyY;
enemyHolder[instanceName]._rotation = gameData.positionRotation[levelNo][newPosition];
enemyHolder[instanceName]._xscale = gameData.positionSize[levelNo][newPosition];
enemyHolder[instanceName]._yscale = gameData.positionSize[levelNo][newPosition];
enemyHolder[instanceName].positionNo = newPosition;
enemyHolder[instanceName].type = newType;
enemyHolder[instanceName].typeType = typeType;
_root.positionDebug = newPosition;
enemyHolder[instanceName].timeBeforeShooting = gameData.timeBeforeShooting[newType] - gameData.fireSpeed[levelNo];
enemyHolder[instanceName].setUp(newType);
}
function enemyFire(type) {
addPlayerSplat(gameData.enemyPaintColour[type]);
}
function gunFired() {
if (0 < noAmmo) {
noAmmo--;
}
var targetHit = 0;
if (0 < noAmmo) {
var counter = 0;
while (counter < gameData.maxEnemies) {
instanceName = enemyName[counter];
if (checkHitEnemy(instanceName) && (enemyHolder[instanceName].enemyHit < 1)) {
enemyHolder[instanceName].hit();
score = score + gameData.scorePerType[enemyHolder[instanceName].type];
targetHit = 1;
}
counter++;
}
}
if (checkHit("powerUp") && (powerUp.onScreen == 1)) {
powerUp.disappear();
noammo = noammo + gameData.startAmmo;
targetHit = 1;
}
if ((targetHit == 0) && (0 < noAmmo)) {
var scale = 0;
var counter = 0;
while (counter < depthIndicatorName.length) {
var indicatorName = depthIndicatorName[counter];
if (backgroundContainer.background[indicatorName].hitTest(_root._xMouse, _root._yMouse, 1)) {
scale = 100 - backgroundContainer.background[indicatorName]._alpha;
break;
}
counter++;
}
if (0 < scale) {
wallSplat(gun._x, gun._y, scale);
}
}
targetHit = 0;
}
function checkHitEnemy(instanceName) {
if (enemyHolder[instanceName].graphics.hitArea.hitTest(_root._xMouse, _root._yMouse, 1)) {
return(1);
}
return(0);
}
function checkHit(instanceName) {
var xDist = Math.abs(gun._x - this[instanceName]._x);
var yDist = Math.abs(gun._y - this[instanceName]._y);
if ((xDist < gameData.gunAccuracy) && (yDist < gameData.gunAccuracy)) {
return(1);
}
return(0);
}
function wallSplat(xPos, yPos, scale) {
noWallSplats++;
var instanceName = ("wallSplat" + noWallSplats);
attachMovie("Wall Splat", instanceName, noWallSplats);
this[instanceName]._x = xPos;
this[instanceName]._y = yPos;
this[instanceName]._xScale = scale;
this[instanceName]._yScale = scale;
splatColour = new Color(instanceName);
splatColour.setRGB(playerColourHex);
}
function addPlayerSplat(colour) {
var playerSplatDistance = (gameData.playerSplatStartDistance - (gameData.playerSplatShift * noPlayerSplats));
var angle = ((Math.Random() * 2) * Math.PI);
var scale = ((Math.Random() * (100 - gameData.minPlayerSplatScale)) + gameData.minPlayerSplatScale);
var playerSplatType = (parseInt(Math.Random() * gameData.maxPlayerSplatTypes) + 1);
var splatXPos = ((playerSplatDistance * Math.cos(angle)) * 1.5);
var splatYPos = (playerSplatDistance * Math.sin(angle));
var splatInstanceName = ("splat_" + noPlayerSplats);
playerSplatContainer.attachMovie("Player Splat " + playerSplatType, splatInstanceName, -100 - noPlayerSplats);
playerSplatContainer[splatInstanceName]._x = splatXPos;
playerSplatContainer[splatInstanceName]._y = splatYPos;
playerSplatContainer[splatInstanceName]._xScale = scale;
playerSplatContainer[splatInstanceName]._yScale = scale;
myColor = new Color(playerSplatContainer[splatInstanceName].back);
myColor.setRGB(colour);
noPlayerSplats++;
if (noPlayerSplats >= gameData.playerSplatsBeforeDead) {
die();
}
}
function removeWallSplat(instanceName) {
removeMovieClip(instanceName);
}
function registerDepthIndicator(instanceName) {
depthIndicatorName.push(instanceName);
}
function submitScore() {
gameDataSubmit.submitData(gameData.submitURL);
}
var levelNo;
var noEnemiesOnScreen;
var enemyName = new Array();
var depthIndicatorName = new Array();
var enemiesSoFarInGame;
var lastTimeCheck;
var gamePlaying;
var enemiesSoFarInLevel;
var noWallSplats;
var noAmmo;
var score;
var speedTestStartTime;
var noPlayerSplats;
var playerSplatDistance;
Instance of Symbol 128 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.gamePlaying) {
_parent.checkAddTarget();
_parent.checkForEndOfLevel();
}
}
Symbol 203 MovieClip Frame 2
setupGame();
Symbol 203 MovieClip Frame 5
startSpeedTest();
Symbol 203 MovieClip Frame 20
endSpeedTest();
Symbol 203 MovieClip Frame 37
stop();
playerMessage = gameData.playerMessage["Too Slow"];
Symbol 203 MovieClip Frame 51
playerMessage = "";
Symbol 203 MovieClip Frame 60
stop();
Symbol 203 MovieClip Frame 70
setUpLevel();
Symbol 203 MovieClip Frame 79
playerMessage = gameData.playerMessage["Begin Level"];
stop();
Symbol 203 MovieClip Frame 80
playerMessage = "";
Symbol 203 MovieClip Frame 85
stop();
startPlaying();
Symbol 203 MovieClip Frame 110
playerMessage = gameData.playerMessage["End Level"];
stop();
Symbol 203 MovieClip Frame 111
playerMessage = "";
Symbol 203 MovieClip Frame 119
nextLevel();
Symbol 203 MovieClip Frame 130
playerMessage = gameData.playerMessage.Dead;
stop();
Symbol 203 MovieClip Frame 131
playerMessage = gameData.playerMessage.Submit;
stop();
stop();