Frame 1
play();
Frame 2
function fnCheckLevelEnd() {
if (oTimer.getTimerOn() == false) {
if (oLauncher.getEnemyCount() == 0) {
fnEndLevel(true);
}
}
}
function fnClearStage() {
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
scrollingObjs_array[_local1].removeMe();
_local1++;
}
scrollingObjs_array.splice(0);
var _local2 = trailingObjs_array.length;
j = 0;
while (j < trailingObjs_array.length) {
trailingObjs_array[j].removeMe();
if (trailingObjs_array.length != _local2) {
_local2 = trailingObjs_array.length;
j--;
}
j++;
}
trailingObjs_array.splice(0);
}
function fnEndLevel(win) {
fnPauseGame();
fnClearStage();
var _local2 = oLevel.getCurrent();
if (win == true) {
var _local1 = oLevel.getCurrent() + 1;
oLevel.setCurrent(_local1);
if (_local1 > oLevel.getMaxLevels()) {
gotoAndStop ("end");
if (oMusic.pState == "on") {
AudioMusic_MC.gotoAndPlay("endPlay");
}
whichMusic = "end";
} else {
if (oMusic.pState == "on") {
AudioMusic_MC.gotoAndPlay("transPlay");
}
whichMusic = "trans";
gotoAndStop("intro" + _local1);
}
} else {
AudioMusic_MC.gotoAndPlay("mainStop");
AudioSFX_MC.gotoAndPlay("fail");
gotoAndStop("fail" + _local2);
}
}
function fnExitHelp() {
rHelpShown = true;
help_mc.gotoAndStop("base");
if (oLevel.getCurrentLevStart() == false) {
fnStartLevel();
} else {
fnResumeGame();
}
}
function fnFadeUp() {
fader_mc.gotoAndPlay("fade_up");
}
function fnGameLoaded() {
whichMusic = "intro";
delete rTitleShown;
fnResetGameVars();
gotoAndStop ("loaded");
}
function fnPauseGame() {
rGameOn = false;
Key.removeListener(oKeyListener);
Mouse.removeListener(oMouseListener);
oLauncher.pause();
oWeaponsMenu.pause();
oAnakin.pause();
oTimer.pause();
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
scrollingObjs_array[_local1].pause();
_local1++;
}
_local1 = 0;
while (_local1 < trailingObjs_array.length) {
trailingObjs_array[_local1].pause();
_local1++;
}
if (oLevel.getCurrent() == 2) {
if (buzzDroidAlert_mc._currentframe != 1) {
buzzDroidAlert_mc.stop();
}
if (hitObiWanAlert_mc._currentframe != 1) {
hitObiWanAlert_mc.stop();
}
}
}
function fnPlayAgain() {
fnResetGameVars();
gotoAndStop ("lev1");
}
function fnRemoveObj(objname) {
delete eval (objname);
}
function fnResetGameVars() {
rGameOn = false;
oLevel.reset();
oScore.reset();
oJediWeapons.reset();
oAnakin.resetForGame();
oObiWan.resetForGame();
}
function fnResumeGame(startlevel) {
rGameOn = true;
oWeaponsMenu.resume();
oAnakin.resume();
Key.addListener(oKeyListener);
Mouse.addListener(oMouseListener);
if (startlevel == true) {
oTimer.startTimer();
} else {
oTimer.resume();
}
oLauncher.resume();
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
scrollingObjs_array[_local1].resume();
_local1++;
}
_local1 = 0;
while (_local1 < trailingObjs_array.length) {
trailingObjs_array[_local1].resume();
_local1++;
}
if (oLevel.getCurrent() == 2) {
if (buzzDroidAlert_mc._currentframe != 1) {
buzzDroidAlert_mc.play();
}
if (hitObiWanAlert_mc._currentframe != 1) {
hitObiWanAlert_mc.play();
}
}
}
function fnSetUpGame() {
oAnakin.setMaxMouseDist();
Laser.prototype.setXMax();
Torpedo.prototype.setXMax();
EnemyWeapon.prototype.setPositions();
oLauncher.setUp();
rGameSetUp = true;
}
function fnSetUpInterface() {
oLauncher.setUp();
oWeaponsMenu.setUp();
}
function fnSetUpLevel2() {
var vTopMarkerCount = oObiWan.getMarkerCount("top");
var vBtmMarkerCount = oObiWan.getMarkerCount("btm");
var i;
i = 4;
while (i <= vTopMarkerCount) {
var oPoint = oObiWan.getGlobalMarkerCoords(("top" + i) + "Marker_mc");
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
oPoint.pTargetSlot = i - 1;
oPoint.pTargetRow = "top";
oLauncher.tryLaunch(oPoint);
i++;
}
i = 3;
while (i <= vBtmMarkerCount) {
var oPoint = oObiWan.getGlobalMarkerCoords(("btm" + i) + "Marker_mc");
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
oPoint.pTargetSlot = i - 1;
oPoint.pTargetRow = "btm";
oLauncher.tryLaunch(oPoint);
i++;
}
}
function fnShowHelp() {
if (rGameOn == true) {
fnPauseGame();
}
help_mc.gotoAndStop("show");
}
function fnStartLevel() {
if (oMusic.pState == "on") {
AudioMusic_MC.gotoAndPlay("mainPlay");
}
whichMusic = "main";
oAnakin.setObjRef();
oAnakin.resetForLevel();
oObiWan.resetForLevel();
oLauncher.reset();
var i = 0;
i = 0;
while (i < oLauncher.allEnemyTypes_array.length) {
eval ("Enemy_" + oLauncher.allEnemyTypes_array[i]).prototype.setPositions();
i++;
}
Bomb.prototype.setYMax();
oLevel.currentLevStarted();
var vLev = oLevel.getCurrent();
switch (vLev) {
case 1 :
oBg1 = new BgElement("bg1", 0.15, "oBg1");
oBg2 = new BgElement("bg2", 0.9, "oBg2");
scrollingObjs_array.push(oBg1, oBg2);
break;
case 2 :
oObiWan.resetLevel2();
oBg1 = new BgElement("bg1", 0.15, "oBg1");
oBg2 = new BgElement("bg2", 0.9, "oBg2");
scrollingObjs_array.push(oBg1, oBg2);
fnSetUpLevel2();
break;
case 3 :
BattleDroidLaser.prototype.setPositions();
oBg = new BgElement("bg", 1.1, "oBg");
scrollingObjs_array.push(oBg);
}
fnResumeGame(true);
}
function fnTitleLoaded() {
delete rTitleEndFrame;
gotoAndPlay ("title");
}
_global.gSFROOT = this;
rTitleEndFrame = 8;
rTitleShown = false;
scrollingObjs_array = new Array();
trailingObjs_array = new Array();
var rGameSetUp = false;
var rHelpShown = false;
var rGameOn;
var whichMusic = "intro";
Math.randomInteger = function (lowInt, highInt) {
return(lowInt + Math.floor(Math.random() * Math.round((highInt + 1) - lowInt)));
};
Math.roundToDecimal = function (num, decimalplaces) {
var _local2 = decimalplaces;
var _local1;
if (_local2 != 0) {
_local1 = Math.round(num * Math.pow(10, _local2)) / Math.pow(10, _local2);
} else {
_local1 = Math.round(num);
}
return(_local1);
};
BgElement = function (bgtype, speedfactor, objname) {
this.pObjName = objname;
this.pType = bgtype;
this.pClip = bgtype + "_mc";
this.pClipY = eval (bgtype + "_mc")._y;
this.pSpeedMultiplier = speedfactor;
this.pXMax = eval (bgtype + "XMax_mc")._x;
this.pXMin = eval (bgtype + "XMin_mc")._x;
};
BgElement.prototype.getLastSpeed = function () {
return(this.pLastSpeed);
};
BgElement.prototype.pCanBeKilled = false;
BgElement.prototype.pause = function () {
};
BgElement.prototype.resetShake = function () {
eval (this.pClip)._y = this.pClipY;
};
BgElement.prototype.removeMe = function () {
fnRemoveObj(this.pObjName);
};
BgElement.prototype.resume = function () {
};
BgElement.prototype.scrollMe = function () {
var vClipX = eval (this.pClip)._x;
var vSpeed = (this.pSpeedMultiplier * oAnakin.getSpeed());
if ((vClipX - vSpeed) < this.pXMin) {
var vLeftover = (this.pXMin - (vClipX - vSpeed));
eval (this.pClip)._x = this.pXMax - vLeftover;
} else {
eval (this.pClip)._x = vClipX - vSpeed;
}
if (oLevel.getCurrent() == 3) {
this.pLastSpeed = vSpeed;
}
return(true);
};
BgElement.prototype.shakeMe = function (pixels, dir) {
if (dir == "up") {
eval (this.pClip)._y = eval (this.pClip)._y - pixels;
} else if (dir == "down") {
eval (this.pClip)._y = eval (this.pClip)._y + pixels;
}
};
Jedi = function () {
};
Jedi.prototype.pMAXDAMAGE = 100;
Jedi.prototype.pVertIncrMin = 0.6;
Jedi.prototype.pVertIncrMultiplier = 0.5;
Jedi.prototype.checkForCollision = function () {
var i = 0;
i = 0;
while (i < oLauncher.activeEnemies_array.length) {
var vEnemyObj = oLauncher.getActiveEnemy(i);
if (vEnemyObj.pCanBeKilled == true) {
var vTestClip = vEnemyObj.getClip();
if (oLevel.getCurrent() == 3) {
vTestClip = vEnemyObj.getHitClip();
}
if (eval (this.pClip + ".hitArea_mc").hitTest(eval ((vEnemyObj.getParentClip() + ".") + vTestClip))) {
if ((vEnemyObj.pCollideWithJedi == false) && (vEnemyObj.pKilled == false)) {
if (vEnemyObj.pCanBeKilled == true) {
vEnemyObj.collideWithJedi();
}
this.getHit(vEnemyObj.pCollisionDamageInflicted);
break;
}
}
}
delete vEnemyObj;
i++;
}
if (oAnakin.getCombinedDamage() < this.getMaxDamage()) {
this.checkVertPosition();
} else {
this.die();
}
};
Jedi.prototype.die = function () {
this.pAlive = false;
this.pSpeed = 0;
eval (this.pClip).flasher_mc.gotoAndPlay("go");
this.pDamage = this.getMaxDamage();
fnEndLevel();
};
Jedi.prototype.getBodyClip = function () {
return(eval (this.pClip).body_mc);
};
Jedi.prototype.getClipFrame = function () {
return(this.pClipFrame);
};
Jedi.prototype.getClipX = function () {
return(eval (this.pClip)._x);
};
Jedi.prototype.getClipY = function () {
return(eval (this.pClip)._y);
};
Jedi.prototype.getHit = function (damage, buzzDamage) {
this.pDamage = this.pDamage + damage;
if (oLevel.getCurrent() == 2) {
if (buzzDamage != true) {
hitObiWanAlert_mc.gotoAndPlay("go");
}
}
if (oAnakin.getCombinedDamage() >= this.getMaxDamage()) {
if (this.pAlive == true) {
this.die();
}
} else {
eval (this.pClip).flasher_mc.gotoAndPlay("go");
}
oDamageDisplay.update();
};
Jedi.prototype.getMaxDamage = function () {
return(this.pMAXDAMAGE);
};
Jedi.prototype.getSpeed = function () {
return(this.pSpeed);
};
Jedi.prototype.moveVertically = function (myY, targetY, maxvertchange) {
var vDist = (myY - targetY);
var vMoveIncr = (vDist * this.pVertIncrMultiplier);
var vAbsMoveIncr = Math.abs(vMoveIncr);
if (vAbsMoveIncr <= this.pVertIncrMin) {
eval (this.pClip)._y = targetY;
} else {
var vVertIncrMax;
if (maxvertchange == undefined) {
vVertIncrMax = this.pVertIncrMax;
} else {
vVertIncrMax = maxvertchange;
}
if (vAbsMoveIncr > vVertIncrMax) {
if (vMoveIncr < 0) {
vMoveIncr = -vVertIncrMax;
} else {
vMoveIncr = vVertIncrMax;
}
}
eval (this.pClip)._y = myY - vMoveIncr;
}
this.showMovement(vDist);
};
Jedi.prototype.resetForGame = function () {
this.pAlive = true;
this.pDamage = 0;
};
Jedi.prototype.resetForLevel = function () {
var _local1 = this;
_local1.pAlive = true;
_local1.setClipFrame("base");
_local1.setVerticalRange();
};
Jedi.prototype.setClipFrame = function (clipframe) {
this.pClipFrame = clipframe;
eval (this.pClip).gotoAndStop(clipframe);
};
Jedi.prototype.showMovement = function (dist) {
var _local1 = this;
if (dist > 0) {
if (_local1.getClipFrame() != "move_up") {
_local1.setClipFrame("move_up");
}
} else if (_local1.getClipFrame() != "move_down") {
_local1.setClipFrame("move_down");
}
};
oAnakin = new Jedi();
oAnakin.pClip = "anakin_mc";
oAnakin.pCurrentWeapon = "laser";
oAnakin.pMaxSpeed = 8;
oAnakin.pMinSpeed = 2;
oAnakin.pVertIncrMax = 20;
oAnakin.checkVertPosition = function () {
var _local2 = this;
var vTopBound = _local2.pMouseYMin;
var _local3 = _local2.getClipY();
var _local1 = _ymouse;
var vMouseYMax = _local2.pMouseYMax;
if (_local1 < vTopBound) {
_local1 = vTopBound;
} else if (_local1 > vMouseYMax) {
_local1 = vMouseYMax;
}
if (_local3 != _local1) {
_local2.moveVertically(_local3, _local1);
} else if (_local2.getClipFrame() != "base") {
_local2.setClipFrame("base");
}
};
oAnakin.dropBomb = function () {
var oPoint = new Object();
oPoint.x = eval (this.pClip).bombStart_mc.bomb_mc._x;
oPoint.y = eval (this.pClip).bombStart_mc.bomb_mc._y;
var vRot = eval (this.pClip).bombStart_mc.bomb_mc._rotation;
eval (this.pClip).bombStart_mc.localToGlobal(oPoint);
var vWeaponLev = oJediWeapons.getNextCopyLev();
Set("oWeapon" + vWeaponLev, new Bomb(vWeaponLev, oPoint.x, oPoint.y, vRot));
eval (this.pClip).bombStart_mc.gotoAndStop("base");
};
oAnakin.fireTorpedo = function () {
var oPoint = new Object();
oPoint.x = eval (this.pClip).torpedoStart_mc.torpedo_mc._x;
oPoint.y = eval (this.pClip).torpedoStart_mc.torpedo_mc._y;
eval (this.pClip).torpedoStart_mc.localToGlobal(oPoint);
var vWeaponLev = oJediWeapons.getNextCopyLev();
Set("oWeapon" + vWeaponLev, new Torpedo(vWeaponLev, oPoint.x, oPoint.y));
eval (this.pClip).torpedoStart_mc.gotoAndStop("base");
};
oAnakin.fireWeapon = function () {
var vWeapon = this.getCurrentWeapon();
if (oWeaponsMenu.getWeaponStatus(vWeapon) == true) {
if (vWeapon == "laser") {
AudioSFX_MC.gotoAndPlay("fire");
eval (this.pClip).laserBlast_mc.gotoAndPlay("go");
var vWeaponLev = oJediWeapons.getNextCopyLev();
Set("oWeapon" + vWeaponLev, new Laser(vWeaponLev));
} else {
eval (((this.pClip + ".") + vWeapon) + "Start_mc").gotoAndPlay("go");
}
oWeaponsMenu.weaponFired(vWeapon);
}
};
oAnakin.getCombinedDamage = function () {
return(Number(this.pDamage + oObiWan.pDamage));
};
oAnakin.getCurrentWeapon = function () {
return(this.pCurrentWeapon);
};
oAnakin.pause = function () {
if (eval (this.pClip).torpedoStart_mc._currentframe != 1) {
eval (this.pClip).torpedoStart_mc.stop();
}
if (eval (this.pClip).bombStart_mc._currentframe != 1) {
eval (this.pClip).bombStart_mc.stop();
}
if (eval (this.pClip).laserBlast_mc._currentframe != 1) {
eval (this.pClip).laserBlast_mc.stop();
}
};
oAnakin.resume = function () {
this.setSpeed();
if (eval (this.pClip).torpedoStart_mc._currentframe != 1) {
eval (this.pClip).torpedoStart_mc.play();
}
if (eval (this.pClip).bombStart_mc._currentframe != 1) {
eval (this.pClip).bombStart_mc.play();
}
if (eval (this.pClip).laserBlast_mc._currentframe != 1) {
eval (this.pClip).laserBlast_mc.play();
}
};
oAnakin.setCurrentWeapon = function (weapon) {
this.pCurrentWeapon = weapon;
};
oAnakin.setMaxMouseDist = function () {
this.pMaxDist = mouseXMax_mc._x - eval (this.pClip)._x;
};
oAnakin.setObjRef = function () {
eval (this.pClip).vObjRef = this;
};
oAnakin.setSpeed = function () {
if (this.pAlive == true) {
var vDist = (_xmouse - eval (this.pClip)._x);
var vMaxDist = this.pMaxDist;
var vMinSpeed = this.pMinSpeed;
if (vDist <= 0) {
this.pSpeed = vMinSpeed;
} else if (vDist >= vMaxDist) {
this.pSpeed = this.pMaxSpeed;
} else {
var vRatio = (vDist / vMaxDist);
vRatio = Math.round(vRatio * 100) / 100;
this.pSpeed = vMinSpeed + (vRatio * (this.pMaxSpeed - vMinSpeed));
}
} else {
this.pSpeed = 0;
}
};
oAnakin.setVerticalRange = function () {
this.pMouseYMin = anakinYMin_mc._y;
this.pMouseYMax = anakinYMax_mc._y;
};
oObiWan = new Jedi();
oObiWan.TOP_MARKER_NUM = 5;
oObiWan.BTM_MARKER_NUM = 5;
oObiWan.pClip = "obiWan_mc";
oObiWan.pMaxVertSpeed = 2;
oObiWan.pVertIncrMax = 10;
oObiWan.pYOffset = -19;
oObiWan.buzzDroidKilled = function (buzzDroidObj, row) {
var vRowTotal = this.getMarkerCount(row);
var i = 1;
i = 1;
while (i <= vRowTotal) {
if (this.getSlotOccupant(row, i) == buzzDroidObj) {
this.setSlotOccupant(row, i, null);
if (i < vRowTotal) {
var _local2 = new Array();
var trailingSlots_array = new Array();
var _local3;
_local3 = i + 1;
while (_local3 <= vRowTotal) {
var vObjToMove = this.getSlotOccupant(row, _local3);
if (vObjToMove == null) {
_local3 = vRowTotal + 1;
} else {
_local2.push(vObjToMove);
trailingSlots_array.push(_local3);
}
_local3++;
}
var _local1 = 0;
_local1 = 0;
while (_local1 < _local2.length) {
this.setSlotOccupant(row, Number(trailingSlots_array[_local1]) - 1, _local2[_local1]);
if (_local2[_local1].pInPosition == true) {
_local2[_local1].inMotionAgain();
}
if (_local1 == (_local2.length - 1)) {
this.setSlotOccupant(row, trailingSlots_array[_local1], null);
}
_local1++;
}
}
break;
}
i++;
}
this.updateBuzzDroidCount(row, "delete");
};
oObiWan.checkVertPosition = function () {
var _local1 = this;
var vTopBound = _local1.pMouseYMin;
var _local3 = _local1.getClipY();
var vMouseYMax = _local1.pMouseYMax;
var _local2;
var vLevel = oLevel.getCurrent();
if (vLevel == 2) {
_local2 = _local1.pTargetY;
} else {
_local2 = oAnakin.getClipY() + _local1.pYOffset;
}
if (_local2 < vTopBound) {
_local2 = vTopBound;
} else if (_local2 > vMouseYMax) {
_local2 = vMouseYMax;
}
if (_local3 != _local2) {
if (vLevel == 2) {
_local1.moveVertically(_local3, _local2, 1);
} else {
_local1.moveVertically(_local3, _local2);
}
} else if (vLevel == 2) {
_local1.pTargetY = Math.round(_local1.pMouseYMin + (Math.random() * (_local1.pMouseYMax - _local1.pMouseYMin)));
} else if (_local1.getClipFrame() != "base") {
_local1.setClipFrame("base");
}
};
oObiWan.getBuzzDroidCount = function (row) {
var _local1 = "Top";
if (String(row).toLowerCase() == "btm") {
_local1 = "Btm";
}
return(this[("p" + _local1) + "RowTargeted"]);
};
oObiWan.getMarkerCount = function (row) {
return(this[String(row).toUpperCase() + "_MARKER_NUM"]);
};
oObiWan.getGlobalMarkerCoords = function (markername) {
var oPoint = new Object();
oPoint.x = eval ((this.pClip + ".") + markername)._x;
oPoint.y = eval ((this.pClip + ".") + markername)._y;
eval (this.pClip).localToGlobal(oPoint);
return(oPoint);
};
oObiWan.getNextRow = function () {
var _local1 = null;
var _local2 = this.getMarkerCount("top") - this.getBuzzDroidCount("top");
var _local3 = this.getMarkerCount("btm") - this.getBuzzDroidCount("btm");
if (_local2 > _local3) {
_local1 = "top";
} else if (_local2 < _local3) {
_local1 = "btm";
} else if (_local2 > 0) {
if (Math.random() > 0.5) {
_local1 = "top";
} else {
_local1 = "btm";
}
}
return(_local1);
};
oObiWan.getSlotOccupant = function (row, num) {
var _local1 = "Top";
if (String(row).toLowerCase() == "btm") {
_local1 = "Btm";
}
return(this[(("p" + _local1) + num) + "Occupant"]);
};
oObiWan.resetLevel2 = function () {
var _local2 = this;
var _local1 = 1;
_local1 = 1;
while (_local1 <= _local2.getMarkerCount("top")) {
_local2.setSlotOccupant("top", _local1, null);
_local1++;
}
_local1 = 1;
while (_local1 <= _local2.getMarkerCount("btm")) {
_local2.setSlotOccupant("btm", _local1, null);
_local1++;
}
_local2.pTopRowTargeted = 0;
_local2.pBtmRowTargeted = 0;
};
oObiWan.setSlotOccupant = function (row, num, obj) {
var _local1 = "Top";
if (String(row).toLowerCase() == "btm") {
_local1 = "Btm";
}
this[(("p" + _local1) + num) + "Occupant"] = obj;
};
oObiWan.setVerticalRange = function () {
var _local1 = this;
if (oLevel.getCurrent() == 2) {
_local1.pMouseYMin = obiWanYMin_mc._y;
_local1.pMouseYMax = obiWanYMax_mc._y;
_local1.pTargetY = Math.round(_local1.pMouseYMin + (Math.random() * (_local1.pMouseYMax - _local1.pMouseYMin)));
_local1.setClipFrame("move_down");
} else {
_local1.pMouseYMin = oAnakin.pMouseYMin + _local1.pYOffset;
_local1.pMouseYMax = oAnakin.pMouseYMax + _local1.pYOffset;
}
};
Jedi.prototype.showMovement = function (dist) {
var _local1 = this;
if (oLevel.getCurrent() != 2) {
if (dist > 0) {
if (_local1.getClipFrame() != "move_up") {
_local1.setClipFrame("move_up");
}
} else if (_local1.getClipFrame() != "move_down") {
_local1.setClipFrame("move_down");
}
}
};
oObiWan.updateBuzzDroidCount = function (row, action) {
var _local2 = this;
var _local1 = "Top";
if (String(row).toLowerCase() == "btm") {
_local1 = "Btm";
}
if (action == "add") {
_local2[("p" + _local1) + "RowTargeted"] = _local2.getBuzzDroidCount(_local1) + 1;
} else {
_local2[("p" + _local1) + "RowTargeted"] = _local2.getBuzzDroidCount(_local1) - 1;
}
};
JediWeapon = function () {
};
JediWeapon.prototype.addToScrollArray = function () {
scrollingObjs_array.push(this);
};
JediWeapon.prototype.getDepthLevel = function () {
return(this.pDepthLevel);
};
JediWeapon.prototype.getDetonatedVar = function () {
return(this.pDetonated);
};
JediWeapon.prototype.pause = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).stop();
}
};
JediWeapon.prototype.removeFromScrollArray = function () {
var _local2 = this;
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
if (scrollingObjs_array[_local1] == _local2) {
scrollingObjs_array.splice(_local1, 1);
return;
}
_local1++;
}
};
JediWeapon.prototype.removeFromTrailingArray = function () {
var _local2 = this;
var _local1 = 0;
_local1 = 0;
while (_local1 < trailingObjs_array.length) {
if (trailingObjs_array[_local1] == _local2) {
trailingObjs_array.splice(_local1, 1);
return;
}
_local1++;
}
};
JediWeapon.prototype.removeMe = function () {
this.removeFromTrailingArray();
eval ((this.pParentClip + ".") + this.pClip).removeMovieClip();
var vObjName = ("oWeapon" + this.getDepthLevel());
fnRemoveObj(vObjName);
};
JediWeapon.prototype.resume = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).play();
}
};
JediWeapon.prototype.setClip = function (clip, parentclip) {
this.pClip = clip;
this.pParentClip = parentclip;
};
JediWeapon.prototype.setUp = function (lev, weapontype, startx, starty, rot) {
var _local1 = this;
_local1.pDepthLevel = lev;
_local1.pDetonated = false;
_local1.pType = weapontype;
oJediWeapons.createClip(_local1, weapontype, lev, startx, starty, rot);
};
Bomb = function (lev, startx, starty, rot) {
this.setUp(lev, "bomb", startx, starty, rot);
};
Bomb.prototype = new JediWeapon();
Bomb.prototype.pDamageInflicted = 24;
Bomb.prototype.pDropSpeed = 16;
Bomb.prototype.pSpeedMultiplier = 0.65;
Bomb.prototype.pause = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).stop();
}
if (bombShaker_mc._currentframe != 1) {
bombShaker_mc.stop();
}
};
Bomb.prototype.resume = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).play();
}
if (bombShaker_mc._currentframe != 1) {
bombShaker_mc.play();
}
};
Bomb.prototype.scrollMe = function () {
var vCurrentX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vCurrentY = eval ((this.pParentClip + ".") + this.pClip)._y;
var vSpeed = (this.pSpeedMultiplier * oAnakin.getSpeed());
if ((vCurrentY + this.pDropSpeed) >= this.pMaxY) {
eval ((this.pParentClip + ".") + this.pClip)._y = this.pMaxY;
if (this.getDetonatedVar() == false) {
this.pDetonated = true;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
if (oLevel.getCurrent() == 3) {
if (bombShaker_mc.shakers_array == undefined) {
bombShaker_mc.shakers_array = new Array();
}
bombShaker_mc.shakers_array.splice(0);
bombShaker_mc.shakers_array.push(oBg);
bombShaker_mc.gotoAndPlay("go");
}
}
} else if (this.getDetonatedVar() == false) {
var oPoint = new Object();
oPoint.x = vCurrentX;
oPoint.y = vCurrentY;
eval (this.pParentClip).localToGlobal(oPoint);
var i = 0;
i = 0;
while (i < oLauncher.activeEnemies_array.length) {
var vEnemyObj = oLauncher.getActiveEnemy(i);
var vShapeParam = false;
if (eval ((vEnemyObj.getParentClip() + ".") + vEnemyObj.getHitClip()).hitTest(oPoint.x, oPoint.y, vShapeParam)) {
if (vEnemyObj.pKilled == false) {
vEnemyObj.hitByWeapon(this.pDamageInflicted, "bomb");
this.pDetonated = true;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
if (oLevel.getCurrent() == 3) {
if (bombShaker_mc.shakers_array == undefined) {
bombShaker_mc.shakers_array = new Array();
}
bombShaker_mc.shakers_array.splice(0);
bombShaker_mc.shakers_array.push(oBg);
bombShaker_mc.gotoAndPlay("go");
}
break;
}
}
delete vEnemyObj;
i++;
}
if (this.getDetonatedVar() == false) {
eval ((this.pParentClip + ".") + this.pClip)._y = vCurrentY + this.pDropSpeed;
}
}
eval ((this.pParentClip + ".") + this.pClip)._x = vCurrentX - vSpeed;
return(true);
};
Bomb.prototype.setYMax = function () {
this.pMaxY = eval (((oJediWeapons.pClip + ".bombYMaxLev") + oLevel.getCurrent()) + "_mc")._y;
};
Laser = function (lev) {
this.setUp(lev, "laser");
};
Laser.prototype = new JediWeapon();
Laser.prototype.pDamageInflicted = 1.5;
Laser.prototype.pHitTestPixelIncr = 4;
Laser.prototype.pSpeed = oAnakin.pMaxSpeed + 20;
Laser.prototype.scrollMe = function () {
var vSpeed = (this.pSpeed - oAnakin.getSpeed());
var vCanScroll = true;
var oPoint = new Object();
var vCurrentX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vNewX = (vCurrentX + vSpeed);
if (vNewX > this.pMaxX) {
vCanScroll = false;
this.removeMe();
} else if (this.getDetonatedVar() == false) {
oPoint.x = vCurrentX;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip)._y;
eval (this.pParentClip).localToGlobal(oPoint);
var vClipX = oPoint.x;
var trajXValues_array = new Array();
trajXValues_array.push(vClipX);
var vAddMore = true;
var j = 1;
while (vAddMore == true) {
var vNewValue = (vClipX + (j * this.pHitTestPixelIncr));
if (vNewValue < (vClipX + vSpeed)) {
trajXValues_array.push(vNewValue);
j++;
} else {
vAddMore = false;
}
delete vNewValue;
}
var i = 0;
var k = 0;
i = 0;
while (i < oLauncher.activeEnemies_array.length) {
var vEnemyObj = oLauncher.getActiveEnemy(i);
if (vEnemyObj.pKilled == false) {
k = 0;
while (k < trajXValues_array.length) {
if (eval ((vEnemyObj.getParentClip() + ".") + vEnemyObj.getHitClip()).hitTest(trajXValues_array[k], oPoint.y, true)) {
vEnemyObj.hitByWeapon(this.pDamageInflicted, "laser");
this.pDetonated = true;
vCanScroll = false;
trailingObjs_array.push(this);
oPoint.x = trajXValues_array[k];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
k = trajXValues_array.length;
i = oLauncher.activeEnemies_array.length;
}
k++;
}
delete j;
delete vAddMore;
delete trajXValues_array;
}
delete vEnemyObj;
i++;
}
if (oLevel.getCurrent() == 2) {
if (vCanScroll == true) {
if (oObiWan.pAlive == true) {
k = 0;
while (k < trajXValues_array.length) {
if (oObiWan.getBodyClip().hitTest(trajXValues_array[k], oPoint.y, true)) {
oObiWan.getHit(4);
this.pDetonated = true;
vCanScroll = false;
trailingObjs_array.push(this);
oPoint.x = trajXValues_array[k];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
k = trajXValues_array.length;
}
k++;
}
}
}
}
}
if (vCanScroll == true) {
eval ((this.pParentClip + ".") + this.pClip)._x = vNewX;
}
return(vCanScroll);
};
Laser.prototype.scrollMeTrailing = function () {
eval (this.pClip)._x = eval (this.pClip)._x - oAnakin.getSpeed();
};
Laser.prototype.setXMax = function () {
this.pMaxX = eval (oJediWeapons.pLaserClip).laserXMax_mc._x;
};
Torpedo = function (lev, startx, starty) {
this.setUp(lev, "torpedo", startx, starty);
};
Torpedo.prototype = new JediWeapon();
Torpedo.prototype.pDamageInflicted = 12;
Torpedo.prototype.pHitTestPixelIncr = 4;
Torpedo.prototype.pSpeed = oAnakin.pMaxSpeed + 17;
Torpedo.prototype.scrollMe = function () {
var vSpeed = (this.pSpeed - oAnakin.getSpeed());
var vCanScroll = true;
var vCurrentX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vNewX = (vCurrentX + vSpeed);
if (vNewX > this.pMaxX) {
vCanScroll = false;
this.removeMe();
} else if (this.getDetonatedVar() == false) {
var oPoint = new Object();
oPoint.x = vCurrentX;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip)._y;
eval (this.pParentClip).localToGlobal(oPoint);
var vClipX = oPoint.x;
var trajXValues_array = new Array();
trajXValues_array.push(vClipX);
var vAddMore = true;
var j = 1;
while (vAddMore == true) {
var vNewValue = (vClipX + (j * this.pHitTestPixelIncr));
if (vNewValue < (vClipX + vSpeed)) {
trajXValues_array.push(vNewValue);
j++;
} else {
vAddMore = false;
}
delete vNewValue;
}
var i = 0;
i = 0;
while (i < oLauncher.activeEnemies_array.length) {
var vEnemyObj = oLauncher.getActiveEnemy(i);
if (vEnemyObj.pKilled == false) {
var k = 0;
k = 0;
while (k < trajXValues_array.length) {
if (eval ((vEnemyObj.getParentClip() + ".") + vEnemyObj.getHitClip()).hitTest(trajXValues_array[k], oPoint.y, true)) {
if (vEnemyObj.pCanBeKilled == true) {
vEnemyObj.hitByWeapon(this.pDamageInflicted, "torpedo");
}
this.pDetonated = true;
vCanScroll = false;
trailingObjs_array.push(this);
oPoint.x = trajXValues_array[k];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
k = trajXValues_array.length;
i = oLauncher.activeEnemies_array.length;
}
k++;
}
delete j;
delete vAddMore;
delete trajXValues_array;
}
delete vEnemyObj;
i++;
}
if (oLevel.getCurrent() == 2) {
if (vCanScroll == true) {
if (oObiWan.pAlive == true) {
k = 0;
while (k < trajXValues_array.length) {
if (oObiWan.getBodyClip().hitTest(trajXValues_array[k], oPoint.y, true)) {
oObiWan.getHit(this.pDamageInflicted);
this.pDetonated = true;
vCanScroll = false;
trailingObjs_array.push(this);
oPoint.x = trajXValues_array[k];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
k = trajXValues_array.length;
}
k++;
}
}
}
}
}
if (vCanScroll == true) {
eval ((this.pParentClip + ".") + this.pClip)._x = vNewX;
}
return(vCanScroll);
};
Torpedo.prototype.scrollMeTrailing = function () {
eval (this.pClip)._x = eval (this.pClip)._x - oAnakin.getSpeed();
};
Torpedo.prototype.setXMax = function () {
this.pMaxX = eval (oJediWeapons.pClip).weaponXMax_mc._x;
};
Enemy = function () {
};
Enemy.prototype.addToScrollingObjsArray = function () {
scrollingObjs_array.push(this);
};
Enemy.prototype.getBeginX = function () {
return(this.pBeginX);
};
Enemy.prototype.getBeginY = function () {
return(this.pBeginY);
};
Enemy.prototype.getClip = function () {
return(this.pClip);
};
Enemy.prototype.getHitClip = function () {
return(this.pClip + ".hitArea_mc");
};
Enemy.prototype.getParentClip = function () {
return(this.pParentClip);
};
Enemy.prototype.removeFromScrollArray = function () {
var _local2 = this;
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
if (scrollingObjs_array[_local1] == _local2) {
scrollingObjs_array.splice(_local1, 1);
return;
}
_local1++;
}
};
Enemy.prototype.removeMe = function (checklevelend) {
oLauncher.removeFromEnemyArray(this);
eval ((this.pParentClip + ".") + this.pClip).removeMovieClip();
var vObjNameSuffix = String(this.pClip).substr(0, String(this.pClip).indexOf("_mc"));
var vObjName = ("oEnemy_" + vObjNameSuffix);
if (checklevelend == true) {
fnCheckLevelEnd();
}
fnRemoveObj(vObjName);
};
Enemy.prototype.stopClip = function () {
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).stop();
};
Enemy_triFighter = function (clipname, cliplevel) {
this.pParentClip = oLauncher.pEnemyClip;
this.pClip = clipname;
this.pClipPlaying = false;
this.pCollideWithJedi = false;
this.pHealth = 12;
this.pKilled = false;
this.pLevel = cliplevel;
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMin = 20;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMax = 60;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
this.addToScrollingObjsArray();
};
Enemy_triFighter.prototype = new Enemy();
Enemy_triFighter.prototype.pCanBeKilled = true;
Enemy_triFighter.prototype.pCollisionDamageInflicted = 4;
Enemy_triFighter.prototype.pCollisionDamageTaken = 12;
Enemy_triFighter.prototype.pKillPoints = 100;
Enemy_triFighter.prototype.pSpeed = oAnakin.pMinSpeed + ((oAnakin.pMaxSpeed - oAnakin.pMinSpeed) / 1.5);
Enemy_triFighter.prototype.callAttack = function () {
var vMyX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vMyX >= this.pAttackXMin) && (vMyX <= this.pAttackXMax)) {
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("shoot");
this.pClipPlaying = true;
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.gotoAndPlay("reset");
}
};
Enemy_triFighter.prototype.checkInitialWeapons = function () {
var oPoint = new Object();
oPoint.x = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._x;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._y;
var vLaserWidth = Math.abs(Math.floor(oPoint.x));
eval ((this.pParentClip + ".") + this.pClip).localToGlobal(oPoint);
var vLaserX = oPoint.x;
var vLaserY = oPoint.y;
var trajXValues_array = new Array();
var vContact = false;
var i = 0;
i = 0;
while (i < vLaserWidth) {
trajXValues_array.push(vLaserX + i);
i++;
}
var j = 0;
j = 0;
while (j < trajXValues_array.length) {
if (eval (oAnakin.getBodyClip()).hitTest(trajXValues_array[j], vLaserY, true)) {
var vXVal = trajXValues_array[j];
var vJedi = "Anakin";
vContact = true;
break;
}
if (eval (oObiWan.getBodyClip()).hitTest(trajXValues_array[j], vLaserY, true)) {
var vXVal = trajXValues_array[j];
var vJedi = "ObiWan";
vContact = true;
break;
}
j++;
}
if (vContact == true) {
this.fireWeapon(true, vXVal, vLaserY, vJedi);
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
} else if (rGameOn == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else {
eval ((this.pParentClip + ".") + this.pClip).stop();
}
};
Enemy_triFighter.prototype.collideWithJedi = function () {
var _local1 = this;
_local1.pCollideWithJedi = true;
_local1.pHealth = _local1.pHealth - _local1.pCollisionDamageTaken;
if (_local1.pHealth <= 0) {
_local1.die();
}
};
Enemy_triFighter.prototype.die = function (collide) {
AudioSFX_MC.gotoAndPlay("medium");
this.pHealth = 0;
this.pKilled = true;
this.pSpeed = 0;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("die");
this.pClipPlaying = true;
if (collide != true) {
oScore.updateScore(this.pKillPoints);
}
};
Enemy_triFighter.prototype.fireWeapon = function (alreadyhit, xpos, ypos, jedi) {
var vLev = oEnemyWeapons.getNextCopyLev();
if (alreadyHit == true) {
Set("oTriFighterLaser" + vLev, new TriFighterLaser(vLev, xpos, ypos, this, true, jedi));
} else {
var oPoint = new Object();
oPoint.x = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._x;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._y;
eval ((this.pParentClip + ".") + this.pClip).localToGlobal(oPoint);
var vLaunchX = oPoint.x;
var vLaunchY = oPoint.y;
Set("oTriFighterLaser" + vLev, new TriFighterLaser(vLev, vLaunchX, vLaunchY, this));
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
}
};
Enemy_triFighter.prototype.getBeginY = function () {
var _local2 = this;
var _local1 = _local2.pBeginYMax - _local2.pBeginYMin;
var _local3 = _local2.pBeginYMin + (Math.random() * _local1);
return(_local3);
};
Enemy_triFighter.prototype.getSpeed = function () {
return(this.pSpeed + oAnakin.getSpeed());
};
Enemy_triFighter.prototype.hitByWeapon = function (damage) {
var _local1 = this;
_local1.pHealth = _local1.pHealth - damage;
if (_local1.pHealth <= 0) {
_local1.pSpeed = 0;
_local1.die();
}
};
Enemy_triFighter.prototype.pause = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).stop();
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.stop();
}
};
Enemy_triFighter.prototype.resume = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.play();
}
};
Enemy_triFighter.prototype.scrollMe = function () {
var vSpeed = this.getSpeed();
var vCanScroll = true;
var vClipX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vClipX - vSpeed) < this.pMinX) {
vCanScroll = false;
this.removeMe(true);
} else {
eval ((this.pParentClip + ".") + this.pClip)._x = vClipX - vSpeed;
}
return(vCanScroll);
};
Enemy_triFighter.prototype.setPositions = function () {
var oPoint = new Object();
oPoint.x = triFighterShootXMin_mc._x;
oPoint.y = 0;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMin = oPoint.x;
oPoint.x = triFighterShootXMax_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMax = oPoint.x;
oPoint.x = triFighterBeginX_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginX = oPoint.x;
oPoint.y = triFighterYMin_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginYMin = oPoint.y;
oPoint.y = triFighterYMax_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginYMax = oPoint.y;
oPoint.x = triFighterXMin_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pMinX = oPoint.x;
};
Enemy_vultureDroid = function (clipname, cliplevel) {
this.pParentClip = oLauncher.pEnemyClip;
this.pClip = clipname;
this.pClipPlaying = false;
this.pCollideWithJedi = false;
this.pHealth = 6;
this.pKilled = false;
this.pLevel = cliplevel;
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMin = 15;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMax = 45;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
this.addToScrollingObjsArray();
};
Enemy_vultureDroid.prototype = new Enemy();
Enemy_vultureDroid.prototype.pCanBeKilled = true;
Enemy_vultureDroid.prototype.pCollisionDamageInflicted = 2;
Enemy_vultureDroid.prototype.pCollisionDamageTaken = 6;
Enemy_vultureDroid.prototype.pKillPoints = 75;
Enemy_vultureDroid.prototype.pSpeed = oAnakin.pMinSpeed + ((oAnakin.pMaxSpeed - oAnakin.pMinSpeed) / 1.75);
Enemy_vultureDroid.prototype.callAttack = function () {
var vMyX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vMyX >= this.pAttackXMin) && (vMyX <= this.pAttackXMax)) {
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("shoot");
this.pClipPlaying = true;
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.gotoAndPlay("reset");
}
};
Enemy_vultureDroid.prototype.checkInitialWeapons = function () {
var oPoint = new Object();
oPoint.x = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._x;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._y;
var vLaserWidth = Math.abs(Math.floor(oPoint.x));
eval ((this.pParentClip + ".") + this.pClip).localToGlobal(oPoint);
var vLaserX = oPoint.x;
var vLaserY = oPoint.y;
var trajXValues_array = new Array();
var vContact = false;
var i = 0;
i = 0;
while (i < vLaserWidth) {
trajXValues_array.push(vLaserX + i);
i++;
}
var j = 0;
j = 0;
while (j < trajXValues_array.length) {
if (eval (oAnakin.getBodyClip()).hitTest(trajXValues_array[j], vLaserY, true)) {
var vXVal = trajXValues_array[j];
var vJedi = "Anakin";
vContact = true;
break;
}
if (eval (oObiWan.getBodyClip()).hitTest(trajXValues_array[j], vLaserY, true)) {
var vXVal = trajXValues_array[j];
var vJedi = "ObiWan";
vContact = true;
break;
}
j++;
}
if (vContact == true) {
this.fireWeapon(true, vXVal, vLaserY, vJedi);
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
} else if (rGameOn == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else {
eval ((this.pParentClip + ".") + this.pClip).stop();
}
};
Enemy_vultureDroid.prototype.collideWithJedi = function () {
var _local1 = this;
_local1.pCollideWithJedi = true;
_local1.pHealth = _local1.pHealth - _local1.pCollisionDamageTaken;
if (_local1.pHealth <= 0) {
_local1.die();
}
};
Enemy_vultureDroid.prototype.die = function (collide) {
AudioSFX_MC.gotoAndPlay("little");
this.pHealth = 0;
this.pKilled = true;
this.pSpeed = 0;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("die");
this.pClipPlaying = true;
if (collide != true) {
oScore.updateScore(this.pKillPoints);
}
};
Enemy_vultureDroid.prototype.fireWeapon = function (alreadyhit, xpos, ypos, jedi) {
var vLev = oEnemyWeapons.getNextCopyLev();
if (alreadyhit == true) {
Set("oVultureDroidLaser" + vLev, new VultureDroidLaser(vLev, xpos, ypos, this, true, jedi));
} else {
var oPoint = new Object();
oPoint.x = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._x;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip).weapon_mc._y;
eval ((this.pParentClip + ".") + this.pClip).localToGlobal(oPoint);
var vLaunchX = oPoint.x;
var vLaunchY = oPoint.y;
Set("oVultureDroidLaser" + vLev, new VultureDroidLaser(vLev, vLaunchX, vLaunchY, this));
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
}
};
Enemy_vultureDroid.prototype.getBeginY = function () {
var _local2 = this;
var _local1 = _local2.pBeginYMax - _local2.pBeginYMin;
var _local3 = _local2.pBeginYMin + (Math.random() * _local1);
return(_local3);
};
Enemy_vultureDroid.prototype.getSpeed = function () {
return(this.pSpeed + oAnakin.getSpeed());
};
Enemy_vultureDroid.prototype.hitByWeapon = function (damage) {
var _local1 = this;
_local1.pHealth = _local1.pHealth - damage;
if (_local1.pHealth <= 0) {
_local1.pSpeed = 0;
_local1.die();
}
};
Enemy_vultureDroid.prototype.pause = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).stop();
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.stop();
}
};
Enemy_vultureDroid.prototype.resume = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else {
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.play();
}
};
Enemy_vultureDroid.prototype.scrollMe = function () {
var vSpeed = this.getSpeed();
var vCanScroll = true;
var vClipX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vClipX - vSpeed) < this.pMinX) {
vCanScroll = false;
this.removeMe(true);
} else {
eval ((this.pParentClip + ".") + this.pClip)._x = vClipX - vSpeed;
}
return(vCanScroll);
};
Enemy_vultureDroid.prototype.setPositions = function () {
var oPoint = new Object();
oPoint.x = vultureDroidShootXMin_mc._x;
oPoint.y = 0;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMin = oPoint.x;
oPoint.x = vultureDroidShootXMax_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMax = oPoint.x;
oPoint.x = vultureDroidBeginX_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginX = oPoint.x;
oPoint.y = vultureDroidYMin_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginYMin = oPoint.y;
oPoint.y = vultureDroidYMax_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginYMax = oPoint.y;
oPoint.x = vultureDroidXMin_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pMinX = oPoint.x;
};
Enemy_buzzDroid = function (clipname, cliplevel, quickstart) {
this.pParentClip = oLauncher.pEnemyClip;
this.pClip = clipname;
this.pClipPlaying = false;
this.pHealth = 1.5;
this.pInPosition = false;
this.pKilled = false;
this.pLevel = cliplevel;
var vTargetRow = eval ((this.pParentClip + ".") + this.pClip).vTargetRow;
if (quickstart != undefined) {
vTargetRow = quickstart.pTargetRow;
}
this.setTargetRow(vTargetRow);
this.assignMeToSlot(vTargetRow);
if (quickstart != undefined) {
this.setCurrentDest(vTargetRow, quickstart.pTargetSlot);
} else {
this.setCurrentDest(vTargetRow, oObiWan.getMarkerCount(vTargetRow));
}
oObiWan.updateBuzzDroidCount(vTargetRow, "add");
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
if (quickstart != undefined) {
eval ((this.pParentClip + ".") + this.pClip)._x = quickstart.x;
eval ((this.pParentClip + ".") + this.pClip)._y = quickstart.y;
}
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
this.addToScrollingObjsArray();
};
Enemy_buzzDroid.prototype = new Enemy();
Enemy_buzzDroid.prototype.ATTACH_DAMAGE = 5;
Enemy_buzzDroid.prototype.ATTACH_SLOT = "top1Marker_mc";
Enemy_buzzDroid.prototype.pCanBeKilled = true;
Enemy_buzzDroid.prototype.pKillPoints = 75;
Enemy_buzzDroid.prototype.pVertSpeed = oObiWan.pMaxVertSpeed + 0.2;
Enemy_buzzDroid.prototype.assignMeToSlot = function (row) {
var _local2 = row;
var _local3 = this;
var _local1 = 1;
_local1 = 1;
while (_local1 <= oObiWan.getMarkerCount(_local2)) {
if (oObiWan.getSlotOccupant(_local2, _local1) == null) {
oObiWan.setSlotOccupant(_local2, _local1, _local3);
return;
}
_local1++;
}
};
Enemy_buzzDroid.prototype.attachToObiWan = function () {
buzzDroidAlert_mc.gotoAndPlay("go");
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("attack");
};
Enemy_buzzDroid.prototype.attackObiWan = function () {
oObiWan.getHit(this.ATTACH_DAMAGE, true);
};
Enemy_buzzDroid.prototype.checkNextSlot = function () {
var vCurrentDest = this.getCurrentDest();
var vRow = String(vCurrentDest).substr(0, 3);
var vSlotNum = String(vCurrentDest).substr(3, 1);
if (oObiWan.getSlotOccupant(vRow, vSlotNum) == this) {
this.pInPosition = true;
if (vCurrentDest == this.ATTACH_SLOT) {
this.attachToObiWan();
} else {
this.pClipPlaying = true;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("hovering");
}
} else {
this.setCurrentDest(vRow, Number(vSlotNum) - 1);
}
};
Enemy_buzzDroid.prototype.die = function () {
AudioSFX_MC.gotoAndPlay("medium");
oObiWan.buzzDroidKilled(this, this.getTargetRow());
oScore.updateScore(this.pKillPoints);
this.pHealth = 0;
this.pKilled = true;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("die");
this.pClipPlaying = true;
if (this.getCurrentDest() == this.ATTACH_SLOT) {
if (buzzDroidAlert_mc._currentframe != 1) {
buzzDroidAlert_mc.gotoAndStop("base");
}
}
};
Enemy_buzzDroid.prototype.getBeginY = function (targetrow) {
var _local1 = this;
var _local3;
if (String(targetrow).toLowerCase() == "top") {
var _local2 = _local1.pTopBeginYMax - _local1.pTopBeginYMin;
_local3 = _local1.pTopBeginYMin + (Math.random() * _local2);
} else {
var _local2 = _local1.pBtmBeginYMax - _local1.pBtmBeginYMax;
_local3 = _local1.pBtmBeginYMin + (Math.random() * _local2);
}
return(_local3);
};
Enemy_buzzDroid.prototype.getCurrentDest = function () {
return(this.pCurrentDest);
};
Enemy_buzzDroid.prototype.getSpeed = function () {
return(oAnakin.getSpeed() * 0.38);
};
Enemy_buzzDroid.prototype.getTargetRow = function () {
return(this.pTargetRow);
};
Enemy_buzzDroid.prototype.hitByWeapon = function (damage) {
var _local1 = this;
_local1.pHealth = _local1.pHealth - damage;
if (hitObiWanAlert_mc._currentframe != 1) {
hitObiWanAlert_mc.gotoAndStop("base");
}
if (_local1.pHealth <= 0) {
_local1.die();
}
};
Enemy_buzzDroid.prototype.inMotionAgain = function () {
this.pInPosition = false;
this.pClipPlaying = false;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
};
Enemy_buzzDroid.prototype.pause = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).stop();
} else if (this.getCurrentDest() == this.ATTACH_SLOT) {
if (this.pInPosition == true) {
eval ((this.pParentClip + ".") + this.pClip).attacker_mc.stop();
}
}
};
Enemy_buzzDroid.prototype.resume = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else if (this.getCurrentDest() == this.ATTACH_SLOT) {
if (this.pInPosition == true) {
eval ((this.pParentClip + ".") + this.pClip).attacker_mc.play();
}
}
};
Enemy_buzzDroid.prototype.scrollMe = function () {
var oTarget = oObiWan.getGlobalMarkerCoords(this.getCurrentDest());
eval (this.pParentClip).globalToLocal(oTarget);
var vTargetY = oTarget.y;
if (this.pInPosition == true) {
eval ((this.pParentClip + ".") + this.pClip)._y = vTargetY;
} else {
var vSpeed = this.getSpeed();
var vClipX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vClipY = eval ((this.pParentClip + ".") + this.pClip)._y;
var vTargetX = oTarget.x;
var vNewX;
var vNewY;
if (vClipX > vTargetX) {
if ((vClipX - vSpeed) <= vTargetX) {
vNewX = vTargetX;
} else {
vNewX = vClipX - vSpeed;
}
} else if ((vClipX + vSpeed) >= vTargetX) {
vNewX = vTargetX;
} else {
vNewX = vClipX + vSpeed;
}
if (vClipY < vTargetY) {
if ((vClipY + this.pVertSpeed) >= vTargetY) {
vNewY = vTargetY;
} else {
vNewY = vClipY + this.pVertSpeed;
}
} else if (vClipY > vTargetY) {
if ((vClipY - this.pVertSpeed) <= vTargetY) {
vNewY = vTargetY;
} else {
vNewY = vClipY - this.pVertSpeed;
}
} else {
vNewY = vTargetY;
}
eval ((this.pParentClip + ".") + this.pClip)._x = vNewX;
eval ((this.pParentClip + ".") + this.pClip)._y = vNewY;
if (vNewX == vTargetX) {
if (vNewY == vTargetY) {
this.checkNextSlot();
}
}
}
return(true);
};
Enemy_buzzDroid.prototype.setCurrentDest = function (row, num) {
this.pCurrentDest = (row + num) + "Marker_mc";
};
Enemy_buzzDroid.prototype.setPositions = function () {
var oPoint = new Object();
oPoint.x = buzzDroidBeginX_mc._x;
oPoint.y = 0;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginX = oPoint.x;
oPoint.y = buzzDroidTopYMin_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pTopBeginYMin = oPoint.y;
oPoint.y = buzzDroidTopYMax_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pTopBeginYMax = oPoint.y;
oPoint.y = buzzDroidBtmYMin_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBtmBeginYMin = oPoint.y;
oPoint.y = buzzDroidBtmYMax_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBtmBeginYMax = oPoint.y;
};
Enemy_buzzDroid.prototype.setTargetRow = function (row) {
this.pTargetRow = row;
};
Enemy_battleDroids = function (clipname, cliplevel) {
this.pParentClip = oLauncher.pEnemyClip;
this.pClip = clipname;
this.pClipPlaying = false;
this.pCollideWithJedi = false;
this.pHealth = 24;
this.pKilled = false;
this.pLevel = cliplevel;
this.pOnScreen = false;
this.pShootAccuracy = Enemy_battleDroids.prototype.pShootAccuracy;
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMin = 60;
eval ((this.pParentClip + ".") + this.pClip).vAttackTravelMax = 100;
eval ((this.pParentClip + ".") + this.pClip).gotoAndStop("base");
this.addToScrollingObjsArray();
this.setShootVar(false);
};
Enemy_battleDroids.prototype = new Enemy();
Enemy_battleDroids.prototype.pARM_TOTAL = 5;
Enemy_battleDroids.prototype.pARM_ANGLE_OFFSET = -46.8;
Enemy_battleDroids.prototype.pArmLowerFrameNum = 2;
Enemy_battleDroids.prototype.pArmRaiseFrameNum = 2;
Enemy_battleDroids.prototype.pCanBeKilled = true;
Enemy_battleDroids.prototype.pCollisionDamageInflicted = 2;
Enemy_battleDroids.prototype.pCollisionDamageTaken = 24;
Enemy_battleDroids.prototype.pKillPoints = 250;
Enemy_battleDroids.prototype.pShootAccuracy = 0.3;
Enemy_battleDroids.prototype.pSpeedMultiplier = 1.1;
Enemy_battleDroids.prototype.calculateShootAngle = function () {
var vShooterNum = this.getShooterNum();
var oPoint = new Object();
oPoint.x = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc")._x;
oPoint.y = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc")._y;
eval ((this.pParentClip + ".") + this.pClip).localToGlobal(oPoint);
var vArmX = (oPoint.x - ((this.pSpeed + oAnakin.getSpeed()) * (this.pArmRaiseFrameNum + 2)));
var vArmY = oPoint.y;
var vAnakinX = oAnakin.getClipX();
var vAnakinY = oAnakin.getClipY();
if (Math.random() > this.pShootAccuracy) {
vAnakinY = oAnakin.pMouseYMin + (Math.random() * (oAnakin.pMouseYMax - oAnakin.pMouseYMin));
}
var vRotation = 90;
if (vAnakinY < vArmY) {
var vOpp = (vArmY - vAnakinY);
var vAdj = (vArmX - vAnakinX);
var vHyp = Math.sqrt((vOpp * vOpp) + (vAdj * vAdj));
var vTheta = (Math.asin((1 * vOpp) / vHyp) / (Math.PI/180));
vRotation = (vTheta + 90) + this.getArmAngleOffset();
} else if (vAnakinY > vArmY) {
var vOpp = (vArmX - vAnakinX);
var vAdj = (vAnakinY - vArmY);
var vHyp = Math.sqrt((vOpp * vOpp) + (vAdj * vAdj));
vRotation = (Math.asin((1 * vOpp) / vHyp) / (Math.PI/180)) + this.getArmAngleOffset();
}
this.pArmRotation = 0;
var vAbsOffset = Math.abs(this.getArmAngleOffset());
if (vRotation <= vAbsOffset) {
vRotation = 88 - vAbsOffset;
}
this.pTargetArmRotation = vRotation;
this.pRotationSegment = this.pTargetArmRotation / this.pArmRaiseFrameNum;
};
Enemy_battleDroids.prototype.callAttack = function () {
if (this.getShootVar() == false) {
if (this.getOnScreenVar() == false) {
this.pShooterNum = Math.randomInteger(1, this.getArmTotal());
this.setShootVar(true);
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc").gotoAndPlay("shoot");
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.gotoAndPlay("loop");
} else {
var vMyX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vMyX >= this.pAttackXMin) && (vMyX <= this.pAttackXMax)) {
this.pShooterNum = Math.randomInteger(1, this.getArmTotal());
this.setShootVar(true);
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc").gotoAndPlay("shoot");
}
eval ((this.pParentClip + ".") + this.pClip).attackCaller_mc.gotoAndPlay("reset");
}
}
};
Enemy_battleDroids.prototype.checkInitContact = function () {
var vShooterNum = this.getShooterNum();
var oPoint = new Object();
oPoint.x = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._x;
oPoint.y = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._y;
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").localToGlobal(oPoint);
if (eval (oAnakin.getBodyClip()).hitTest(oPoint.x, oPoint.y, true)) {
var vRot = (eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc")._rotation + eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._rotation);
this.fireWeapon(true, oPoint.x, oPoint.y, vRot, "Anakin");
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").gotoAndPlay("lower_arm");
} else if (eval (oObiWan.getBodyClip()).hitTest(oPoint.x, oPoint.y, true)) {
var vRot = (eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc")._rotation + eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._rotation);
this.fireWeapon(true, oPoint.x, oPoint.y, vRot, "ObiWan");
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").gotoAndPlay("lower_arm");
}
};
Enemy_battleDroids.prototype.checkOffScreenAttack = function () {
if (eval ((this.pParentClip + ".") + this.pClip)._x > this.pAttackOffScrnXMin) {
if (Math.random() > 0.1) {
this.callAttack();
}
} else {
this.pOnScreen = true;
eval (this.pClip).attackCaller_mc.gotoAndPlay("reset");
}
};
Enemy_battleDroids.prototype.collideWithJedi = function () {
var _local1 = this;
_local1.pCollideWithJedi = true;
_local1.pHealth = _local1.pHealth - _local1.pCollisionDamageTaken;
if (_local1.pHealth <= 0) {
_local1.die("torpedo", true);
}
};
Enemy_battleDroids.prototype.die = function (weapon, collide) {
AudioSFX_MC.gotoAndPlay("big");
this.pHealth = 0;
this.pKilled = true;
this.pSpeed = 0;
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("die_by_" + weapon);
this.pClipPlaying = true;
if (collide != true) {
oScore.updateScore(this.pKillPoints);
}
oLauncher.removeFromEnemyArray(this);
};
Enemy_battleDroids.prototype.doneShooting = function () {
this.setShootVar(false);
};
Enemy_battleDroids.prototype.fireWeapon = function (alreadyhit, xpos, ypos, rot, jedi) {
var _local1 = this;
var _local2 = oEnemyWeapons.getNextCopyLev();
AudioSFX_MC.gotoAndPlay("laser");
if (alreadyhit == true) {
Set("oBattleDroidLaser" + _local2, new BattleDroidLaser(_local2, rot, xpos, ypos, null, null, true, jedi));
} else {
Set("oBattleDroidLaser" + _local2, new BattleDroidLaser(_local2, _local1.pTargetArmRotation - _local1.getArmAngleOffset(), _local1.pWeaponStartX, _local1.pWeaponStartY, _local1.pWeaponXMoveRatio, _local1.pWeaponYMoveRatio));
delete _local1.pWeaponStartX;
delete _local1.pWeaponStartY;
delete _local1.pWeaponXMoveRatio;
delete _local1.pWeaponYMoveRatio;
}
_local1.pRotationSegment = _local1.pTargetArmRotation / _local1.pArmLowerFrameNum;
};
Enemy_battleDroids.prototype.getArmAngleOffset = function () {
return(this.pARM_ANGLE_OFFSET);
};
Enemy_battleDroids.prototype.getArmRotation = function () {
return(this.pArmRotation);
};
Enemy_battleDroids.prototype.getArmTotal = function () {
return(this.pARM_TOTAL);
};
Enemy_battleDroids.prototype.getOnScreenVar = function () {
return(this.pOnScreen);
};
Enemy_battleDroids.prototype.getShooterNum = function () {
return(this.pShooterNum);
};
Enemy_battleDroids.prototype.getShootVar = function () {
return(this.pShooting);
};
Enemy_battleDroids.prototype.hitByWeapon = function (damage, weapon) {
var _local1 = this;
_local1.pHealth = _local1.pHealth - damage;
if (_local1.pHealth <= 0) {
_local1.die(weapon);
}
};
Enemy_battleDroids.prototype.lowerArm = function () {
this.pArmRotation = this.getArmRotation() - this.pRotationSegment;
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc")._rotation = this.getArmRotation();
};
Enemy_battleDroids.prototype.pause = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).stop();
} else if (this.getShootVar() == true) {
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc").stop();
}
};
Enemy_battleDroids.prototype.placeWeapon = function () {
var vShooterNum = this.getShooterNum();
var oPoint = new Object();
oPoint.x = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._x;
oPoint.y = eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._y;
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").localToGlobal(oPoint);
var vSpeed = (this.pSpeed + oAnakin.getSpeed());
var vTotalRot = (90 + (eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc")._rotation + eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + vShooterNum) + "_mc").weapon_mc._rotation));
if (vTotalRot > 90) {
var vTheta = (vTotalRot - 90);
var vAdjAngle = (90 - vTheta);
var vOpp = ((Math.sin(vTheta * (Math.PI/180)) * vSpeed) / 1);
var vAdj = ((Math.sin(vAdjAngle * (Math.PI/180)) * vSpeed) / 1);
this.pWeaponStartX = oPoint.x;
this.pWeaponStartY = oPoint.y;
this.pWeaponXMoveRatio = -(vAdj / vSpeed);
this.pWeaponYMoveRatio = -(vOpp / vSpeed);
} else if (vTotalRot < 90) {
var vAdjAngle = vTotalRot;
var vTheta = (90 - vAdjAngle);
vOpp = (Math.sin(vTheta * (Math.PI/180)) * vSpeed) / 1;
vAdj = (Math.sin(vAdjAngle * (Math.PI/180)) * vSpeed) / 1;
this.pWeaponStartX = oPoint.x;
this.pWeaponStartY = oPoint.y;
this.pWeaponXMoveRatio = -(vAdj / vSpeed);
this.pWeaponYMoveRatio = vOpp / vSpeed;
} else {
this.pWeaponStartX = oPoint.x;
this.pWeaponStartY = oPoint.y;
this.pWeaponXMoveRatio = -vSpeed;
this.pWeaponYMoveRatio = 0;
}
};
Enemy_battleDroids.prototype.raiseArm = function () {
this.pArmRotation = this.getArmRotation() + this.pRotationSegment;
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc")._rotation = this.getArmRotation();
};
Enemy_battleDroids.prototype.resume = function () {
if (this.pClipPlaying == true) {
eval ((this.pParentClip + ".") + this.pClip).play();
} else if (this.getShootVar() == true) {
eval (((((this.pParentClip + ".") + this.pClip) + ".arm") + this.getShooterNum()) + "_mc").play();
}
};
Enemy_battleDroids.prototype.scrollMe = function () {
var vSpeed = oBg.getLastSpeed();
var vCanScroll = true;
var vClipX = eval ((this.pParentClip + ".") + this.pClip)._x;
if ((vClipX - vSpeed) < this.pMinX) {
vCanScroll = false;
this.removeMe(true);
} else {
eval ((this.pParentClip + ".") + this.pClip)._x = vClipX - vSpeed;
}
return(vCanScroll);
};
Enemy_battleDroids.prototype.setPositions = function () {
var oPoint = new Object();
oPoint.x = battleDroidsBeginX_mc._x;
oPoint.y = battleDroidsY_mc._y;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pBeginX = oPoint.x;
this.pBeginY = oPoint.y;
oPoint.x = battleDroidsXMin_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pMinX = oPoint.x;
oPoint.x = battleDroidsAttackXMax_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMax = oPoint.x;
oPoint.x = battleDroidsAttackXMin_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackXMin = oPoint.x;
oPoint.x = battleDroidsAttackOffScrnXMin_mc._x;
eval (oLauncher.pEnemyClip).globalToLocal(oPoint);
this.pAttackOffScrnXMin = oPoint.x;
};
Enemy_battleDroids.prototype.setShootVar = function (val) {
this.pShooting = val;
};
EnemyWeapon = function () {
};
EnemyWeapon.prototype.pParentClip = "enemyWeapons_mc";
EnemyWeapon.prototype.addToScrollArray = function () {
scrollingObjs_array.push(this);
};
EnemyWeapon.prototype.getDetonatedVar = function () {
return(this.pDetonated);
};
EnemyWeapon.prototype.pause = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).stop();
}
};
EnemyWeapon.prototype.removeFromTrailingArray = function () {
var _local2 = this;
var _local1 = 0;
_local1 = 0;
while (_local1 < trailingObjs_array.length) {
if (trailingObjs_array[_local1] == _local2) {
trailingObjs_array.splice(_local1, 1);
return;
}
_local1++;
}
};
EnemyWeapon.prototype.resume = function () {
if (this.getDetonatedVar() == true) {
eval (this.pClip).play();
}
};
EnemyWeapon.prototype.setPositions = function () {
this.pXMin = eval (oEnemyWeapons.pClip).weaponXMin_mc._x;
};
TriFighterLaser = function (lev, startx, starty, alreadyhit, jedi) {
this.pClip = ("triFighterLaser" + lev) + "_mc";
this.pDepthLevel = lev;
this.pDetonated = false;
eval (this.pParentClip).attachMovie("triFighterLaser", this.pClip, lev);
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
if (alreadyhit == true) {
eval ((this.pParentClip + ".") + this.pClip).vImmediateHit = true;
eval ((this.pParentClip + ".") + this.pClip).vJedi = jedi;
}
var oPoint = new Object();
oPoint.x = startx;
oPoint.y = starty;
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x - this.getSpeed();
eval ((this.pParentClip + ".") + this.pClip)._y = oPoint.y;
this.addToScrollArray();
};
TriFighterLaser.prototype = new EnemyWeapon();
TriFighterLaser.prototype.pDamageInflicted = 4;
TriFighterLaser.prototype.pSpeed = oAnakin.pMaxSpeed + 17;
TriFighterLaser.prototype.getSpeed = function () {
return(oAnakin.getSpeed() + this.pSpeed);
};
TriFighterLaser.prototype.removeMe = function () {
this.removeFromTrailingArray();
eval ((this.pParentClip + ".") + this.pClip).removeMovieClip();
var vObjName = ("oTriFighterLaser" + this.pDepthLevel);
fnRemoveObj(vObjName);
};
TriFighterLaser.prototype.scrollMe = function () {
var vCanScroll = true;
var vMyX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vSpeed = this.getSpeed();
if ((vMyX - vSpeed) <= this.pXMin) {
vCanScroll = false;
this.removeMe();
} else if (this.getDetonatedVar() == false) {
if (eval ((this.pParentClip + ".") + this.pClip).vImmediateHit == true) {
this.pDetonated = true;
vCanScroll = false;
eval ("o" + eval ((this.pParentClip + ".") + this.pClip).vJedi).getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
} else {
var vContact = false;
var oPoint = new Object();
oPoint.x = vMyX;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip)._y;
eval (this.pParentClip).localToGlobal(oPoint);
var trajXValues_array = new Array();
var vLaserWidth = Math.floor(eval ((this.pParentClip + ".") + this.pClip).marker_mc._width);
var i = 0;
i = 0;
while (i < vLaserWidth) {
trajXValues_array.push(oPoint.x + i);
i++;
}
var j = 0;
j = 0;
while (j < trajXValues_array.length) {
if (eval (oAnakin.getBodyClip()).hitTest(trajXValues_array[j], oPoint.y, true)) {
this.pDetonated = true;
vCanScroll = false;
vContact = true;
oAnakin.getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
break;
}
if (eval (oObiWan.getBodyClip()).hitTest(trajXValues_array[j], oPoint.y, true)) {
this.pDetonated = true;
vCanScroll = false;
vContact = true;
oObiWan.getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
break;
}
j++;
}
if (vContact == false) {
eval ((this.pParentClip + ".") + this.pClip)._x = eval ((this.pParentClip + ".") + this.pClip)._x - vSpeed;
}
}
}
return(vCanScroll);
};
TriFighterLaser.prototype.scrollMeTrailing = function () {
};
VultureDroidLaser = function (lev, startx, starty, alreadyhit, jedi) {
this.pClip = ("vultureDroidLaser" + lev) + "_mc";
this.pDepthLevel = lev;
this.pDetonated = false;
eval (this.pParentClip).attachMovie("vultureDroidLaser", this.pClip, lev);
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
if (alreadyhit == true) {
eval ((this.pParentClip + ".") + this.pClip).vImmediateHit = true;
eval ((this.pParentClip + ".") + this.pClip).vJedi = jedi;
}
var oPoint = new Object();
oPoint.x = startx;
oPoint.y = starty;
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x - this.getSpeed();
eval ((this.pParentClip + ".") + this.pClip)._y = oPoint.y;
this.addToScrollArray();
};
VultureDroidLaser.prototype = new EnemyWeapon();
VultureDroidLaser.prototype.pDamageInflicted = 3;
VultureDroidLaser.prototype.pSpeed = oAnakin.pMaxSpeed + 19;
VultureDroidLaser.prototype.getSpeed = function () {
return(oAnakin.getSpeed() + this.pSpeed);
};
VultureDroidLaser.prototype.removeMe = function () {
this.removeFromTrailingArray();
eval ((this.pParentClip + ".") + this.pClip).removeMovieClip();
var vObjName = ("oVultureDroidLaser" + this.pDepthLevel);
fnRemoveObj(vObjName);
};
VultureDroidLaser.prototype.scrollMe = function () {
var vCanScroll = true;
var vMyX = eval ((this.pParentClip + ".") + this.pClip)._x;
var vSpeed = this.getSpeed();
if ((vMyX - vSpeed) <= this.pXMin) {
vCanScroll = false;
this.removeMe();
} else if (this.getDetonatedVar() == false) {
if (eval ((this.pParentClip + ".") + this.pClip).vImmediateHit == true) {
this.pDetonated = true;
vCanScroll = false;
eval ("o" + eval ((this.pParentClip + ".") + this.pClip).vJedi).getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
} else {
var vContact = false;
var oPoint = new Object();
oPoint.x = vMyX;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip)._y;
eval (this.pParentClip).localToGlobal(oPoint);
var trajXValues_array = new Array();
var vLaserWidth = Math.floor(eval ((this.pParentClip + ".") + this.pClip).marker_mc._width);
var i = 0;
i = 0;
while (i < vLaserWidth) {
trajXValues_array.push(oPoint.x + i);
i++;
}
var j = 0;
j = 0;
while (j < trajXValues_array.length) {
if (eval (oAnakin.getBodyClip()).hitTest(trajXValues_array[j], oPoint.y, true)) {
this.pDetonated = true;
vCanScroll = false;
vContact = true;
oAnakin.getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
break;
}
if (eval (oObiWan.getBodyClip()).hitTest(trajXValues_array[j], oPoint.y, true)) {
this.pDetonated = true;
vCanScroll = false;
vContact = true;
oObiWan.getHit(this.pDamageInflicted);
trailingObjs_array.push(this);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
break;
}
j++;
}
if (vContact == false) {
eval ((this.pParentClip + ".") + this.pClip)._x = eval ((this.pParentClip + ".") + this.pClip)._x - vSpeed;
}
}
}
return(vCanScroll);
};
VultureDroidLaser.prototype.scrollMeTrailing = function () {
};
BattleDroidLaser = function (lev, angle, startx, starty, xmoveratio, ymoveratio, alreadyhit, jedi) {
this.pClip = ("battleDroidLaser" + lev) + "_mc";
this.pDepthLevel = lev;
this.pDetonated = false;
if (alreadyhit != true) {
this.pXMoveRatio = xmoveratio;
this.pYMoveRatio = ymoveratio;
}
eval (this.pParentClip).attachMovie("battleDroidLaser", this.pClip, lev);
eval ((this.pParentClip + ".") + this.pClip).vObjRef = this;
var oPoint = new Object();
oPoint.x = startx;
oPoint.y = starty;
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip)._y = oPoint.y;
eval ((this.pParentClip + ".") + this.pClip)._rotation = angle - 90;
if (alreadyhit == true) {
eval ((this.pParentClip + ".") + this.pClip).vImmediateHit = true;
eval ((this.pParentClip + ".") + this.pClip).vJedi = jedi;
}
this.addToScrollArray();
};
BattleDroidLaser.prototype = new EnemyWeapon();
BattleDroidLaser.prototype.pDamageInflicted = 2.5;
BattleDroidLaser.prototype.pHitTestPixelIncr = 3;
BattleDroidLaser.prototype.pSpeed = oAnakin.pMaxSpeed + 18;
BattleDroidLaser.prototype.removeMe = function () {
var _local1 = this;
_local1.removeFromTrailingArray();
removeMovieClip((_local1.pParentClip + ".") + _local1.pClip);
var _local2 = "oBattleDroidLaser" + _local1.pDepthLevel;
fnRemoveObj(_local2);
};
BattleDroidLaser.prototype.scrollMe = function () {
var vSpeed = (this.pSpeed + oAnakin.getSpeed());
var vCanScroll = true;
var vNextX = (eval ((this.pParentClip + ".") + this.pClip)._x + (this.pXMoveRatio * vSpeed));
var oPoint = new Object();
oPoint.x = vNextX;
oPoint.y = 0;
eval (this.pParentClip).localToGlobal(oPoint);
var vNextXGlobal = oPoint.x;
var vNextY = (eval ((this.pParentClip + ".") + this.pClip)._y + (this.pYMoveRatio * vSpeed));
if (((vNextX <= this.pMinX) || (vNextY <= this.pMinY)) || (vNextY >= this.pMaxY)) {
vCanScroll = false;
this.removeMe();
} else if (this.getDetonatedVar() == false) {
if (eval ((this.pParentClip + ".") + this.pClip).vImmediateHit == true) {
this.pDetonated = true;
eval ("o" + eval ((this.pParentClip + ".") + this.pClip).vJedi).getHit(this.pDamageInflicted);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
} else {
var trajXValues_array = new Array();
var trajYValues_array = new Array();
var vAddMore = true;
var j = 1;
while (vAddMore == true) {
oPoint.x = eval ((this.pParentClip + ".") + this.pClip)._x;
oPoint.y = eval ((this.pParentClip + ".") + this.pClip)._y;
eval (this.pParentClip).localToGlobal(oPoint);
var vNewValue = Number(oPoint.x + ((j * this.pHitTestPixelIncr) * this.pXMoveRatio));
if (vNewValue > vNextXGlobal) {
trajXValues_array.push(vNewValue);
trajYValues_array.push(Number(oPoint.y + ((j * this.pHitTestPixelIncr) * this.pYMoveRatio)));
j++;
} else {
trajXValues_array.push(vNextX);
trajYValues_array.push(vNextY);
vAddMore = false;
}
delete vNewValue;
}
var vContact = false;
var i = 0;
i = 0;
while (i < trajXValues_array.length) {
if (eval (oAnakin.getBodyClip()).hitTest(trajXValues_array[i], trajYValues_array[i], true)) {
this.pDetonated = true;
vContact = true;
oPoint.x = trajXValues_array[i];
oPoint.y = trajYValues_array[i];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip)._y = oPoint.y;
vCanScroll = false;
oAnakin.getHit(this.pDamageInflicted);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
trailingObjs_array.push(this);
i = trajXValues_array.length;
} else if (eval (oObiWan.getBodyClip()).hitTest(trajXValues_array[i], trajYValues_array[i], true)) {
this.pDetonated = true;
vContact = true;
oPoint.x = trajXValues_array[i];
oPoint.y = trajYValues_array[i];
eval (this.pParentClip).globalToLocal(oPoint);
eval ((this.pParentClip + ".") + this.pClip)._x = oPoint.x;
eval ((this.pParentClip + ".") + this.pClip)._y = oPoint.y;
vCanScroll = false;
oObiWan.getHit(this.pDamageInflicted);
eval ((this.pParentClip + ".") + this.pClip).gotoAndPlay("detonate");
trailingObjs_array.push(this);
i = trajXValues_array.length;
}
i++;
}
}
if (vContact == false) {
eval ((this.pParentClip + ".") + this.pClip)._x = vNextX;
eval ((this.pParentClip + ".") + this.pClip)._y = vNextY;
}
}
return(vCanScroll);
};
BattleDroidLaser.prototype.scrollMeTrailing = function () {
};
BattleDroidLaser.prototype.setPositions = function () {
var oPoint = new Object();
oPoint.x = battleDroidLaserMinX_mc._x;
oPoint.y = battleDroidLaserMinY_mc._y;
eval (oEnemyWeapons.pClip).globalToLocal(oPoint);
this.pMinX = oPoint.x;
this.pMinY = oPoint.y;
oPoint.y = battleDroidLaserMaxY_mc._y;
eval (oEnemyWeapons.pClip).globalToLocal(oPoint);
this.pMaxY = oPoint.y;
};
WeaponsObj = function () {
};
WeaponsObj.prototype.getNextCopyLev = function () {
var _local1 = this.pNextCopyLev;
this.incrementCopyLev();
return(_local1);
};
WeaponsObj.prototype.incrementCopyLev = function () {
var _local1 = this;
_local1.pNextCopyLev++;
if (_local1.pNextCopyLev >= 10000) {
_local1.pNextCopyLev = 1;
}
};
WeaponsObj.prototype.reset = function () {
this.pNextCopyLev = 1;
};
WeaponsObj.prototype.pNextCopyLev = 1;
oEnemyWeapons = new WeaponsObj();
oEnemyWeapons.pClip = "enemyWeapons_mc";
oJediWeapons = new WeaponsObj();
oJediWeapons.pClip = "jediWeapons_mc";
oJediWeapons.pLaserClip = "jediLasers_mc";
oJediWeapons.createClip = function (obj, type, lev, startx, starty, rot) {
var vClip = (("weapon" + lev) + "_mc");
var vParentClip = this.pClip;
if (type == "laser") {
vParentClip = this.pLaserClip;
}
obj.setClip(vClip, vParentClip);
eval (vParentClip).attachMovie(type, vClip, lev);
var oPoint = new Object();
if (startx == undefined) {
oPoint.x = oAnakin.getClipX();
oPoint.y = oAnakin.getClipY();
eval (vParentClip).globalToLocal(oPoint);
eval ((vParentClip + ".") + vClip)._x = oPoint.x;
eval ((vParentClip + ".") + vClip)._y = oPoint.y;
} else {
oPoint.x = startx;
oPoint.y = starty;
eval (vParentClip).globalToLocal(oPoint);
eval ((vParentClip + ".") + vClip)._x = oPoint.x;
eval ((vParentClip + ".") + vClip)._y = oPoint.y;
if (rot != undefined) {
eval ((vParentClip + ".") + vClip)._rotation = rot;
}
}
eval ((vParentClip + ".") + vClip).vObjRef = obj;
if (type != "torpedo") {
scrollingObjs_array.push(obj);
} else {
eval ((vParentClip + ".") + vClip).gotoAndPlay("go");
}
};
oDamageDisplay = new Object();
oDamageDisplay.pClip = "damageDisplay_mc";
oDamageDisplay.update = function () {
eval (this.pClip).fnUpdate();
};
oKeyListener = new Object();
oKeyListener.onKeyUp = function () {
if (Key.getCode() == 32) {
oWeaponsMenu.toggleWeapon();
}
};
oLauncher = new Object();
oLauncher.pClip = "launcher_mc";
oLauncher.pEnemyClip = "enemies_mc";
oLauncher.allEnemyTypes_array = new Array();
oLauncher.activeEnemies_array = new Array();
oLauncher.addDistance = function () {
eval (this.pClip).vDist = eval (this.pClip).vDist + oAnakin.getSpeed();
this.pJediDist = this.pJediDist + oAnakin.getSpeed();
};
oLauncher.checkAccelerate = function () {
var _local2 = oLevel.getCurrent();
switch (_local2) {
case 3 :
var _local1 = this.getLaunchedCount();
if ((_local1 > 3) && (_local1 <= 6)) {
Enemy_battleDroids.prototype.pShootAccuracy = 0.4;
} else if ((_local1 > 6) && (_local1 <= 9)) {
Enemy_battleDroids.prototype.pShootAccuracy = 0.5;
} else if (_local1 > 9) {
Enemy_battleDroids.prototype.pShootAccuracy = 0.6;
}
return;
default :
}
};
oLauncher.getActiveEnemy = function (index) {
return(this.activeEnemies_array[index]);
};
oLauncher.getDistance = function () {
return(this.pJediDist);
};
oLauncher.getEnemyCount = function () {
return(this.activeEnemies_array.length);
};
oLauncher.getLaunchedCount = function () {
return(this.pLaunchedCount);
};
oLauncher.getNextEnemyLev = function () {
return(this.pNextEnemyLev);
};
oLauncher.hitTestNewClip = function (clipname, enemytype, cliplevel, quickstart) {
if ((oTimer.getTimerOn() == true) || (quickstart != undefined)) {
var vCanLaunch = true;
if (clipname != undefined) {
this.vQueuedClip = clipname;
this.vQueuedEnemyType = enemytype;
this.vQueuedLevel = cliplevel;
}
var i = 0;
i = 0;
while (i < this.activeEnemies_array.length) {
var vEnemyObj = this.getActiveEnemy(i);
if (eval ((this.pEnemyClip + ".") + this.vQueuedClip).hitTest(eval ((this.pEnemyClip + ".") + vEnemyObj.pClip))) {
vCanLaunch = false;
break;
}
delete vEnemyObj;
i++;
}
if (vCanLaunch == true) {
if (quickstart != undefined) {
this.launch(this.vQueuedEnemyType, this.vQueuedClip, this.vQueuedLevel, quickstart);
} else {
this.launch(this.vQueuedEnemyType, this.vQueuedClip, this.vQueuedLevel);
eval (this.pClip).gotoAndPlay("go");
}
} else {
eval (this.pClip).gotoAndPlay("wait");
}
} else {
if (eval ((this.pEnemyClip + ".") + this.vQueuedClip)) {
eval ((this.pEnemyClip + ".") + this.vQueuedClip).removeMovieClip();
}
eval (this.pClip).gotoAndStop("base");
}
};
oLauncher.incrementEnemyLev = function () {
var _local1 = this;
_local1.pNextEnemyLev = _local1.pNextEnemyLev + 2;
if (_local1.pNextEnemyLev >= 5000) {
_local1.pNextEnemyLev = 1;
}
};
oLauncher.launch = function (enemytype, clipname, cliplevel, quickstart) {
if (quickstart != undefined) {
Set((("oEnemy_" + enemytype) + "_") + cliplevel, new eval ("Enemy_" + enemytype)(clipname, cliplevel, quickstart));
} else {
Set((("oEnemy_" + enemytype) + "_") + cliplevel, new eval ("Enemy_" + enemytype)(clipname, cliplevel));
}
this.activeEnemies_array.push(eval ((("oEnemy_" + enemytype) + "_") + cliplevel));
this.pLaunchedCount++;
this.incrementEnemyLev();
this.checkAccelerate();
};
oLauncher.pause = function () {
eval (this.pClip).stop();
};
oLauncher.removeFromEnemyArray = function (obj) {
var _local2 = this;
var _local3 = obj;
var _local1 = 0;
_local1 = 0;
while (_local1 < _local2.activeEnemies_array.length) {
if (_local3 == _local2.activeEnemies_array[_local1]) {
_local2.activeEnemies_array.splice(_local1, 1);
return;
}
_local1++;
}
};
oLauncher.reset = function () {
this.pLaunchedCount = 0;
this.pLoopStarted = false;
this.pNextEnemyLev = 1;
this.pJediDist = 0;
this.setLoopValues();
this.activeEnemies_array.splice(0);
this.allEnemyTypes_array.splice(0);
var vLevel = oLevel.getCurrent();
switch (vLevel) {
case 1 :
this.allEnemyTypes_array.push("triFighter", "vultureDroid");
break;
case 2 :
this.allEnemyTypes_array.push("buzzDroid");
break;
case 3 :
this.allEnemyTypes_array.push("battleDroids");
}
eval (this.pClip).gotoAndStop("base");
};
oLauncher.resume = function () {
if (this.pLoopStarted == true) {
eval (this.pClip).play();
} else {
this.pLoopStarted = true;
this.tryLaunch();
}
};
oLauncher.setLoopValues = function () {
var vMinDist;
var vMaxDist;
var vLevel = oLevel.getCurrent();
switch (vLevel) {
case 1 :
vMinDist = 70;
vMaxDist = 115;
break;
case 2 :
vMinDist = 70;
vMaxDist = 120;
break;
case 3 :
vMinDist = 80;
vMaxDist = 120;
break;
}
eval (this.pClip).vMinDist = vMinDist;
eval (this.pClip).vMaxDist = vMaxDist;
};
oLauncher.setUp = function () {
eval (this.pClip).vObjRef = this;
};
oLauncher.tryLaunch = function (quickstart) {
if ((oTimer.getTimerOn() == true) || (quickstart != undefined)) {
var vIndex = 0;
if (this.allEnemyTypes_array.length > 1) {
vIndex = Math.randomInteger(0, this.allEnemyTypes_array.length - 1);
}
var vEnemyType = this.allEnemyTypes_array[vIndex];
var vCreateClip = true;
if (vEnemyType == "buzzDroid") {
if (quickstart != undefined) {
var vTargetRow = quickstart.pTargetRow;
} else {
var vTargetRow = oObiWan.getNextRow();
if (vTargetRow == null) {
eval (this.pClip).gotoAndPlay("loop_pickup");
vCreateClip = false;
}
}
}
if (vCreateClip == true) {
var vNextLev = this.getNextEnemyLev();
var vNewClip = (((vEnemyType + "_") + vNextLev) + "_mc");
eval (this.pEnemyClip).attachMovie(vEnemyType, vNewClip, vNextLev);
eval ((this.pEnemyClip + ".") + vNewClip)._x = eval ("Enemy_" + vEnemyType).prototype.getBeginX();
if (vEnemyType == "buzzDroid") {
eval ((this.pEnemyClip + ".") + vNewClip).vTargetRow = vTargetRow;
eval ((this.pEnemyClip + ".") + vNewClip)._y = eval ("Enemy_" + vEnemyType).prototype.getBeginY(vTargetRow);
} else {
eval ((this.pEnemyClip + ".") + vNewClip)._y = eval ("Enemy_" + vEnemyType).prototype.getBeginY();
}
if (quickstart != undefined) {
this.hitTestNewClip(vNewClip, vEnemyType, vNextLev, quickstart);
} else {
this.hitTestNewClip(vNewClip, vEnemyType, vNextLev);
}
}
} else {
eval (this.pClip).gotoAndStop("base");
}
};
oLevel = new Object();
oLevel.pClip = "levDisplay_mc";
oLevel.pMAXLEVELS = 3;
oLevel.currentLevStarted = function () {
this[("pLev" + this.getCurrent()) + "Started"] = true;
};
oLevel.getCurrent = function () {
return(this.pCurrent);
};
oLevel.getCurrentLevStart = function () {
return(this[("pLev" + this.getCurrent()) + "Started"]);
};
oLevel.getMaxLevels = function () {
return(this.pMAXLEVELS);
};
oLevel.reset = function () {
var _local2 = this;
_local2.setCurrent(1);
var _local1 = 1;
_local1 = 1;
while (_local1 <= 3) {
_local2[("pLev" + _local1) + "Started"] = false;
_local1++;
}
};
oLevel.setCurrent = function (newlev) {
this.pCurrent = newlev;
};
oMouseListener = new Object();
oMouseListener.onMouseDown = function () {
if (gameArea_mc.hitTest(_xmouse, _ymouse, true)) {
oAnakin.fireWeapon();
}
};
oMouseListener.onMouseMove = function () {
oAnakin.setSpeed();
};
oMusic = new Object();
oMusic.pClip = "musicToggle_mc";
oMusic.pState = "on";
oMusic.getState = function () {
return(this.pState);
};
oMusic.toggleMusic = function (newstate) {
this.pState = newstate;
eval (this.pClip).gotoAndStop("music_" + newstate);
};
oScore = new Object();
oScore.pClip = "scoreDisplay_mc";
oScore.getCurrent = function () {
return(this.pScore);
};
oScore.reset = function () {
this.pScore = 0;
};
oScore.updateScore = function (points) {
if (points) {
this.pScore = this.pScore + points;
}
eval (this.pClip).fnUpdateDisplay();
};
oTimer = new Object();
oTimer.pClip = "timer_mc";
oTimer.pTimerOn = false;
oTimer.MAXCOUNT_LEV1 = 30;
oTimer.MAXCOUNT_LEV2 = 30;
oTimer.MAXCOUNT_LEV3 = 30;
oTimer.getLevelMaxCount = function () {
return(this["MAXCOUNT_LEV" + oLevel.getCurrent()]);
};
oTimer.getTimerOn = function () {
return(this.pTimerOn);
};
oTimer.pause = function () {
if (this.pTimerOn == true) {
eval (this.pClip).stop();
}
};
oTimer.resume = function () {
if (this.pTimerOn == true) {
eval (this.pClip).play();
}
};
oTimer.startTimer = function () {
eval (this.pClip).vCount = 0;
eval (this.pClip).vMaxCount = this.getLevelMaxCount();
this.pTimerOn = true;
eval (this.pClip).gotoAndPlay("go");
};
oTimer.stopTimedPortion = function () {
this.pTimerOn = false;
eval (this.pClip).gotoAndStop("base");
};
oWeaponsMenu = new Object();
oWeaponsMenu.pClip = "weaponsMenu_mc";
oWeaponsMenu.allWeapons_array = new Array("laser", "torpedo", "bomb");
oWeaponsMenu.getWeaponStatus = function (weapon) {
return(this[weapon + "Ready"]);
};
oWeaponsMenu.pause = function () {
var i = 0;
i = 0;
while (i < this.allWeapons_array.length) {
var vWeapon = this.allWeapons_array[i];
if (this.getWeaponStatus(vWeapon) == false) {
eval (((this.pClip + ".") + vWeapon) + "_mc").stop();
}
i++;
}
};
oWeaponsMenu.rechargeDone = function (weapon) {
this.setWeaponStatus(weapon, true);
if (oAnakin.getCurrentWeapon() == weapon) {
eval (((this.pClip + ".") + weapon) + "_mc").gotoAndStop("selected");
} else {
eval (((this.pClip + ".") + weapon) + "_mc").gotoAndStop("active");
}
};
oWeaponsMenu.resume = function () {
var i = 0;
i = 0;
while (i < this.allWeapons_array.length) {
var vWeapon = this.allWeapons_array[i];
if (this.getWeaponStatus(vWeapon) == false) {
eval (((this.pClip + ".") + vWeapon) + "_mc").play();
}
i++;
}
};
oWeaponsMenu.selectWeapon = function (weapon) {
var _local1 = oAnakin.getCurrentWeapon();
var _local2 = weapon;
this.weaponChange(_local1, _local2);
};
oWeaponsMenu.setUp = function () {
eval (this.pClip).vObjRef = this;
var vCurrentWeapon = oAnakin.getCurrentWeapon();
var i = 0;
i = 0;
while (i < this.allWeapons_array.length) {
var vWeapon = this.allWeapons_array[i];
this.setWeaponStatus(vWeapon, true);
if (vCurrentWeapon == vWeapon) {
this.weaponSelected(vCurrentWeapon);
} else {
eval (((this.pClip + ".") + vWeapon) + "_mc").gotoAndStop("active");
eval (((this.pClip + ".") + vWeapon) + "_mc").highlight_mc._visible = false;
}
i++;
}
};
oWeaponsMenu.setWeaponStatus = function (weapon, newstatus) {
this[weapon + "Ready"] = newstatus;
};
oWeaponsMenu.toggleWeapon = function () {
var _local2 = this;
var vCurrent = oAnakin.getCurrentWeapon();
var _local3;
var _local1 = 0;
_local1 = 0;
while (_local1 < _local2.allWeapons_array.length) {
if (_local2.allWeapons_array[_local1] == vCurrent) {
_local3 = _local1;
break;
}
_local1++;
}
var vNextIndex = 0;
if (_local3 < (_local2.allWeapons_array.length - 1)) {
vNextIndex = _local3 + 1;
}
_local2.selectWeapon(_local2.allWeapons_array[vNextIndex]);
};
oWeaponsMenu.weaponChange = function (oldweapon, newweapon) {
AudioSFX_MC.gotoAndPlay("click");
oAnakin.setCurrentWeapon(newweapon);
eval (((this.pClip + ".") + newweapon) + "_mc").highlight_mc._visible = true;
if (this.getWeaponStatus(newweapon) == true) {
eval (((this.pClip + ".") + newweapon) + "_mc").gotoAndStop("selected");
}
eval (((this.pClip + ".") + oldweapon) + "_mc").highlight_mc._visible = false;
if (this.getWeaponStatus(oldweapon) == true) {
eval (((this.pClip + ".") + oldweapon) + "_mc").gotoAndStop("active");
}
};
oWeaponsMenu.weaponFired = function (weapon) {
if (weapon != "laser") {
this.setWeaponStatus(weapon, false);
eval (((this.pClip + ".") + weapon) + "_mc").gotoAndPlay("recharge");
}
};
oWeaponsMenu.weaponSelected = function (weapon) {
oAnakin.setCurrentWeapon(weapon);
eval (((this.pClip + ".") + weapon) + "_mc").gotoAndStop("selected");
eval (((this.pClip + ".") + weapon) + "_mc").highlight_mc._visible = true;
};
Frame 3
if (_framesloaded >= rTitleEndFrame) {
fnTitleLoaded();
} else {
play();
}
Frame 4
gotoAndPlay ("loadloop");
Frame 6
play();
Instance of Symbol 6 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (gSFROOT.getBytesLoaded() == gSFROOT.getBytesTotal()) {
this._visible = false;
if (gSFROOT.rTitleShown == true) {
gSFROOT.fnGameLoaded();
}
}
}
Frame 8
if (getBytesLoaded() == getBytesTotal()) {
fnGameLoaded();
} else {
rTitleShown = true;
gotoAndPlay ("title");
}
Frame 10
if (oMusic.pState == "on") {
AudioMusic_MC.gotoAndPlay("introPlay");
}
stop();
next_btn.onRelease = function () {
gotoAndStop ("intro1");
};
Frame 13
stop();
Frame 18
fnSetUpInterface();
if (rGameSetUp == false) {
fnSetUpGame();
}
if (rHelpShown == false) {
fnShowHelp();
}
fnFadeUp();
stop();
sceneMover_mc.onEnterFrame = function () {
if (rGameOn == true) {
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
if (scrollingObjs_array[_local1].scrollMe() == false) {
scrollingObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
var _local2 = 0;
_local2 = 0;
while (_local2 < trailingObjs_array.length) {
trailingObjs_array[_local2].scrollMeTrailing();
_local2++;
}
oObiWan.checkForCollision();
oAnakin.checkForCollision();
oLauncher.addDistance();
}
};
help_btn.onRelease = function () {
fnShowHelp();
};
Instance of Symbol 187 MovieClip "musicToggle_mc" in Frame 18
onClipEvent (load) {
this.gotoAndStop("music_" + gSFROOT.oMusic.getState());
}
Instance of Symbol 197 MovieClip "levDisplay_mc" in Frame 18
onClipEvent (load) {
this.gotoAndStop("lev" + gSFROOT.oLevel.getCurrent());
}
Frame 23
fnSetUpInterface();
if (rGameSetUp == false) {
fnSetUpGame();
}
if (rHelpShown == false) {
fnShowHelp();
}
fnFadeUp();
stop();
sceneMover_mc.onEnterFrame = function () {
if (rGameOn == true) {
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
if (scrollingObjs_array[_local1].scrollMe() == false) {
scrollingObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
var _local2 = 0;
_local2 = 0;
while (_local2 < trailingObjs_array.length) {
trailingObjs_array[_local2].scrollMeTrailing();
_local2++;
}
oObiWan.checkVertPosition();
oAnakin.checkForCollision();
oLauncher.addDistance();
}
};
help_btn.onRelease = function () {
fnShowHelp();
};
Frame 28
fnSetUpInterface();
if (rGameSetUp == false) {
fnSetUpGame();
}
if (rHelpShown == false) {
fnShowHelp();
}
fnFadeUp();
stop();
sceneMover_mc.onEnterFrame = function () {
if (rGameOn == true) {
var _local1 = 0;
_local1 = 0;
while (_local1 < scrollingObjs_array.length) {
if (scrollingObjs_array[_local1].scrollMe() == false) {
scrollingObjs_array.splice(_local1, 1);
_local1--;
}
_local1++;
}
var _local2 = 0;
_local2 = 0;
while (_local2 < trailingObjs_array.length) {
trailingObjs_array[_local2].scrollMeTrailing();
_local2++;
}
oObiWan.checkForCollision();
oAnakin.checkForCollision();
oLauncher.addDistance();
}
};
help_btn.onRelease = function () {
fnShowHelp();
};
Frame 34
stop();
Frame 39
stop();
Frame 44
stop();
Frame 49
stop();
Frame 54
stop();
Frame 59
stop();
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 10
gotoAndStop ("park");
Symbol 57 MovieClip Frame 20
gotoAndStop ("park");
Symbol 57 MovieClip Frame 30
gotoAndStop ("park");
Symbol 57 MovieClip Frame 40
gotoAndStop ("park");
Symbol 57 MovieClip Frame 50
gotoAndStop ("park");
Symbol 57 MovieClip Frame 60
gotoAndStop ("park");
Symbol 57 MovieClip Frame 70
gotoAndStop ("park");
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 11
gotoAndStop ("park");
Symbol 70 MovieClip Frame 21
gotoAndStop ("park");
Symbol 70 MovieClip Frame 31
gotoAndStop ("park");
Symbol 70 MovieClip Frame 41
gotoAndStop ("park");
Symbol 70 MovieClip Frame 50
gSFROOT.whichMusic = "intro";
Symbol 70 MovieClip Frame 90
if (gSFROOT.whichMusic == "intro") {
if (gSFROOT.oMusic.pState == "on") {
gSFROOT.AudioMusic_MC.gotoAndPlay("introPlay");
}
}
gotoAndStop ("park");
Symbol 70 MovieClip Frame 98
gotoAndStop ("park");
Symbol 70 MovieClip Frame 111
gotoAndStop ("park");
Symbol 85 MovieClip Frame 1
play();
Symbol 85 MovieClip Frame 73
next_btn.onRelease = function () {
gSFROOT.gotoAndStop("lev1");
};
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 2
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 104 MovieClip Frame 4
_parent.vObjRef.dropBomb();
Symbol 108 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 2
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 108 MovieClip Frame 4
_parent.vObjRef.fireTorpedo();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 3
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 111 MovieClip Frame 7
gotoAndStop ("base");
Symbol 111 MovieClip Frame 8
gotoAndStop ("base");
Symbol 116 MovieClip Frame 1
_parent._alpha = 100;
stop();
Symbol 116 MovieClip Frame 3
_parent._alpha = 20;
play();
Symbol 116 MovieClip Frame 5
_parent._alpha = 100;
play();
Symbol 116 MovieClip Frame 7
_parent._alpha = 20;
play();
Symbol 116 MovieClip Frame 9
_parent._alpha = 100;
play();
Symbol 116 MovieClip Frame 11
_parent._alpha = 20;
play();
Symbol 116 MovieClip Frame 13
_parent._alpha = 100;
play();
Symbol 116 MovieClip Frame 15
_parent._alpha = 20;
play();
Symbol 116 MovieClip Frame 17
_parent._alpha = 100;
gotoAndStop ("base");
Symbol 128 MovieClip Frame 2
stop();
Symbol 128 MovieClip Frame 6
stop();
Symbol 128 MovieClip Frame 9
stop();
Symbol 132 MovieClip Frame 1
_parent._alpha = 100;
stop();
Symbol 132 MovieClip Frame 3
_parent._alpha = 20;
play();
Symbol 132 MovieClip Frame 5
_parent._alpha = 100;
play();
Symbol 132 MovieClip Frame 7
_parent._alpha = 20;
play();
Symbol 132 MovieClip Frame 9
_parent._alpha = 100;
play();
Symbol 132 MovieClip Frame 11
_parent._alpha = 20;
play();
Symbol 132 MovieClip Frame 13
_parent._alpha = 100;
play();
Symbol 132 MovieClip Frame 15
_parent._alpha = 20;
play();
Symbol 132 MovieClip Frame 17
_parent._alpha = 100;
gotoAndStop ("base");
Symbol 137 MovieClip Frame 2
stop();
Symbol 137 MovieClip Frame 6
stop();
Symbol 137 MovieClip Frame 9
stop();
Symbol 141 MovieClip Frame 2
vStartDist = gSFROOT.oLauncher.getDistance();
vReqTravelDist = Math.randomInteger(_parent.vAttackTravelMin, _parent.vAttackTravelMax);
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 141 MovieClip Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 141 MovieClip Frame 6
if ((gSFROOT.oLauncher.getDistance() - vStartDist) >= vReqTravelDist) {
_parent.vObjRef.callAttack();
} else if (gSFROOT.rGameOn == true) {
gotoAndPlay ("loop");
} else {
gotoAndStop ("loop");
}
Symbol 147 MovieClip [triFighterLaser] Frame 1
stop();
Symbol 147 MovieClip [triFighterLaser] Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 147 MovieClip [triFighterLaser] Frame 11
vObjRef.removeMe();
Symbol 147 MovieClip [triFighterLaser] Frame 12
vObjRef.removeMe();
Symbol 149 MovieClip [triFighter] Frame 2
stop();
Symbol 149 MovieClip [triFighter] Frame 4
attackCaller_mc.gotoandPlay("reset");
stop();
Symbol 149 MovieClip [triFighter] Frame 7
vObjRef.checkInitialWeapons();
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 149 MovieClip [triFighter] Frame 8
vObjRef.checkInitialWeapons();
Symbol 149 MovieClip [triFighter] Frame 9
vObjRef.checkInitialWeapons();
Symbol 149 MovieClip [triFighter] Frame 10
vObjRef.fireWeapon();
Symbol 149 MovieClip [triFighter] Frame 12
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 149 MovieClip [triFighter] Frame 18
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 149 MovieClip [triFighter] Frame 19
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 153 MovieClip [vultureDroidLaser] Frame 1
stop();
Symbol 153 MovieClip [vultureDroidLaser] Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 153 MovieClip [vultureDroidLaser] Frame 11
vObjRef.removeMe();
Symbol 153 MovieClip [vultureDroidLaser] Frame 12
vObjRef.removeMe();
Symbol 155 MovieClip [vultureDroid] Frame 2
stop();
Symbol 155 MovieClip [vultureDroid] Frame 4
attackCaller_mc.gotoandPlay("reset");
stop();
Symbol 155 MovieClip [vultureDroid] Frame 7
vObjRef.checkInitialWeapons();
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 155 MovieClip [vultureDroid] Frame 8
vObjRef.checkInitialWeapons();
Symbol 155 MovieClip [vultureDroid] Frame 9
vObjRef.fireWeapon();
Symbol 155 MovieClip [vultureDroid] Frame 11
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 155 MovieClip [vultureDroid] Frame 15
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 155 MovieClip [vultureDroid] Frame 16
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 157 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 162 MovieClip [torpedo] Frame 2
stop();
Symbol 162 MovieClip [torpedo] Frame 4
play();
Symbol 162 MovieClip [torpedo] Frame 6
vObjRef.addToScrollArray();
Symbol 162 MovieClip [torpedo] Frame 7
stop();
Symbol 162 MovieClip [torpedo] Frame 11
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 162 MovieClip [torpedo] Frame 15
vObjRef.removeMe();
Symbol 162 MovieClip [torpedo] Frame 16
vObjRef.removeMe();
Symbol 165 MovieClip [laser] Frame 1
stop();
Symbol 165 MovieClip [laser] Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 165 MovieClip [laser] Frame 8
vObjRef.removeMe();
Symbol 165 MovieClip [laser] Frame 9
vObjRef.removeMe();
Symbol 167 MovieClip [bomb] Frame 1
stop();
Symbol 167 MovieClip [bomb] Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 167 MovieClip [bomb] Frame 9
vObjRef.removeFromScrollArray();
Symbol 167 MovieClip [bomb] Frame 10
vObjRef.removeMe();
Symbol 167 MovieClip [bomb] Frame 11
vObjRef.removeMe();
Symbol 169 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 2
musicOff_btn.onRelease = function () {
gSFROOT.AudioMusic_MC.gotoAndPlay("mainStop");
gSFROOT.AudioMusic_MC.gotoAndPlay("introStop");
gSFROOT.AudioMusic_MC.gotoAndPlay("endStop");
gSFROOT.oMusic.toggleMusic("off");
};
stop();
Symbol 187 MovieClip Frame 4
musicOn_btn.onRelease = function () {
gSFROOT.AudioMusic_MC.gotoAndPlay(gSFROOT.whichMusic + "Play");
gSFROOT.oMusic.toggleMusic("on");
};
stop();
Symbol 197 MovieClip Frame 2
stop();
Symbol 197 MovieClip Frame 5
stop();
Symbol 197 MovieClip Frame 8
stop();
Symbol 202 MovieClip Frame 1
function fnUpdateDisplay() {
var _local1 = gSFROOT.oScore.getCurrent();
score1_mc.score_txt.text = _local1;
score2_mc.score_txt.text = _local1;
}
gSFROOT.oScore.updateScore();
stop();
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 40
stop();
Symbol 209 MovieClip Frame 1
function fnUpdate() {
var _local2 = gSFROOT.oAnakin.getCombinedDamage();
var _local1;
if (_local2 == 0) {
_local1 = 1;
} else if (_local2 >= gSFROOT.oAnakin.getMaxDamage()) {
_local1 = meter1_mc._totalframes;
} else {
_local1 = 2 + Math.floor((_local2 * (meter1_mc._totalframes - 2)) / gSFROOT.oAnakin.getMaxDamage());
}
meter1_mc.gotoAndStop(_local1);
meter2_mc.gotoAndStop(_local1);
}
gSFROOT.oDamageDisplay.update();
stop();
Symbol 228 MovieClip Frame 2
laser_btn.onRelease = function () {
_parent.vObjRef.selectWeapon("laser");
};
stop();
Symbol 228 MovieClip Frame 5
stop();
Symbol 228 MovieClip Frame 8
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 228 MovieClip Frame 25
Symbol 233 MovieClip Frame 2
torpedo_btn.onRelease = function () {
_parent.vObjRef.selectWeapon("torpedo");
};
stop();
Symbol 233 MovieClip Frame 5
stop();
Symbol 233 MovieClip Frame 8
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 233 MovieClip Frame 43
gSFROOT.oWeaponsMenu.rechargeDone("torpedo");
Symbol 238 MovieClip Frame 2
bomb_btn.onRelease = function () {
_parent.vObjRef.selectWeapon("bomb");
};
stop();
Symbol 238 MovieClip Frame 5
stop();
Symbol 238 MovieClip Frame 8
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 238 MovieClip Frame 25
gSFROOT.oWeaponsMenu.rechargeDone("bomb");
Symbol 239 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
start_btn.onRelease = function () {
gSFROOT.fnExitHelp();
};
stop();
Symbol 307 MovieClip Frame 5
continue_btn.onRelease = function () {
gSFROOT.fnExitHelp();
};
stop();
Symbol 308 MovieClip Frame 2
stop();
Symbol 308 MovieClip Frame 4
mask_btn.useHandCursor = false;
stop();
Instance of Symbol 307 MovieClip in Symbol 308 MovieClip Frame 4
onClipEvent (load) {
if (gSFROOT.rHelpShown == true) {
this.gotoAndStop("ingame");
} else {
this.gotoAndStop("intro");
}
}
Symbol 311 MovieClip Frame 2
stop();
Symbol 311 MovieClip Frame 4
play();
Symbol 311 MovieClip Frame 9
if (gSFROOT.rHelpShown == true) {
gSFROOT.fnStartLevel();
}
gotoAndStop ("base");
Symbol 315 MovieClip Frame 2
stop();
Symbol 315 MovieClip Frame 5
vDist = 0;
vLaunchDist = Math.randomInteger(vMinDist, vMaxDist);
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 315 MovieClip Frame 7
if ((vDist >= vLaunchDist) || (vObjRef.getEnemyCount() == 0)) {
if (gSFROOT.rGameOn == true) {
gotoAndPlay ("try_launch");
} else {
gotoAndStop ("try_launch");
}
} else if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 315 MovieClip Frame 10
if (gSFROOT.rGameOn == true) {
gotoAndPlay ("loop");
} else {
gotoAndStop ("loop");
}
Symbol 315 MovieClip Frame 11
gotoAndPlay ("loop");
Symbol 315 MovieClip Frame 16
vObjRef.tryLaunch();
Symbol 315 MovieClip Frame 21
vObjRef.hitTestNewClip();
Symbol 315 MovieClip Frame 23
gotoAndPlay ("wait");
Symbol 319 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 3
var i = 0;
while (i < shakers_array.length) {
shakers_array[i].resetShake();
shakers_array[i].shakeMe(2, "up");
i++;
}
Symbol 319 MovieClip Frame 4
var i = 0;
while (i < shakers_array.length) {
shakers_array[i].shakeMe(2, "down");
i++;
}
Symbol 319 MovieClip Frame 5
var i = 0;
while (i < shakers_array.length) {
shakers_array[i].shakeMe(2, "up");
i++;
}
Symbol 319 MovieClip Frame 6
var i = 0;
while (i < shakers_array.length) {
shakers_array[i].shakeMe(2, "down");
i++;
}
Symbol 319 MovieClip Frame 8
gotoAndStop ("base");
Symbol 321 MovieClip Frame 2
stop();
Symbol 321 MovieClip Frame 5
vCount++;
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 321 MovieClip Frame 23
if (vCount >= vMaxCount) {
gSFROOT.oTimer.stopTimedPortion();
} else {
gotoAndPlay ("go");
}
Symbol 321 MovieClip Frame 24
gotoAndPlay ("go");
Symbol 328 MovieClip Frame 1
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 328 MovieClip Frame 32
_parent.vObjRef.attackObiWan();
Symbol 328 MovieClip Frame 79
gotoAndPlay ("attack");
Symbol 328 MovieClip Frame 80
gotoAndPlay ("attack");
Symbol 329 MovieClip [buzzDroid] Frame 2
stop();
Symbol 329 MovieClip [buzzDroid] Frame 4
vObjRef.pClipPlaying = false;
stop();
Symbol 329 MovieClip [buzzDroid] Frame 7
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (gSFROOT.rGameOn == true) {
if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
} else {
stop();
}
Symbol 329 MovieClip [buzzDroid] Frame 8
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
Symbol 329 MovieClip [buzzDroid] Frame 11
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 329 MovieClip [buzzDroid] Frame 47
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (vObjRef.pInPosition == true) {
if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
} else {
gotoAndStop ("base");
}
Symbol 329 MovieClip [buzzDroid] Frame 48
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (vObjRef.pInPosition == true) {
if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
} else {
gotoAndStop ("base");
}
Symbol 329 MovieClip [buzzDroid] Frame 49
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 329 MovieClip [buzzDroid] Frame 101
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (vObjRef.pInPosition == true) {
if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
} else {
gotoAndStop ("base");
}
Symbol 329 MovieClip [buzzDroid] Frame 102
if (vObjRef.pKilled == true) {
gotoAndPlay ("die");
} else if (vObjRef.pInPosition == true) {
if (Math.random() > 0.5) {
gotoAndPlay ("anim1");
} else {
gotoAndPlay ("anim2");
}
} else {
gotoAndStop ("base");
}
Symbol 329 MovieClip [buzzDroid] Frame 103
stop();
Symbol 329 MovieClip [buzzDroid] Frame 106
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 329 MovieClip [buzzDroid] Frame 111
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 329 MovieClip [buzzDroid] Frame 112
vObjRef.removeFromScrollArray();
vObjRef.removeMe(true);
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 337 MovieClip Frame 47
gotoAndStop ("base");
Symbol 337 MovieClip Frame 48
gotoAndStop ("base");
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 344 MovieClip Frame 43
gotoAndStop ("base");
Symbol 344 MovieClip Frame 44
gotoAndStop ("base");
Symbol 357 MovieClip [battleDroidLaser] Frame 2
stop();
Symbol 357 MovieClip [battleDroidLaser] Frame 6
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 357 MovieClip [battleDroidLaser] Frame 10
vObjRef.removeMe();
Symbol 357 MovieClip [battleDroidLaser] Frame 11
vObjRef.removeMe();
Symbol 358 MovieClip Frame 2
stop();
Symbol 358 MovieClip Frame 5
_parent.vObjRef.calculateShootAngle();
Symbol 358 MovieClip Frame 6
_parent.vObjRef.raiseArm();
Symbol 358 MovieClip Frame 7
_parent.vObjRef.raiseArm();
Symbol 358 MovieClip Frame 8
_parent.vObjRef.checkInitContact();
Symbol 358 MovieClip Frame 9
_parent.vObjRef.checkInitContact();
Symbol 358 MovieClip Frame 10
_parent.vObjRef.checkInitContact();
Symbol 358 MovieClip Frame 11
_parent.vObjRef.placeWeapon();
_parent.vObjRef.fireWeapon();
Symbol 358 MovieClip Frame 12
_parent.vObjRef.lowerArm();
Symbol 358 MovieClip Frame 13
_parent.vObjRef.lowerArm();
Symbol 358 MovieClip Frame 14
_parent.vObjRef.doneShooting();
gotoAndStop ("base");
Symbol 361 MovieClip Frame 2
vStartDist = gSFROOT.oLauncher.getDistance();
vReqTravelDist = Math.randomInteger(_parent.vAttackTravelMin, _parent.vAttackTravelMax);
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 361 MovieClip Frame 4
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 361 MovieClip Frame 6
if (_parent.vObjRef.getOnScreenVar() == true) {
if ((gSFROOT.oLauncher.getDistance() - vStartDist) >= vReqTravelDist) {
_parent.vObjRef.callAttack();
} else if (gSFROOT.rGameOn == true) {
gotoAndPlay ("loop");
} else {
gotoAndStop ("loop");
}
} else {
_parent.vObjRef.checkOffScreenAttack();
}
Symbol 398 MovieClip [battleDroids] Frame 2
stop();
Symbol 398 MovieClip [battleDroids] Frame 3
attackCaller_mc.gotoandPlay("reset");
stop();
Symbol 398 MovieClip [battleDroids] Frame 8
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 398 MovieClip [battleDroids] Frame 16
gSFROOT.fnCheckLevelEnd();
vObjRef.stopClip();
Symbol 398 MovieClip [battleDroids] Frame 19
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 398 MovieClip [battleDroids] Frame 31
gSFROOT.fnCheckLevelEnd();
vObjRef.stopClip();
Symbol 398 MovieClip [battleDroids] Frame 33
if (gSFROOT.rGameOn == true) {
play();
} else {
stop();
}
Symbol 398 MovieClip [battleDroids] Frame 42
gSFROOT.fnCheckLevelEnd();
vObjRef.stopClip();
Symbol 399 MovieClip Frame 116
stop();
Symbol 415 MovieClip Frame 1
playAgain_btn.onRelease = function () {
gSFROOT.fnPlayAgain();
};
stop();
Symbol 416 MovieClip Frame 1
score_txt.text = gSFROOT.oScore.getCurrent();
play();
Symbol 416 MovieClip Frame 34
stop();
Symbol 420 MovieClip Frame 12
stop();
Symbol 421 MovieClip Frame 31
stop();
Symbol 439 MovieClip Frame 5
stop();
Symbol 440 MovieClip Frame 1
play();
Symbol 440 MovieClip Frame 24
stop();
Symbol 463 MovieClip Frame 1
play();
Symbol 463 MovieClip Frame 54
stop();
gSFROOT.gotoAndStop("lev2");
Symbol 469 MovieClip Frame 1
play();
Symbol 469 MovieClip Frame 24
stop();
Symbol 490 MovieClip Frame 1
play();
Symbol 490 MovieClip Frame 84
stop();
gSFROOT.gotoAndStop("lev3");
Symbol 495 MovieClip Frame 12
stop();
Symbol 496 MovieClip Frame 1
play();
Symbol 496 MovieClip Frame 30
stop();
Symbol 503 MovieClip Frame 1
play();
Symbol 503 MovieClip Frame 27
stop();