Frame 3
_quality = "high";
Stage.showMenu = false;
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", "true");
Instance of Symbol 16 MovieClip "loadingbar" in Frame 5
onClipEvent (load) {
function loadthis() {
percent = Math.floor((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
_width = (1.28 * percent);
if (percent < 25) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
if (percent == 100) {
_width = 0;
_visible = false;
_parent.surround.gotoAndStop(2);
Key.addListener(_parent.pressAnyKey);
myfunc = null;
}
}
var percent = 0;
var startedFlag = false;
_width = 0;
myfunc = loadthis;
}
onClipEvent (enterFrame) {
myfunc();
}
Instance of Symbol 121 MovieClip in Frame 8
onClipEvent (load) {
_visible = false;
}
Frame 10
if (loadingbar.percent >= 100) {
gotoAndPlay(this._currentframe + 1);
} else {
gotoAndPlay(this._currentframe - 1);
}
Frame 12
stop();
Instance of Symbol 123 MovieClip "flv" in Frame 12
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 125 MovieClip "slidingDoors" in Frame 12
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._currentframe == 15) {
_parent.flv.gotoAndPlay(2);
this.onEnterFrame = function () {
if (_parent.flv._currentframe == 275) {
this._visible = true;
this.gotoAndPlay("out");
_parent.flv.gotoAndStop(275);
this.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
_parent.gotoAndPlay(_parent._currentframe + 1);
}
};
}
};
}
};
}
Frame 13
function restoreMap() {
baddieMap = new Array([0], [0], [0], [0]);
_global.numberOfBaddies = 0;
var _local4 = baddieMapMaster1;
var _local7 = level % 3;
if (_local7 == 1) {
_local4 = baddieMapMaster2;
} else if (_local7 == 2) {
_local4 = baddieMapMaster3;
}
var _local5 = _local4[0].length;
var _local6 = _local4.length;
var _local3 = -1;
while (_local3++ , _local3 != _local6) {
var _local2 = -1;
while (_local2++ , _local2 != _local5) {
baddieMap[_local3][_local2] = _local4[_local3][_local2];
if (baddieMap[_local3][_local2] != 0) {
_global.numberOfBaddies++;
}
}
}
runningBaddies = numberOfBaddies;
baddieMCMap = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
}
baddieMapMaster1 = [[0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0]];
baddieMapMaster2 = [[27, 27, 27, 27, 27, 27, 27], [27, 0, 27, 0, 27, 0, 27], [27, 27, 0, 27, 0, 27, 27], [27, 27, 27, 0, 27, 27, 27]];
baddieMapMaster3 = [[14, 0, 14, 14, 0, 14], [14, 14, 14, 14, 14, 14, 14], [14, 14, 14, 14, 14, 14, 14], [14, 0, 14, 0, 14, 0, 14]];
var ver = "2.0.1.8";
_global.frameRate = 35;
_global.numberOfBaddies = (baddieMapMaster.length * baddieMapMaster[0].length) - 4;
var runningBaddies = numberOfBaddies;
var damageDepth = 0;
var demoMode = false;
var artwork = true;
var cheatMode = false;
var level = 0;
var musicFlag = true;
var flvToShow = 15;
function sendToAFriend(friendsEmail) {
lvOut.sendersName = currentName;
lvOut.sendersEmail = currentEmail;
lvOut.friendsEmail = friendsEmail;
lvOut.score = player.score;
lvOut.sendAndLoad(mailFormURL, lvIn, "POST");
attractMode.gotoAndStop(8);
}
var currentName = "Your Name";
var currentEmail = "Your Email";
var mailFormURL = "mailamate.php";
var lvOut = new LoadVars();
var lvIn = new LoadVars();
MovieClip.prototype.emptyClip = function (name, xPos, yPos, depth) {
var _local2 = this.createEmptyMovieClip(name, depth);
_local2._x = xPos;
_local2._y = yPos;
return(_local2);
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
Color.prototype.setBrightness = function (bright) {
var _local3 = 0;
if (bright > 0) {
_local3 = 256 * (bright / 100);
}
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - Math.abs(bright)));
_local2.rb = (_local2.gb = (_local2.bb = _local3));
this.setTransform(_local2);
};
Color.prototype.reset = function () {
var _local2 = {ra:100, ga:100, ba:100, rb:0, gb:0, bb:0};
this.setTransform(_local2);
};
function plotBaddies() {
restoreMap();
var _local4 = (d = 0);
var _local5 = "baddie";
baddieHandler.baddieStorageArray = new Array();
var _local1;
var _local3 = 0;
while (_local3 < baddieMap.length) {
var _local2 = 0;
while (_local2 < baddieMap[0].length) {
if (baddieMap[_local3][_local2] != 0) {
_local1 = playField.attachMovie(_local5, "baddie" + _local4, d++);
_local1._x = (72 * _local2) + 105;
_local1._y = 36 * _local3;
_local1._visible = (_local1._rotation = false);
_local1.currentStatus = 1;
_local1.mapYPos = _local3;
_local1.mapXPos = _local2;
_local1.ymoveDown = 0;
_local1.animFrame1 = baddieMap[_local3][_local2];
_local1.animFrame2 = _local1.animFrame1 + 1;
_local1.gotoAndStop(_local1.animFrame1);
baddieMCMap[_local3][_local2] = _local1;
if (baddieMap[_local3][_local2] == 1) {
_local1.points = 10;
_local1.dyingFrame = "baddie1DieFrames";
} else if (baddieMap[_local3][_local2] == 14) {
_local1.points = 20;
_local1.dyingFrame = "baddie2DieFrames";
} else {
_local1.points = 30;
_local1.dyingFrame = "baddie3DieFrames";
}
baddieHandler.baddieStorageArray.push("baddie" + _local4);
_local4++;
}
_local2++;
}
_local3++;
}
baddieHandler.startingCounter = numberOfBaddies - 7;
baddieHandler.startingRow = numberOfBaddies;
}
function killBaddies() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < baddieMap.length) {
var _local1 = 0;
while (_local1 < baddieMap[0].length) {
playField.removeMovieClip("baddie" + _local3);
_local1++;
}
_local2++;
}
}
function init() {
bulletSeed.duplicateMovieClip("bullet1", 40);
bulletSeed._visible = false;
damageExplosionSeed.duplicateMovieClip("damageExplosion", 5);
damageExplosionSeed.duplicateMovieClip("damageExplosion2", 6);
damageExplosionSeed._visible = false;
badBulletSeed.duplicateMovieClip("badBullet1", 7);
badBulletSeed.duplicateMovieClip("badBullet2", 8);
badBulletSeed.duplicateMovieClip("badBullet3", 9);
badBulletSeed._visible = false;
resetPlayField();
infobar._visible = false;
}
function attract() {
backgroundImage.gotoAndStop(1);
attractMode.gotoAndPlay(2);
musicFlag = true;
player._visible = (bullet1._visible = false);
baddieHandler.myfunc = null;
attractMode._visible = true;
}
function newGame() {
attractMode._visible = false;
attractMode.gotoAndStop(1);
backgroundImage.gotoAndStop(1);
player._visible = false;
player.myfunc = player.starting;
_global.playField = emptyClip("playField", 32, 88, 3);
plotBaddies();
baddieHandler.myfunc = baddieHandler.starting;
level = 0;
sTracker.startMusic();
}
function restartGame() {
if (player.levelDoneFlag == true) {
sTracker.stopMusic();
level++;
showBetweenLevelFLV();
return(undefined);
}
if ((player.lives == 0) || (player.gameOverFlag == true)) {
sTracker.stopMusic();
attractMode.gotoAndStop(6);
attractMode._visible = true;
} else {
player.myfunc = player.continuing;
baddieHandler.myfunc = baddieHandler.continuing;
}
}
function showBetweenLevelFLV() {
attractMode.gotoAndStop(flvToShow);
attractMode._visible = true;
if ((++flvToShow) == 18) {
flvToShow = 15;
}
}
function flvFinished() {
attractMode._visible = false;
resetPlayField();
player._visible = false;
player.myfunc = player.levelBumped;
plotBaddies();
baddieHandler.myfunc = baddieHandler.starting;
sTracker.startMusic();
if (backgroundImage._currentframe != backgroundImage._totalframes) {
backgroundImage.gotoAndStop(backgroundImage._currentframe + 1);
} else {
backgroundImage.gotoAndStop(2);
}
}
function resetPlayField() {
_global.playField = emptyClip("playField", 32, 88, 3);
badBullet1._visible = (badBullet2._visible = (badBullet3._visible = false));
}
Stage.scaleMode = "noScale";
init();
Instance of Symbol 135 MovieClip "player" in Frame 13
onClipEvent (load) {
function demoMove() {
if ((--demoMoveCnt) <= 0) {
demoMoveCnt = Mf((Mr() * 75) + 25);
demoMoveDir = Mf(Mr() * 3);
}
if (demoMoveDir == 1) {
moveRight();
} else if (demoMoveDir == 0) {
moveLeft();
}
if (barrierNumber == 0) {
shoot();
}
}
function playerInput() {
var _local1 = true;
if (inkey(37)) {
moveLeft();
_local1 = false;
} else if (inkey(39)) {
moveRight();
_local1 = false;
}
if (inkey(32)) {
shoot();
_local1 = false;
}
return(_local1);
}
function moveLeft() {
if (_x > 35) {
_x = (_x - 4);
} else {
_x = 35;
barrierNumber = 0;
demoMoveDir = 1;
}
}
function moveRight() {
if (_x < 611) {
_x = (_x + 4);
} else {
_x = 611;
barrierNumber = (demoMoveDir = 0);
}
}
function shoot() {
if (bulletFlag == false) {
bulletFlag = true;
myfunc2 = bulletHandler;
with (p.bullet1) {
_x = this._x + 25;
_y = this._y - 4;
_visible = true;
gotoAndPlay(1);
}
if (musicFlag == false) {
playerShotSFX.start();
}
}
}
function bulletHandler() {
var bull = p.bullet1;
var checkBarriersFlag = true;
var checkBaddies = true;
bull._y = bull._y - 12;
if (smoke1._visible == false) {
with (smoke1) {
_x = bull._x;
_y = bull._y;
_visible = true;
gotoAndPlay(2);
}
} else if (smoke2._visible == false) {
with (smoke2) {
_x = bull._x;
_y = bull._y + 2;
_visible = true;
gotoAndPlay(2);
}
} else if (smoke3._visible == false) {
with (smoke3) {
_x = bull._x;
_y = bull._y + 4;
_visible = true;
gotoAndPlay(2);
}
} else if (smoke4._visible == false) {
with (smoke4) {
_x = bull._x;
_y = bull._y + 6;
_visible = true;
gotoAndPlay(2);
}
}
if (bull._y <= 80) {
bull.gotoAndPlay(4);
myfunc2 = null;
return(undefined);
}
if (bull._y <= 110) {
checkBarriersFlag = (checkBaddies = false);
} else if (bull._y <= 290) {
checkBarriersFlag = false;
}
if (bull._y < playField._y) {
checkBarriersFlag = (checkBaddies = false);
}
var cnt = -1;
var len = 28;
var bad;
while ((++cnt) != len) {
bad = playField["baddie" + cnt];
if (bad.currentStatus != 0) {
if (bull.hitTest(bad.hitAreaMC)) {
bad.currentStatus = 0;
bad.gotoAndPlay(bad.dyingFrame);
bull.gotoAndPlay(17);
score = score + bad.points;
p.baddieMap[bad.mapYPos][bad.mapXPos] = 0;
p.runningBaddies--;
if (p.runningBaddies != 0) {
p.baddieHandler.moveDelayStore = int(p.runningBaddies / 10);
p.baddieHandler.baddieKilled(bad);
}
myfunc2 = null;
myfunc3 = updateScore;
return;
}
}
}
}
function updateScore() {
p.scoreInfoBar.score.text = score;
myfunc3 = null;
if (musicFlag == false) {
baddieHitSFX.start();
}
if (p.runningBaddies <= 0) {
levelComplete();
}
}
function levelComplete() {
levelDoneFlag = true;
with (p.baddieHandler) {
myfunc = null;
}
myfunc = killed;
}
function updateLives() {
var _local2 = 0;
while (_local2++ , _local2 != 4) {
var _local1 = p.infobar["life" + _local2];
if (_local2 <= lives) {
_local1._visible = true;
} else {
_local1._visible = false;
}
}
}
function updateBaddieBoundaries() {
var map = p.baddieMap;
if (currentColLeft != currentColRight) {
if (map[0][currentColLeft] == 0) {
if (map[1][currentColLeft] == 0) {
if (map[2][currentColLeft] == 0) {
if (map[3][currentColLeft] == 0) {
currentColLeft++;
with (p.baddieHandler) {
leftEdge = leftEdge - 54;
currentColLeft = this.currentColLeft;
}
}
}
}
}
if (map[0][currentColRight] == 0) {
if (map[1][currentColRight] == 0) {
if (map[2][currentColRight] == 0) {
if (map[3][currentColRight] == 0) {
currentColRight--;
with (p.baddieHandler) {
rightEdge = rightEdge + 54;
currentColRight = this.currentColRight;
}
}
}
}
}
}
if (bottomRow != 0) {
var qflag = false;
var c = (currentColLeft - 1);
while ((++c) < currentColRight) {
if (map[bottomRow][c] != 0) {
qflag = true;
break;
}
}
if (qflag == false) {
playField["cmh" + bottomRow].removeMovieClip();
bottomRow--;
p.baddieHandler.bottomRow = bottomRow;
p.baddieHandler.bottomRowPosition = p.baddieHandler.bottomRowPosition - 30;
}
}
}
function starting() {
if ((++startingCnt) == (2 * frameRate)) {
startingCnt = 0;
_x = 115;
_y = 372;
this.gotoAndStop(1);
_visible = true;
with (p.bullet1) {
_x = this._x + 25;
_y = this._y - 4;
_visible = true;
gotoAndStop(17);
}
currentColLeft = 0;
currentColRight = 6;
bottomRow = 4;
p.runningBaddies = numberOfBaddies;
musicFlag = p.musicFlag;
p.damageDepth = 0;
gameOverFlag = (levelDoneFlag = false);
if (p.demoMode == false) {
myfunc = master;
} else {
demoMoveCnt = 40;
demoMoveDir = 1;
myfunc = demoMaster;
}
} else if (startingCnt == 1) {
resetHUD();
}
}
function resetHUD() {
score = 0;
p.scoreInfoBar.score.text = score;
lives = 3;
updateLives();
}
function continuing() {
if ((++startingCnt) == frameRate) {
startingCnt = 0;
_x = 115;
_y = 372;
p.bullet1._x = this._x + 25;
p.bullet1._y = this._y - 4;
p.bullet1._visible = true;
p.bullet1.gotoAndStop(17);
this.gotoAndStop(1);
_visible = true;
var _local2 = _x + 70;
if ((_local2 >= 232) && (_local2 <= 322)) {
barrierNumber = 1;
} else if ((_local2 >= 379) && (_local2 <= 469)) {
barrierNumber = 2;
} else if ((_local2 >= 525) && (_local2 <= 615)) {
barrierNumber = 3;
} else if ((_local2 >= 672) && (_local2 <= 762)) {
barrierNumber = 4;
} else {
barrierNumber = 0;
}
playerKilled = false;
myfunc2 = null;
myfunc = master;
p.pausedKeyCheckDelay = 0;
p.pauseFlag = false;
updateLives();
}
}
function levelBumped() {
if ((++startingCnt) == frameRate) {
startingCnt = 0;
_x = 115;
_y = 372;
p.bullet1._x = this._x + 25;
p.bullet1._y = this._y - 4;
p.bullet1._visible = true;
p.bullet1.gotoAndStop(17);
this.gotoAndStop(1);
_visible = true;
var _local2 = _x + 70;
if ((_local2 >= 232) && (_local2 <= 322)) {
barrierNumber = 1;
} else if ((_local2 >= 379) && (_local2 <= 469)) {
barrierNumber = 2;
} else if ((_local2 >= 525) && (_local2 <= 615)) {
barrierNumber = 3;
} else if ((_local2 >= 672) && (_local2 <= 762)) {
barrierNumber = 4;
} else {
barrierNumber = 0;
}
currentColLeft = 0;
currentColRight = 6;
bottomRow = 4;
p.runningBaddies = numberOfBaddies;
playerKilled = (gameOverFlag = (levelDoneFlag = false));
updateLives();
myfunc2 = null;
myfunc = master;
}
}
function master() {
if (playerKilled == true) {
p.bullet1.gotoAndPlay(17);
myfunc2 = null;
this.gotoAndPlay(7);
playerKilledSFX.start();
xtraLifeArrays[livesOffset] = 0;
lives--;
updateLives();
myfunc = killed;
return(undefined);
}
myfunc3();
myfunc2();
updateBaddieBoundaries();
playerInput();
}
function demoMaster() {
if (playerKilled == true) {
p.bullet1.gotoAndPlay(17);
myfunc2 = null;
this.gotoAndPlay(7);
lives--;
updateLives();
myfunc = killed;
return(undefined);
}
myfunc3();
myfunc2();
updateBaddieBoundaries();
demoMove();
}
function killed() {
p.baddieHandler.myfunc = null;
p.bullet1.gotoAndPlay(17);
p.badBullet1._visible = (p.badBullet2._visible = (p.badBullet3._visible = false));
if ((++dyingCount) >= (frameRate * 2)) {
dyingCount = 0;
if (p.demoMode != false) {
myfunc = demoEnd;
} else {
myfunc = null;
p.restartGame();
}
}
}
function demoEnd() {
myfunc = null;
_visible = false;
p.bullet1.gotoAndPlay(17);
smoke1._visible = (smoke2._visible = (smoke3._visible = (smoke4._visible = false)));
removeMovieClip(playField);
removeMovieClip(damage);
removeMovieClip(damage2);
p.badBullet1._visible = (p.badBullet2._visible = (p.badBullet3._visible = (p.mystery._visible = false)));
p.barrier1._visible = (p.barrier2._visible = (p.barrier3._visible = (p.barrier4._visible = false)));
p.backgroundImage.gotoAndStop(1);
p.attractMode._visible = true;
p.attractMode.gotoAndPlay(p.demoMode);
}
var p = _parent;
_visible = false;
var inkey = Key.isDown;
var Mf = Math.floor;
var Mr = Math.random;
var smoke1 = p.smoke1;
var smoke2 = p.smoke3;
var smoke3 = p.smoke3;
var smoke4 = p.smoke4;
var bulletFlag = false;
var barrierNumber = 0;
var score = 0;
var currentColLeft = 0;
var currentColRight = 6;
var bottomRow = 4;
var startingCnt = 0;
var demoMoveCnt = 0;
var demoMoveDir = 1;
var playerKilled = false;
var gameOverFlag = false;
var dyingCount = 0;
var killedBaddieType = 0;
var levelDoneFlag = false;
var playerAnim = 3;
var musicFlag = p.musicFlag;
mysteryGoto = new Array(2, 100, 23, 150, 44, 200, 65, 250);
xtraLifeArrays = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var lives = 3;
var livesOffset = 0;
var playerShotSFX = new Sound(this);
playerShotSFX.attachSound("mva_missile1SFX");
var playerKilledSFX = new Sound(this);
playerKilledSFX.attachSound("mva_explosion5SFX");
var baddieHitSFX = new Sound(this);
baddieHitSFX.attachSound("mva_explosionSFX");
var myfunc = null;
var myfunc2 = null;
var myfunc3 = null;
var myPauseFunc = null;
}
onClipEvent (enterFrame) {
myfunc();
}
Instance of Symbol 73 MovieClip [damageExplosion] "damageExplosionSeed" in Frame 13
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 247 MovieClip "attractMode" in Frame 13
onClipEvent (load) {
function playButtonPressed() {
this.gotoAndStop(5);
p.player.resetHUD();
p.player._visible = false;
p.player.bulletFlag = false;
p.player.myfunc = null;
p.player.myfunc2 = null;
p.infobar._visible = true;
p.scoreInfoBar._visible = true;
p.musicFlag = false;
p.sTracker.myfunc = p.sTracker.killMusic;
p.gotoAndStop(startGame);
delayCnt = 0;
this.onEnterFrame = getReadyDelay;
var _local2 = int(Math.random() * 99);
if (_local2 < 33) {
presidentSFX.start();
} else if (_local2 > 66) {
generalSFX.start();
} else {
mva_general2SFX.start();
}
}
function getReadyDelay() {
if ((++delayCnt) == (3 * frameRate)) {
delayCnt = 0;
delete this.onEnterFrame;
p.gotoAndPlay("Go");
}
}
var p = _parent;
var delayCnt = 0;
var generalSFX = new Sound(this);
generalSFX.attachSound("mva_general3SFX");
var presidentSFX = new Sound(this);
presidentSFX.attachSound("mva_president1SFX");
var mva_general2SFX = new Sound(this);
mva_general2SFX.attachSound("mva_general2SFX");
}
Instance of Symbol 273 MovieClip "baddieHandler" in Frame 13
onClipEvent (load) {
function moveBaddies() {
var _local4 = moveDownQueue.length;
if (_local4 > 0) {
var _local3 = -1;
var _local2;
while (_local3++ , _local3 != _local4) {
_local2 = moveDownQueue[_local3];
_local2._y = _local2._y + 4;
_local2.ymoveDown = _local2.ymoveDown - 4;
if (_local2._y > 500) {
_local2.currentStatus = 0;
_local2.gotoAndPlay(_local2.dyingFrame);
p.baddieMap[_local2.mapYPos][_local2.mapXPos] = 0;
if ((--runningBaddies) <= 0) {
p.player.levelComplete();
return(undefined);
}
}
if (_local2.ymoveDown <= 0) {
moveDownQueue.splice(_local3, 1);
_local3--;
_local4--;
}
}
}
if (verticalMovement != 0) {
verticalMovement--;
playField._y++;
var _local6 = playField.getRect();
bottomRowHeight = _local6.yMax + playField._y;
} else {
if (bottomRowHeight >= 290) {
}
if ((--moveDelay) <= 0) {
if ((++sfxDelay) == 3) {
sfxDelay = 0;
var _local5 = -1;
while (_local5++ , _local5 < 7) {
var _local1 = playField["baddie" + _local5];
if (_local1.currentStatus != 0) {
if (_local1._currentframe == _local1.animFrame1) {
_local1.gotoAndStop(_local1.animFrame2);
} else if (_local1._currentframe == _local1.animFrame2) {
_local1.gotoAndStop(_local1.animFrame1);
}
}
}
} else if (sfxDelay == 2) {
var _local5 = numberOfBaddies - 8;
while (_local5++ , _local5 < numberOfBaddies) {
var _local1 = playField["baddie" + _local5];
if (_local1.currentStatus != 0) {
if (_local1._currentframe == _local1.animFrame1) {
_local1.gotoAndStop(_local1.animFrame2);
} else if (_local1._currentframe == _local1.animFrame2) {
_local1.gotoAndStop(_local1.animFrame1);
}
}
}
} else if (sfxDelay == 1) {
var _local5 = 6;
while (_local5++ , _local5 < 21) {
var _local1 = playField["baddie" + _local5];
if (_local1.currentStatus != 0) {
if (_local1._currentframe == _local1.animFrame1) {
_local1.gotoAndStop(_local1.animFrame2);
} else if (_local1._currentframe == _local1.animFrame2) {
_local1.gotoAndStop(_local1.animFrame1);
}
}
}
}
if (direction == 1) {
playField._x = playField._x + speed;
if (playField._x >= rightEdge) {
playField._x = rightEdge;
direction = 2;
}
} else {
if (direction == 2) {
moveDelay = 0;
playField._y = playField._y - 16;
if (playField._y <= 88) {
playField._y = 88;
direction = 3;
}
return(undefined);
}
if (direction == 3) {
playField._x = playField._x - speed;
if (playField._x <= leftEdge) {
playField._x = leftEdge;
direction = 4;
}
} else if (direction == 4) {
moveDelay = 0;
playField._y = playField._y + 16;
if (playField._y >= 152) {
playField._y = 152;
direction = 1;
}
return(undefined);
}
}
moveDelay = moveDelayStore - 1;
if (moveDelayStore <= 0) {
if (p.runningBaddies != 1) {
if (p.level > 3) {
speed = 8 - Math.round(p.runningBaddies / 7);
} else {
speed = 7 - Math.round(p.runningBaddies / 7);
}
} else {
speed = 10;
}
}
}
}
}
function baddieKilled(baddieMC) {
var _local2 = baddieMC.mapYPos;
var _local3 = baddieMC.mapXPos;
var _local5;
while (_local2-- , _local2 > -1) {
badMC = _parent.baddieMCMap[_local2][_local3];
if (badMC.currentStatus == 1) {
badMC.ymoveDown = 36;
moveDownQueue.push(badMC);
}
}
}
function handleBullets() {
if (bulletFlag1 == true) {
bulletFlag1 = moveBullet(p.badBullet1);
}
if (bulletFlag2 == true) {
bulletFlag2 = moveBullet(p.badBullet2);
}
if (bulletFlag3 == true) {
bulletFlag3 = moveBullet(p.badBullet3);
}
if (bulletFlag1 == true) {
if (bulletFlag2 == true) {
if (bulletFlag3 == true) {
return(undefined);
}
}
}
if ((++bulletTriggerCnt) >= bulletTriggerValue) {
bulletTriggerCnt = 0;
var _local1 = Mf((playerX - playField._x) / 16);
if (_local1 < 0) {
_local1 = 0;
} else if (_local1 > 11) {
_local1 = 11;
}
var _local2 = Mf(Mr() * _local1);
_local2 = _local2 + (21 + currentColLeft);
var _local6 = _local2 - 7;
var _local3 = _local6 - 7;
var _local4 = _local3 - 7;
_local4 = _local3 - 7;
var _local8 = _local4 - 7;
if (playField["baddie" + _local2] != undefined) {
baddieShooting = playField["baddie" + _local2];
} else if (playField["baddie" + _local6] != undefined) {
baddieShooting = playField["baddie" + _local6];
} else if (playField["baddie" + _local3] != undefined) {
baddieShooting = playField["baddie" + _local3];
} else if (playField["baddie" + _local4] != undefined) {
baddieShooting = playField["baddie" + _local4];
} else if (playField["baddie" + _local8] != undefined) {
baddieShooting = playField["baddie" + _local8];
} else {
return(undefined);
}
var _local7 = playField._x;
var _local5 = playField._y;
if (bulletFlag1 == false) {
bulletFlag1 = true;
bad = p.badBullet1;
bad._x = _local7 + (baddieShooting._x + 14);
bad._y = _local5 + (baddieShooting._y + 14);
bad._visible = true;
triggerBullet(bad);
} else if (bulletFlag2 == false) {
bulletFlag2 = true;
bad = p.badBullet2;
bad._x = _local7 + (baddieShooting._x + 14);
bad._y = _local5 + (baddieShooting._y + 14);
bad._visible = true;
triggerBullet(bad);
} else if (bulletFlag3 == false) {
bulletFlag3 = true;
bad = p.badBullet3;
bad._x = _local7 + (baddieShooting._x + 14);
bad._y = _local5 + (baddieShooting._y + 14);
bad._visible = true;
triggerBullet(bad);
}
}
}
function triggerBullet(mc) {
if (musicFlag == false) {
baddieLazerSFX.start();
}
}
function moveBullet(mc) {
mc._y = mc._y + 6;
if (mc._y > 400) {
with (p.damageExplosion2) {
_x = mc._x;
_y = mc._y;
_visible = true;
gotoAndPlay(1);
}
mc._visible = false;
if (musicFlag == false) {
metalExplosionSFX.start();
}
return(false);
}
if (mc._y > 374) {
if (mc.hitTest(player.hitAreaMC)) {
if (cheatMode != true) {
player.playerKilled = true;
myfunc = stoping;
}
return(false);
}
} else if (mc._y > 290) {
}
if (mc.hitTest(p.bullet1.hitAreaMC)) {
with (p.damageExplosion2) {
_x = mc._x;
_y = mc._y;
_visible = true;
gotoAndPlay(1);
}
mc._visible = false;
p.bullet1.gotoAndPlay(17);
with (player) {
bulletFlag = false;
myfunc2 = null;
}
if (musicFlag == false) {
metalExplosionSFX.start();
}
return(false);
}
return(true);
}
function starting() {
playField["baddie" + startingCounter]._visible = true;
player.playerKilled = false;
moveDownQueue = new Array();
if ((++startingCounter) >= startingRow) {
startingRow = startingRow - 7;
startingCounter = startingRow - 7;
if (startingRow <= 0) {
direction = 3;
speed = 2;
moveDelayStore = (moveDelayStore = 10);
verticalMovement = (currentColLeft = 0);
leftEdge = -48;
rightEdge = 80;
bottomRow = 4;
bottomRowHeight = playField._y + playField._height;
currentColRight = 7;
startingCounter = numberOfBaddies - 7;
startingRow = numberOfBaddies;
sfxDelay = 0;
bulletFlag1 = (bulletFlag2 = (bulletFlag3 = false));
bulletTriggerCnt = -60;
level = p.level;
musicFlag = p.musicFlag;
bulletTriggerValue = 18 - (level * 4);
if (bulletTriggerValue < 2) {
bulletTriggerValue = 2;
}
myfunc = master;
}
}
}
function continuing() {
bulletFlag1 = (bulletFlag2 = (bulletFlag3 = false));
bulletTriggerCnt = -90;
myfunc = master;
}
function master() {
playerX = player._x + 2;
playerRight = playerX + pWidth;
moveBaddies();
handleBullets();
}
function stoping() {
p.badBullet1._visible = (p.badBullet2._visible = (p.badBullet3._visible = (p.mystery._visible = false)));
myfunc = (myfunc2 = null);
}
function ensureNotified() {
with (player) {
playerKilled = (gameOverFlag = true);
}
}
var p = _parent;
_visible = false;
var Mf = Math.floor;
var Mr = Math.random;
var level = p.level;
var musicFlag = p.musicFlag;
var cheatMode = p.cheatMode;
var baddieStorageArray = new Array();
var direction = 1;
var speed = 2;
var moveDelayStore = 10;
var moveDelay = moveDelayStore;
var verticalMovement = 0;
var leftEdge = 33;
var rightEdge = -27;
var currentColLeft = 0;
var currentColRight = 7;
var bottomRow = 4;
var bottomRowHeight = (playField._y + playField._height);
var moveDownQueue:Array;
var player = p.player;
var pWidth = player._width;
var playerX = player._x;
var playerRight = (player._x + pWidth);
var startingCounter = (numberOfBaddies - 7);
var startingRow = numberOfBaddies;
var mysteryCnt = 0;
var type1Frame = 1;
var type2Frame = 14;
var type3Frame = 27;
var bulletFlag1 = false;
var bulletFlag2 = false;
var bulletFlag3 = false;
var bulletTriggerCnt = 0;
var bulletTriggerValue = 30;
var baddieShooting = 0;
var sfxDelay = 0;
var baddieLazerSFX = new Sound(_root);
baddieLazerSFX.attachSound("mva_disintegrate2SFX");
var metalExplosionSFX = new Sound(_root);
metalExplosionSFX.attachSound("mva_disintegrate3SFX");
var myfunc = null;
var myfunc2 = null;
var myPauseFunc = null;
}
onClipEvent (enterFrame) {
myfunc();
}
Instance of Symbol 275 MovieClip "sTracker" in Frame 13
onClipEvent (load) {
function startMusic() {
mod.start(0, 99999);
}
function stopMusic() {
mod.stop();
}
_visible = false;
var mod = new Sound(this);
mod.attachSound("inGameMOD");
}
Frame 14
attract();
stop();
Frame 15
stop();
Frame 16
newGame();
stop();
Symbol 11 MovieClip [backgroundMask] Frame 1
stop();
Symbol 16 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 2
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 28 MovieClip [barrierSeg1] Frame 1
stop();
Instance of Symbol 27 MovieClip "hitAreaMC" in Symbol 28 MovieClip [barrierSeg1] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 28 MovieClip [barrierSeg1] Frame 15
this.removeMovieClip();
Symbol 73 MovieClip [damageExplosion] Frame 1
_rotation = int(Math.random() * 360);
Symbol 73 MovieClip [damageExplosion] Frame 14
_visible = false;
_rotation = false;
stop();
Instance of Symbol 76 MovieClip "hitAreaMC" in Symbol 111 MovieClip [baddie] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 111 MovieClip [baddie] Frame 50
removeMovieClip(this);
stop();
Symbol 111 MovieClip [baddie] Frame 66
removeMovieClip(this);
stop();
Symbol 111 MovieClip [baddie] Frame 80
removeMovieClip(this);
stop();
Symbol 125 MovieClip Frame 15
_visible = false;
stop();
Symbol 125 MovieClip Frame 35
_visible = false;
stop();
Symbol 131 MovieClip Frame 1
stop();
Instance of Symbol 126 MovieClip in Symbol 131 MovieClip Frame 2
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._alpha <= 0) {
this._alpha = 0;
_visible = false;
delete this.onEnterFrame;
} else {
this._alpha = this._alpha - 10;
}
};
}
Instance of Symbol 129 MovieClip in Symbol 131 MovieClip Frame 3
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._alpha <= 0) {
this._alpha = 0;
_visible = false;
delete this.onEnterFrame;
} else {
this._alpha = this._alpha - 10;
}
};
}
Instance of Symbol 130 MovieClip in Symbol 131 MovieClip Frame 4
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._alpha <= 0) {
this._alpha = 0;
_visible = false;
delete this.onEnterFrame;
} else {
this._alpha = this._alpha - 10;
}
};
}
Symbol 135 MovieClip Frame 1
if (playerKilled == true) {
this.gotoAndPlay(7);
}
Instance of Symbol 76 MovieClip "hitAreaMC" in Symbol 135 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 135 MovieClip Frame 17
stop();
Symbol 151 MovieClip Frame 1
_visible = false;
stop();
Symbol 151 MovieClip Frame 12
_visible = false;
stop();
Instance of Symbol 76 MovieClip "hitAreaMC" in Symbol 158 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 158 MovieClip Frame 3
if (_parent.player.bulletFlag == true) {
gotoAndPlay (1);
} else {
gotoAndPlay (17);
}
Symbol 158 MovieClip Frame 4
_rotation = (Math.random() * 360);
Symbol 158 MovieClip Frame 17
_visible = false;
_parent.player.bulletFlag = false;
_rotation = 0;
stop();
Symbol 175 MovieClip Frame 15
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 20
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 1
stop();
Symbol 228 Button
on (release) {
getURL ("http://www.facebook.com/pages/Monsters-vs-Aliens/34920037265", "_blank");
}
Symbol 233 Button
on (release) {
getURL ("http://twitter.com/mvamovie", "_blank");
}
Symbol 247 MovieClip Frame 1
_visible = false;
stop();
Symbol 247 MovieClip Frame 2
_root.infobar._visible = false;
_root.scoreInfoBar._visible = false;
var music = new Sound(this);
music.attachSound("mva_music1SFX");
music.start();
stop();
Instance of Symbol 176 MovieClip in Symbol 247 MovieClip Frame 2
onClipEvent (load) {
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
this.onPress = function () {
snd.start();
delete this.onPress;
_parent.playButtonPressed();
};
}
Instance of Symbol 178 MovieClip in Symbol 247 MovieClip Frame 2
onClipEvent (load) {
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
this.onPress = function () {
snd.start();
_parent.gotoAndPlay(_parent._currentframe + 1);
};
}
Symbol 247 MovieClip Frame 3
stop();
Symbol 247 MovieClip Frame 5
stop();
Symbol 247 MovieClip Frame 6
var snd = new Sound(this);
snd.attachSound("mva_gallaxhar3SFX");
snd.start();
_root.barrier1._visible = (_root.barrier2._visible = (_root.barrier3._visible = (_root.barrier4._visible = false)));
_root.bullet1.gotoAndPlay(17);
_root.playField.removeMovieClip();
_root.damage.removeMovieClip();
_root.damage2.removeMovieClip();
_root.baddieHandler.myfunc = null;
_root.badBullet1._visible = (_root.badBullet2._visible = (_root.badBullet3._visible = (_root.badBullet4._visible = (_root.badBullet5._visible = false))));
_root.infobar._visible = false;
_root.scoreInfoBar._visible = false;
score.text = _root.player.score;
stop();
Instance of Symbol 194 MovieClip in Symbol 247 MovieClip Frame 6
onClipEvent (load) {
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
this.onPress = function () {
snd.start();
delete this.onPress;
_root.gotoAndPlay("resetGame");
};
}
Instance of Symbol 199 MovieClip in Symbol 247 MovieClip Frame 6
onClipEvent (load) {
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
this.onPress = function () {
snd.start();
delete this.onPress;
_parent.gotoAndPlay(_parent._currentframe + 1);
};
}
Symbol 247 MovieClip Frame 7
function initSubmitButton() {
submitButton._alpha = 100;
submitButton.onPress = formcheck;
}
function killSubmitButton() {
submitButton._alpha = 50;
delete submitButton.onPress;
}
function validate(address) {
if (address.length >= 7) {
if (address.indexOf("@") > 0) {
if ((address.indexOf("@") + 2) < address.lastIndexOf(".")) {
if (address.lastIndexOf(".") < (address.length - 2)) {
return(true);
}
}
}
}
return(false);
}
function formcheck() {
if (((input1.text == null) || (input1.text == "Your Name")) || (input1.text == "")) {
action = "";
errorWindow.gotoAndStop(1);
errorWindow._visible = true;
sndError.start();
killSubmitButton();
return(undefined);
}
if (!validate(input2.text)) {
action = "";
errorWindow.gotoAndStop(2);
errorWindow._visible = true;
sndError.start();
killSubmitButton();
return(undefined);
}
if (!validate(input3.text)) {
action = "";
errorWindow.gotoAndStop(3);
errorWindow._visible = true;
sndError.start();
killSubmitButton();
return(undefined);
}
_root.sendToAFriend(input3.text);
killSubmitButton();
snd.start();
}
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
var sndError = new Sound(this);
sndError.attachSound("mva_button1SFX");
stop();
action = "send";
t1 = _root.currentName;
t2 = _root.currentEmail;
t3 = "Friends email";
input1.text = t1;
input2.text = t2;
input3.text = t3;
input1.onKillFocus = function () {
if (input1.text == "") {
input1.text = t1;
} else {
_root.currentName = input1.text;
}
};
input2.onKillFocus = function () {
if (input2.text == "") {
input2.text = t2;
} else {
_root.currentEmail = input2.text;
}
};
input3.onKillFocus = function () {
if (input3.text == "") {
input3.text = t3;
}
};
input1.onSetFocus = function () {
errorWindow._visible = false;
initSubmitButton();
if ((input1.text = t1)) {
input1.text = "";
}
if (input2.text == "") {
input2.text = t2;
}
if (input3.text == "") {
input3.text = t3;
}
};
input2.onSetFocus = function () {
errorWindow._visible = false;
initSubmitButton();
if (input1.text == "") {
input1.text = t1;
}
if (input2.text == t2) {
input2.text = "";
}
if (input3.text == "") {
input3.text = t3;
}
};
input3.onSetFocus = function () {
errorWindow._visible = false;
initSubmitButton();
if (input1.text == "") {
input1.text = t1;
}
if (input2.text == "") {
input2.text = t2;
}
if (input3.text == t3) {
input3.text = "";
}
};
input1.tabIndex = 1;
input2.tabIndex = 2;
input3.tabIndex = 3;
initSubmitButton();
Instance of Symbol 221 MovieClip in Symbol 247 MovieClip Frame 7
onClipEvent (load) {
var kludge = int((Math.random() * this._totalframes) - 1);
if (kludge == 0) {
kludge = 1;
}
this.gotoAndStop(kludge);
}
Instance of Symbol 194 MovieClip in Symbol 247 MovieClip Frame 7
onClipEvent (load) {
var snd = new Sound(this);
snd.attachSound("mva_button2SFX");
this.onPress = function () {
snd.start();
delete this.onPress;
_root.gotoAndPlay("resetGame");
};
}
Instance of Symbol 223 MovieClip "submitButton" in Symbol 247 MovieClip Frame 7
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 239 MovieClip "errorWindow" in Symbol 247 MovieClip Frame 7
onClipEvent (load) {
_visible = false;
this.gotoAndStop(1);
}
Symbol 247 MovieClip Frame 8
stop();
Instance of Symbol 242 MovieClip in Symbol 247 MovieClip Frame 15
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._currentframe == 364) {
this.gotoAndStop(364);
delete this.onEnterFrame;
_root.flvFinished();
}
};
}
Instance of Symbol 244 MovieClip in Symbol 247 MovieClip Frame 16
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.gotoAndStop(this._totalframes);
delete this.onEnterFrame;
_root.flvFinished();
}
};
}
Instance of Symbol 246 MovieClip in Symbol 247 MovieClip Frame 17
onClipEvent (load) {
this.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.gotoAndStop(this._totalframes);
delete this.onEnterFrame;
_root.flvFinished();
}
};
}
Symbol 253 MovieClip Frame 1
stop();
Instance of Symbol 253 MovieClip in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
getURL ("http://www.monstersvsaliens.com/", "_blank");
};
}