Frame 1
stop();
Stage.showMenu = false;
quality = "High";
q = 0;
onEnterFrame = function () {
if (Key.isDown(81)) {
if ((_quality == "HIGH") and (q == 0)) {
_quality = "LOW";
q = 1;
}
if ((_quality == "LOW") and (q == 0)) {
_quality = "MEDIUM";
q = 1;
}
if ((_quality == "MEDIUM") and (q == 0)) {
_quality = "HIGH";
q = 1;
}
}
if ((q > 0) and (q < 11)) {
q = q + 1;
}
if (q == 11) {
q = 0;
}
};
Frame 2
play();
Frame 4
if (Menu._name != "Menu") {
attachMovie("Menu", "Menu", 100000);
}
removeMovieClip(Credits);
removeMovieClip(Sith1);
removeMovieClip(Sith2);
removeMovieClip(Sith3);
removeMovieClip(Sith4);
removeMovieClip(Sith5);
Frame 5
stop();
returntomenu = 0;
onEnterFrame = function () {
if ((Menu.show == false) and (Menu._alpha <= 0)) {
removeMovieClip(Menu);
}
if (Menu._name == "Menu") {
Back._visible = false;
} else {
Back._visible = true;
}
if (returntomenu == 1) {
returntomenu = 2;
attachMovie("Menu", "Menu", 100000);
}
if (Key.isDown(81)) {
if ((_quality == "HIGH") and (q == 0)) {
_quality = "LOW";
q = 1;
}
if ((_quality == "LOW") and (q == 0)) {
_quality = "MEDIUM";
q = 1;
}
if ((_quality == "MEDIUM") and (q == 0)) {
_quality = "HIGH";
q = 1;
}
}
if ((q > 0) and (q < 11)) {
q = q + 1;
}
if (q == 11) {
q = 0;
}
};
Frame 6
stop();
Lightsabercollision = 0;
Background.gotoAndStop(57);
STFight = 0;
STHit = 0;
STJediDead = 0;
game = 1;
enemies = 100;
SithLord = 0;
gameover = 0;
complete = 0;
s1 = 0;
s2 = 0;
s3 = 0;
s4 = 0;
s5 = 0;
attachMovie("HUD", "HUD", 30000);
HUD._x = 350;
HUD._y = 10;
createEmptyMovieClip("IngameMusicMC", 20000);
BG = new Sound(IngameMusicMC);
BG.attachSound("IngameMusic");
BG.setVolume(200);
BG.start(0, 99999);
createEmptyMovieClip("LightsaberStillMC", 10000);
LightsaberStill = new Sound(LightsaberStillMC);
LightsaberStill.attachSound("LightsaberStill");
LightsaberStill.setVolume(300);
LightsaberStill.start(0, 99999);
createEmptyMovieClip("LightsaberSwing1MC", 10001);
LightsaberSwing1 = new Sound(LightsaberSwing1MC);
LightsaberSwing1.attachSound("LightsaberSwing1");
createEmptyMovieClip("LightsaberSwing2MC", 10002);
LightsaberSwing2 = new Sound(LightsaberSwing2MC);
LightsaberSwing2.attachSound("LightsaberSwing2");
createEmptyMovieClip("LightsaberESwing1MC", 11001);
LightsaberESwing1 = new Sound(LightsaberESwing1MC);
LightsaberESwing1.attachSound("LightsaberSwing1");
LightsaberESwing1.setVolume(30);
createEmptyMovieClip("LightsaberESwing2MC", 11002);
LightsaberESwing2 = new Sound(LightsaberESwing2MC);
LightsaberESwing2.attachSound("LightsaberSwing2");
LightsaberESwing2.setVolume(30);
createEmptyMovieClip("LightsaberHitMC", 10003);
LightsaberHit = new Sound(LightsaberHitMC);
LightsaberHit.attachSound("LightsaberHit");
createEmptyMovieClip("ForcePushSoundMC", 10004);
ForcePushSound = new Sound(ForcePushSoundMC);
ForcePushSound.attachSound("ForcePushSound");
createEmptyMovieClip("ForceJumpMC", 10005);
ForceJump = new Sound(ForceJumpMC);
ForceJump.attachSound("ForceJump");
createEmptyMovieClip("LightsaberHitBodyMC", 10006);
LightsaberHitBody = new Sound(LightsaberHitBodyMC);
LightsaberHitBody.attachSound("LightsaberHitBody");
createEmptyMovieClip("LightsaberEHitBodyMC", 11003);
LightsaberEHitBody = new Sound(LightsaberEHitBodyMC);
LightsaberEHitBody.attachSound("LightsaberHitBody");
LightsaberEHitBody.setVolume(30);
createEmptyMovieClip("BlasterShotMC", 10007);
BlasterShot = new Sound(BlasterShotMC);
BlasterShot.attachSound("BlasterShot");
createEmptyMovieClip("ForcePushSoundEMC", 11004);
ForcePushSoundE = new Sound(ForcePushSoundEMC);
ForcePushSoundE.attachSound("ForcePushSound");
createEmptyMovieClip("ForceLightningSoundMC", 11005);
ForceLightningSound = new Sound(ForceLightningSoundMC);
ForceLightningSound.attachSound("ForceLightningSound");
createEmptyMovieClip("ForceLightningHitLightsaberMC", 11006);
ForceLightningHitLightsaber = new Sound(ForceLightningHitLightsaberMC);
ForceLightningHitLightsaber.attachSound("ForceLightningHitLightsaber");
createEmptyMovieClip("STFight1MC", 12001);
STFight1 = new Sound(STFight1MC);
STFight1.attachSound("STFight1");
createEmptyMovieClip("STFight2MC", 12002);
STFight2 = new Sound(STFight2MC);
STFight2.attachSound("STFight2");
createEmptyMovieClip("STFight3MC", 12003);
STFight3 = new Sound(STFight3MC);
STFight3.attachSound("STFight3");
createEmptyMovieClip("STFight4MC", 12004);
STFight4 = new Sound(STFight4MC);
STFight4.attachSound("STFight4");
createEmptyMovieClip("STFight5MC", 12005);
STFight5 = new Sound(STFight5MC);
STFight5.attachSound("STFight5");
createEmptyMovieClip("STHit1MC", 12006);
STHit1 = new Sound(STHit1MC);
STHit1.attachSound("STHit1");
createEmptyMovieClip("STHit2MC", 12007);
STHit2 = new Sound(STHit2MC);
STHit2.attachSound("STHit2");
createEmptyMovieClip("STJediDead1MC", 12008);
STJediDead1 = new Sound(STJediDead1MC);
STJediDead1.attachSound("STJediDead1");
createEmptyMovieClip("STJediDead2MC", 12009);
STJediDead2 = new Sound(STJediDead2MC);
STJediDead2.attachSound("STJediDead2");
onEnterFrame = function () {
var _local1 = _root;
if ((Menu.show == false) and (Menu._alpha <= 0)) {
removeMovieClip(Menu);
}
if (game == 1) {
moveobjects = moveobjects1 + moveobjects2;
} else {
game = 0;
}
if (enemies > 0) {
if (s1 == 0) {
attachMovie("Sith", "Sith1", 1);
s1 = 1;
enemies = enemies - 1;
}
if (s2 == 0) {
attachMovie("Sith", "Sith2", 2);
s2 = 1;
enemies = enemies - 1;
}
if (s3 == 0) {
attachMovie("Sith", "Sith3", 3);
s3 = 1;
enemies = enemies - 1;
}
if (s4 == 0) {
attachMovie("StormTrooper", "Sith4", 4);
s4 = 1;
enemies = enemies - 1;
}
if (s5 == 0) {
attachMovie("StormTrooper", "Sith5", 5);
s5 = 1;
enemies = enemies - 1;
}
} else if (((((((s1 == 0) and (s2 == 0)) and (s3 == 0)) and (s4 == 0)) and (s5 == 0)) and (SithLord == 0)) and (game == 1)) {
attachMovie("SithLord", "Sith1", 1);
SithLord = 1;
}
enemiescount = enemies;
sithcount = 0;
while (sithcount <= 5) {
if (_local1["s" + sithcount] == 1) {
enemiescount = enemiescount + 1;
}
sithcount = sithcount + 1;
}
sithcount = 0;
if (Lightsabercollision > 0) {
moveobjects = 0;
_local1["Sith" + Lightsabercollision].Lightsabercollision = 1;
Jedi.walk = 0;
_local1["Sith" + Lightsabercollision].walk = 0;
Jedi.HandsLightsaber.gotoAndStop("Collision");
_local1["Sith" + Lightsabercollision].HandsLightsaber.gotoAndStop("Collision");
if (Key.isDown(40)) {
_local1.Jedi.collisionpoints = _local1.Jedi.collisionpoints + 1;
_local1["Sith" + Lightsabercollision].collisionpoints = _local1["Sith" + Lightsabercollision].collisionpoints - 1;
}
if (math.round(math.random() * 2) == 0) {
_local1.Jedi.collisionpoints = _local1.Jedi.collisionpoints - 1;
_local1["Sith" + Lightsabercollision].collisionpoints = _local1["Sith" + Lightsabercollision].collisionpoints + 1;
}
if (math.round(math.random() * 3) == 0) {
_local1.Jedi.collisionpoints = _local1.Jedi.collisionpoints - 3;
_local1["Sith" + Lightsabercollision].collisionpoints = _local1["Sith" + Lightsabercollision].collisionpoints + 3;
}
if ((Jedi.collisionpoints >= 30) or (_local1["Sith" + Lightsabercollision].collisionpoints >= 30)) {
_local1["Sith" + Lightsabercollision].Lightsabercollision = 0;
_local1.LightsaberHitBody.stop();
_local1.LightsaberHitBody.start();
if (Jedi.collisionpoints >= 30) {
if (_local1["Sith" + Lightsabercollision].enemy == 1) {
_local1["Sith" + Lightsabercollision].health = _local1["Sith" + Lightsabercollision].health - 100;
}
if (_local1["Sith" + Lightsabercollision].enemy == 3) {
_local1["Sith" + Lightsabercollision].health = _local1["Sith" + Lightsabercollision].health - 30;
}
if (Jedi.side == 1) {
_local1["Sith" + Lightsabercollision].collisionpush = 1;
}
if (Jedi.side == 2) {
_local1["Sith" + Lightsabercollision].collisionpush = 2;
}
}
if (_local1["Sith" + Lightsabercollision].collisionpoints >= 30) {
Jedi.health = Jedi.health - 10;
if (_local1["Sith" + Lightsabercollision].side == 1) {
Jedi.collisionpush = 1;
}
if (_local1["Sith" + Lightsabercollision].side == 2) {
Jedi.collisionpush = 2;
}
}
Jedi.collisionpoints = 0;
_local1["Sith" + Lightsabercollision].collisionpoints = 0;
Jedi.fight = 0;
_local1["Sith" + Lightsabercollision].fight = 0;
Jedi.HandsLightsaber.gotoAndStop(1);
_local1["Sith" + Lightsabercollision].HandsLightsaber.gotoAndStop(1);
Lightsabercollision = 0;
}
} else {
Lightsabercollision = 0;
}
if (STFight == 1) {
STFight = math.round(math.random() * 4) + 1;
_local1["STFight" + STFight].start();
STFight = 10;
}
if (STFight >= 10) {
STFight = STFight + 1;
}
if (STFight == 180) {
STFight = 0;
}
if (STHit == 1) {
STHit = math.round(math.random()) + 1;
_local1["STHit" + STHit].start();
STHit == 10;
}
if (STHit == 10) {
STHit = STHit + 1;
} else if (STHit == 60) {
STHit = 0;
}
if (STJediDead == 1) {
STFight = 1;
while (STFight <= 5) {
_local1["STFight" + STFight].stop();
STFight = STFight + 1;
}
STJediDead = math.round(math.random()) + 1;
_local1["STJediDead" + STJediDead].start();
STJediDead = 2;
}
if (gameover == 1) {
gameover = 2;
removeMovieClip(HUD);
attachMovie("Menu", "Menu", 100000);
}
if (complete == 1) {
complete = 2;
removeMovieClip(HUD);
attachMovie("Credits", "Credits", 99000);
}
if (Key.isDown(81)) {
if ((_quality == "HIGH") and (q == 0)) {
_quality = "LOW";
q = 1;
}
if ((_quality == "LOW") and (q == 0)) {
_quality = "MEDIUM";
q = 1;
}
if ((_quality == "MEDIUM") and (q == 0)) {
_quality = "HIGH";
q = 1;
}
}
if ((q > 0) and (q < 11)) {
q = q + 1;
}
if (q == 11) {
q = 0;
}
};
Frame 7
removeMovieClip(Sith1);
removeMovieClip(Sith2);
removeMovieClip(Sith3);
removeMovieClip(Sith4);
removeMovieClip(Sith5);
LightsaberStill.stop();
Symbol 11 Button
on (release) {
_root.gotoAndStop("Intro");
}
Symbol 12 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + 1);
};
Symbol 18 MovieClip [Bullet] Frame 1
reverse = 0;
sithcount = 1;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_x = (_x + (speed + _local1.moveobjects));
if ((_x < -100) or (_x > 800)) {
removeMovieClip(_local2);
}
if (reverse == 0) {
if (hitTest(_local1.Jedi) and (((_local1.Jedi.block == 1) and (((speed > 0) and (_local1.Jedi.side == 2)) or ((speed < 0) and (_local1.Jedi.side == 1)))) or hitTest(_local1.Jedi.HandsLightsaber.Force.ForcePush))) {
reverse = 1;
speed = speed * -1;
if (_local1.Jedi.block == 1) {
_local1.LightsaberHit.start();
}
} else if (hitTest(_local1.Jedi)) {
_local1.Jedi.health = _local1.Jedi.health - 1;
removeMovieClip(_local2);
}
}
while ((sithcount <= 5) and (reverse == 1)) {
if ((hitTest(_local1["Sith" + sithcount]) and (_local1["Sith" + sithcount].block == 1)) and (((speed > 0) and (_local1["Sith" + sithcount].side == 2)) or ((speed < 0) and (_local1["Sith" + sithcount].side == 1)))) {
reverse = 0;
speed = speed * -1;
} else if (hitTest(_local1["Sith" + sithcount])) {
_local1["Sith" + sithcount].health = _local1["Sith" + sithcount].health - 50;
if (_local1["Sith" + sithcount].Enemy == 2) {
_local1.STHit = 1;
}
removeMovieClip(_local2);
}
sithcount = sithcount + 1;
}
sithcount = 1;
};
Symbol 21 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
if (_local1.Jedi.health > 0) {
_visible = 1;
gotoAndStop(_local1.Jedi.health);
}
if (_local1.Jedi.health <= 0) {
_visible = 0;
}
};
Symbol 24 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
if (_local1.enemiescount > 0) {
_visible = 1;
gotoAndStop(_local1.enemiescount);
}
if (_local1.enemiescount <= 0) {
_visible = 0;
}
};
Symbol 25 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
if ((_local1.Sith1.health > 0) and (_local1.SithLord == 1)) {
_visible = 1;
gotoAndStop(_local1.Sith1.health);
}
if (_local1.Sith1.health <= 0) {
_visible = 0;
}
};
Symbol 59 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_parent.walk == 1) {
play();
} else {
gotoAndStop (1);
}
};
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 69 MovieClip Frame 1
hit = 0;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
if ((_local2._parent._parent._parent.fight == 1) or (_local2._parent._parent._parent.fight == 2)) {
if (((hitTest(_local1.Jedi.Hit) and (hit == 0)) and (_local1.Jedi.fight != _local2._parent._parent._parent.fight)) and (((_local1.Jedi.block == 0) and (_local1.Jedi.side != _local2._parent._parent._parent.side)) or ((_local1.Jedi.block == 1) and (_local1.Jedi.side == _local2._parent._parent._parent.side)))) {
hit = 1;
_local1.Jedi.health = _local1.Jedi.health - 1;
_local1.LightsaberEHitBody.start();
}
}
};
Symbol 73 MovieClip Frame 1
onEnterFrame = function () {
if (_parent._parent.walk == 1) {
play();
} else {
gotoAndStop (1);
}
};
Symbol 78 MovieClip Frame 1
_root.LightsaberESwing1.start(0, 1);
Symbol 78 MovieClip Frame 20
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 83 MovieClip Frame 1
_root.LightsaberESwing2.start(0, 1);
Symbol 83 MovieClip Frame 13
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 102 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _parent;
if (_local1._parent.Lightsabercollision == 1) {
_rotation = (_local1._parent.collisionpoints + _local1._parent.collisionstart);
}
};
Symbol 108 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
if (hitTest(_local1.Jedi.Hit) and (_local1.Jedi.fight != 3)) {
if (_parent._parent._parent.side == 1) {
_local1.Jedi.forcepushed = 1;
}
if (_parent._parent._parent.side == 2) {
_local1.Jedi.forcepushed = 2;
}
}
};
Symbol 111 MovieClip Frame 10
_root.ForcePushSoundE.stop();
_root.ForcePushSoundE.start();
Symbol 111 MovieClip Frame 30
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 134 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
if (_local2._parent._parent.forcelightninguse == 0) {
if (hitTest(_local1.Jedi) and (_local1.Jedi.forcedlightning == 0)) {
if ((_local1.Jedi.block == 0) or ((_local1.Jedi.block == 1) and (_local2._parent._parent.side == _local1.Jedi.side))) {
_local1.Jedi.forcedlightning = 1;
_local1.ForceLightningSound.start();
}
if ((_local1.Jedi.block == 1) and (_local2._parent._parent.side != _local1.Jedi.side)) {
_local2._parent._parent.forcedlightning = 1;
_local1.ForceLightningHitLightsaber.start();
}
} else {
_local1.ForceLightningSound.stop();
_local1.ForceLightningSound.start();
}
_local2._parent._parent.forcelightninguse = 1;
}
};
Symbol 134 MovieClip Frame 29
if (_root.Jedi.forcedlightning == 1) {
_root.Jedi.forcedlightning = 0;
}
if (_parent._parent._parent.forcedlightning == 1) {
_parent._parent._parent.forcedlightning = 0;
}
_parent._parent._parent.fight = 0;
_parent._parent._parent.forcelightninguse = 0;
_parent._parent.gotoAndStop(1);
Symbol 135 MovieClip Frame 11
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 15
stop();
Symbol 150 MovieClip Frame 70
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 159 MovieClip Frame 60
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 168 MovieClip Frame 70
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 177 MovieClip Frame 60
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 184 MovieClip Frame 70
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 193 MovieClip Frame 60
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 202 MovieClip Frame 70
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 211 MovieClip Frame 60
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 212 MovieClip [Sith] Frame 1
stop();
if (math.round(math.random()) == 0) {
} else {
Hit.nextFrame();
}
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
while ((_x <= _root.borderstart) or (_x >= _root.borderend)) {
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
}
_y = _parent.Jedi.ystart;
_xscale = _parent.Jedi.xscalestart;
_yscale = _parent.Jedi.yscalestart;
walk = 0;
if (_x < 0) {
side = 1;
}
if (_x > 700) {
side = 2;
_xscale = (_xscale * -1);
}
yspeed = 0;
ystart = _y;
jump = 0;
fight = 0;
block = 0;
action = 0;
movement = 0;
timetochangeaction = 0;
health = 100;
Lightsabercollision = 0;
collisionstart = -20;
collisionpoints = 0;
collisionpush = 0;
xspeed = 10;
death = 0;
forcepushed = 0;
xspeedpush = 20;
enemy = 1;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
if (_local1.game == 1) {
_x = (_x + _local1.moveobjects);
}
if ((collisionpush > 0) and (xspeed > 0)) {
if ((collisionpush == 1) and ((_x + xspeed) < _local1.borderend)) {
_x = (_x + xspeed);
}
if ((collisionpush == 2) and ((_x - xspeed) > _local1.borderstart)) {
_x = (_x - xspeed);
}
xspeed = xspeed - 1;
} else {
collisionpush = 0;
xspeed = 10;
}
if ((forcepushed > 0) and (xspeedpush > 0)) {
if ((forcepushed == 1) and ((_x + xspeedpush) < _local1.borderend)) {
_x = (_x + xspeedpush);
_rotation = (_rotation + 3);
}
if ((forcepushed == 2) and ((_x - xspeedpush) > _local1.borderstart)) {
_x = (_x - xspeedpush);
_rotation = (_rotation - 3);
}
xspeedpush = xspeedpush - 1;
} else {
forcepushed = 0;
xspeedpush = 20;
}
if ((health <= 0) and (death == 0)) {
death = math.round(math.random() * 3) + 1;
if (death == 1) {
if (Hit._currentframe == 1) {
gotoAndStop ("Dead1");
} else {
gotoAndStop ("Dead1-2");
}
}
if (death == 2) {
if (Hit._currentframe == 1) {
gotoAndStop ("Dead2");
} else {
gotoAndStop ("Dead2-2");
}
}
if (death == 3) {
if (Hit._currentframe == 1) {
gotoAndStop ("Dead3");
} else {
gotoAndStop ("Dead3-2");
}
}
if (death == 4) {
if (Hit._currentframe == 1) {
gotoAndStop ("Dead4");
} else {
gotoAndStop ("Dead4-2");
}
}
}
if (((((Lightsabercollision == 0) and (health > 0)) and (collisionpush == 0)) and (forcepushed == 0)) and (_local1.game == 1)) {
if ((side == 2) and (_x < _local2.Jedi._x)) {
side = 1;
_xscale = (-_xscale);
}
if ((side == 1) and (_x > _local2.Jedi._x)) {
side = 2;
_xscale = (-_xscale);
}
if (side == 1) {
distance = math.abs(_local1.Jedi._x - (_x + _xscale));
}
if (side == 2) {
distance = math.abs((_local1.Jedi._x + _local1.Jedi._xscale) - _x);
}
if ((distance > 100) and (math.round(math.random() * 40) == 0)) {
if (_x < _local2.Jedi._x) {
movement = 1;
}
if (_x > _local2.Jedi._x) {
movement = 2;
}
}
if (timetochangeaction == 0) {
timetochangeaction = 60;
movement = 0;
action = math.round(math.random() * 3);
} else {
timetochangeaction = timetochangeaction - 1;
}
if ((movement == 1) or (movement == 2)) {
walk = 1;
if ((movement == 1) and ((_x + 3) < _local1.borderend)) {
_x = (_x + 3);
}
if ((movement == 2) and ((_x - 3) > _local1.borderstart)) {
_x = (_x - 3);
}
} else {
walk = 0;
_rotation = 0;
}
if ((((movement == 3) and (jump == 0)) and (fight == 0)) and (block == 0)) {
jump = 1;
yspeed = -19;
_y = (_y + yspeed);
}
if (((action == 2) and (fight == 0)) and (block == 0)) {
fight = 1;
if ((jump == 0) or ((jump == 1) and (!((movement == 1) or (movement == 2))))) {
HandsLightsaber.gotoAndStop("Fight1");
}
if ((jump == 1) and ((movement == 1) or (movement == 2))) {
HandsLightsaber.gotoAndStop("Fight1Jump");
}
}
if (((action == 3) and (fight == 0)) and (block == 0)) {
fight = 2;
if ((jump == 0) or ((jump == 1) and (!((movement == 1) or (movement == 2))))) {
HandsLightsaber.gotoAndStop("Fight2");
}
if ((jump == 1) and ((movement == 1) or (movement == 2))) {
HandsLightsaber.gotoAndStop("Fight2Jump");
}
}
if (((action == 1) and (fight == 0)) and (jump == 0)) {
block = 1;
HandsLightsaber.gotoAndStop("Block");
} else {
block = 0;
if (HandsLightsaber._currentframe == 6) {
HandsLightsaber.gotoAndStop(1);
}
}
}
};
Symbol 214 MovieClip Frame 1
_visible = false;
onEnterFrame = function () {
if (_parent._parent.forcedlightning == 1) {
_visible = true;
} else {
_visible = false;
}
};
Symbol 229 MovieClip Frame 60
_root.SithLord = 0;
_root.game = 0;
_root.complete = 1;
removeMovieClip(_parent);
Symbol 230 MovieClip [SithLord] Frame 1
stop();
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
while ((_x <= _root.borderstart) or (_x >= _root.borderend)) {
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
}
_y = _parent.Jedi.ystart;
_xscale = _parent.Jedi.xscalestart;
_yscale = _parent.Jedi.yscalestart;
walk = 0;
if (_x < 0) {
side = 1;
}
if (_x > 700) {
side = 2;
_xscale = (_xscale * -1);
}
yspeed = 0;
ystart = _y;
jump = 0;
fight = 0;
block = 0;
action = 0;
movement = 0;
timetochangeaction = 0;
health = 500;
Lightsabercollision = 0;
collisionstart = -20;
collisionpoints = 0;
collisionpush = 0;
xspeed = 10;
death = 0;
forcepushed = 0;
xspeedpush = 20;
forcedlightning = 0;
forcedlightningrotation = 1;
forcelightninguse = 0;
enemy = 3;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
_local1.h2 = health;
if (_local1.game == 1) {
_x = (_x + _local1.moveobjects);
}
if ((collisionpush > 0) and (xspeed > 0)) {
if (collisionpush == 1) {
_x = (_x + xspeed);
}
if (collisionpush == 2) {
_x = (_x - xspeed);
}
xspeed = xspeed - 1;
} else {
collisionpush = 0;
xspeed = 10;
}
if ((forcepushed > 0) and (xspeedpush > 0)) {
if ((forcepushed == 1) and ((_x + xspeedpush) < _local1.borderend)) {
_x = (_x + xspeedpush);
_rotation = (_rotation + 3);
}
if ((forcepushed == 2) and ((_x - xspeedpush) > _local1.borderstart)) {
_x = (_x - xspeedpush);
_rotation = (_rotation - 3);
}
xspeedpush = xspeedpush - 1;
} else {
forcepushed = 0;
xspeedpush = 20;
}
if (forcedlightning == 1) {
if ((forcedlightningrotation == 1) and (_rotation < 5)) {
_rotation = (_rotation + 1);
}
if ((forcedlightningrotation == 1) and (_rotation == 5)) {
forcedlightningrotation = 2;
}
if ((forcedlightningrotation == 2) and (_rotation > -5)) {
_rotation = (_rotation - 1);
}
if ((forcedlightningrotation == 2) and (_rotation == -5)) {
forcedlightningrotation = 1;
}
health = health - 1;
}
if ((health <= 0) and (death == 0)) {
death = 1;
gotoAndStop ("Dead");
}
if ((((((Lightsabercollision == 0) and (health > 0)) and (collisionpush == 0)) and (forcepushed == 0)) and (forcedlightning == 0)) and (_local1.game == 1)) {
if ((side == 2) and (_x < _local2.Jedi._x)) {
side = 1;
_xscale = (-_xscale);
}
if ((side == 1) and (_x > _local2.Jedi._x)) {
side = 2;
_xscale = (-_xscale);
}
if (side == 1) {
distance = math.abs(_local1.Jedi._x - (_x + _xscale));
}
if (side == 2) {
distance = math.abs((_local1.Jedi._x + _local1.Jedi._xscale) - _x);
}
if ((distance > 100) and (math.round(math.random() * 40) == 0)) {
if (_x < _local2.Jedi._x) {
movement = 1;
}
if (_x > _local2.Jedi._x) {
movement = 2;
}
}
if (timetochangeaction == 0) {
timetochangeaction = 60;
movement = 0;
action = math.round(math.random() * 7);
if ((action == 4) or (action == 5)) {
timetochangeaction = 0;
}
if ((action == 6) or (action == 7)) {
timetochangeaction = 20;
}
} else {
timetochangeaction = timetochangeaction - 1;
}
if ((movement == 1) or (movement == 2)) {
walk = 1;
if (movement == 1) {
_x = (_x + 3);
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation + 15);
}
}
if (movement == 2) {
_x = (_x - 3);
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation - 15);
}
}
} else {
walk = 0;
_rotation = 0;
}
if ((((movement == 3) and (jump == 0)) and (fight == 0)) and (block == 0)) {
jump = 1;
yspeed = -19;
_y = (_y + yspeed);
}
if ((jump == 1) and (_y != ystart)) {
yspeed = yspeed + 1;
if (HandsLightsaber._currentframe == 5) {
if (_y < (ystart - 5)) {
yspeed = 12;
if (side == 1) {
_rotation = (_rotation + 5);
}
if (side == 2) {
_rotation = (_rotation - 5);
}
} else {
yspeed = 0;
_y = ystart;
HandsLightsaber.gotoAndStop(1);
fight = 0;
}
}
_y = (_y + yspeed);
} else {
jump = 0;
_y = ystart;
_rotation = 0;
}
if ((jump == 0) and (((fight == 1) and (HandsLightsaber._currentframe == 3)) or ((fight == 2) and (HandsLightsaber._currentframe == 5)))) {
HandsLightsaber.gotoAndStop(1);
fight = 0;
}
if (((action == 2) and (fight == 0)) and (block == 0)) {
fight = 1;
if ((jump == 0) or ((jump == 1) and (!((movement == 1) or (movement == 2))))) {
HandsLightsaber.gotoAndStop("Fight1");
}
if ((jump == 1) and ((movement == 1) or (movement == 2))) {
HandsLightsaber.gotoAndStop("Fight1Jump");
}
}
if (((action == 3) and (fight == 0)) and (block == 0)) {
fight = 2;
if ((jump == 0) or ((jump == 1) and (!((movement == 1) or (movement == 2))))) {
HandsLightsaber.gotoAndStop("Fight2");
}
if ((jump == 1) and ((movement == 1) or (movement == 2))) {
HandsLightsaber.gotoAndStop("Fight2Jump");
}
}
if (((((action == 4) or (action == 5)) and (fight == 0)) and (jump == 0)) and (block == 0)) {
fight = 3;
HandsLightsaber.gotoAndStop("ForcePush");
}
if (((((action == 6) or (action == 7)) and (fight == 0)) and (jump == 0)) and (block == 0)) {
fight = 4;
HandsLightsaber.gotoAndStop("ForceLightning");
}
if (((action == 1) and (fight == 0)) and (jump == 0)) {
block = 1;
HandsLightsaber.gotoAndStop("Block");
} else {
block = 0;
if (HandsLightsaber._currentframe == 6) {
HandsLightsaber.gotoAndStop(1);
}
}
}
};
Symbol 234 MovieClip Frame 1
bullet = 1000;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
if (_local2.shot == 1) {
_local1.attachMovie("Bullet", ["Bullet" + bullet], bullet);
_local1["Bullet" + bullet]._x = _local2._x;
if (_local2.side == 1) {
_local1["Bullet" + bullet]._x = _local1["Bullet" + bullet]._x + 90;
_local1["Bullet" + bullet].speed = 10;
}
if (_local2.side == 2) {
_local1["Bullet" + bullet]._x = _local1["Bullet" + bullet]._x - 85;
_local1["Bullet" + bullet].speed = -10;
}
_local1["Bullet" + bullet]._y = _local2._y;
_local1["Bullet" + bullet]._y = _local1["Bullet" + bullet]._y - 2;
_local1["Bullet" + bullet]._xscale = 20;
_local1["Bullet" + bullet]._yscale = 20;
bullet = bullet + 1;
_local2.shot = 0;
_local1.BlasterShot.start();
}
if (bullet == 1050) {
bullet = 1000;
}
};
Symbol 246 MovieClip Frame 45
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 254 MovieClip Frame 45
if (_parent._name == "Sith1") {
_root.s1 = 0;
}
if (_parent._name == "Sith2") {
_root.s2 = 0;
}
if (_parent._name == "Sith3") {
_root.s3 = 0;
}
if (_parent._name == "Sith4") {
_root.s4 = 0;
}
if (_parent._name == "Sith5") {
_root.s5 = 0;
}
removeMovieClip(_parent);
Symbol 255 MovieClip [StormTrooper] Frame 1
stop();
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
while ((_x <= _root.borderstart) or (_x >= _root.borderend)) {
if (math.round(math.random()) == 0) {
_x = (800 + math.round(math.random() * 200));
} else {
_x = ((-100 - _xscale) - math.round(math.random() * 200));
}
}
_y = _parent.Jedi.ystart;
_xscale = _parent.Jedi.xscalestart;
_yscale = _parent.Jedi.yscalestart;
walk = 0;
if (_x < 0) {
side = 1;
}
if (_x > 700) {
side = 2;
_xscale = (_xscale * -1);
}
yspeed = 0;
ystart = _y;
jump = 0;
fight = 0;
block = 0;
action = 0;
movement = 0;
timetochangeaction = 0;
health = 100;
Lightsabercollision = 0;
collisionstart = -20;
collisionpoints = 0;
collisionpush = 0;
xspeed = 10;
death = 0;
forcepushed = 0;
xspeedpush = 20;
shot = 0;
enemy = 2;
onEnterFrame = function () {
var _local1 = _root;
var _local2 = _parent;
_local1.h2 = health;
if (_local1.game == 1) {
_x = (_x + _local1.moveobjects);
}
if ((collisionpush > 0) and (xspeed > 0)) {
if (collisionpush == 1) {
_x = (_x + xspeed);
}
if (collisionpush == 2) {
_x = (_x - xspeed);
}
xspeed = xspeed - 1;
} else {
collisionpush = 0;
xspeed = 10;
}
if ((forcepushed > 0) and (xspeedpush > 0)) {
if ((forcepushed == 1) and ((_x + xspeedpush) < _local1.borderend)) {
_x = (_x + xspeedpush);
_rotation = (_rotation + 3);
}
if ((forcepushed == 2) and ((_x - xspeedpush) > _local1.borderstart)) {
_x = (_x - xspeedpush);
_rotation = (_rotation - 3);
}
xspeedpush = xspeedpush - 1;
} else {
forcepushed = 0;
xspeedpush = 20;
}
if ((health <= 0) and (death == 0)) {
death = math.round(math.random() * 1) + 1;
if (death == 1) {
gotoAndStop ("Dead1");
}
if (death == 2) {
gotoAndStop ("Dead2");
}
}
if (((_local1.game == 0) and (health > 0)) and (_local1.STJediDead == 0)) {
_local1.STJediDead = 1;
}
if (((((Lightsabercollision == 0) and (health > 0)) and (collisionpush == 0)) and (forcepushed == 0)) and (_local1.game == 1)) {
if ((((math.round(math.random() * 10) == 0) and (_local1.STFight == 0)) and (_x > 0)) and ((_x + _xscale) < 700)) {
_local1.STFight = 1;
}
if ((side == 2) and (_x < _local2.Jedi._x)) {
side = 1;
_xscale = (-_xscale);
}
if ((side == 1) and (_x > _local2.Jedi._x)) {
side = 2;
_xscale = (-_xscale);
}
if (side == 1) {
distance = math.abs(_local1.Jedi._x - (_x + _xscale));
}
if (side == 2) {
distance = math.abs((_local1.Jedi._x + _local1.Jedi._xscale) - _x);
}
if ((distance > 400) and (math.round(math.random() * 20) == 0)) {
if (_x < _local2.Jedi._x) {
movement = 1;
}
if (_x > _local2.Jedi._x) {
movement = 2;
}
}
if (timetochangeaction == 0) {
timetochangeaction = 60;
movement = 0;
action = math.round(math.random() * 1);
} else {
timetochangeaction = timetochangeaction - 1;
}
if ((movement == 1) or (movement == 2)) {
walk = 1;
if (movement == 1) {
_x = (_x + 3);
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation + 15);
}
}
if (movement == 2) {
_x = (_x - 3);
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation - 15);
}
}
} else {
walk = 0;
_rotation = 0;
}
if ((((movement == 3) and (jump == 0)) and (fight == 0)) and (block == 0)) {
jump = 1;
yspeed = -19;
_y = (_y + yspeed);
}
if ((((math.round(math.random() * 20) == 0) and (shot == 0)) and (_x > 0)) and ((_x + _xscale) < 700)) {
shot = 1;
Blaster.play();
}
}
};
Symbol 257 MovieClip [Dot] Frame 1
_x = ((math.round(math.random() * 699) + 1) - 350);
_y = ((math.round(math.random() * 399) + 1) - 200);
_xscale = 200;
_yscale = 200;
Symbol 267 MovieClip [Credits] Frame 1
stop();
_x = 350;
_y = 199.75;
show = true;
_alpha = 0;
count = 0;
menu = 0;
musicvolume = 200;
onEnterFrame = function () {
var _local1 = _root;
if (((show == true) and (_alpha < 100)) and (count == 0)) {
_alpha = (_alpha + 1);
}
if (((show == false) and (_alpha > 0)) and (count == 0)) {
_alpha = (_alpha - 1);
}
if (((show == true) and (_alpha == 100)) and (count == 0)) {
count = 21;
_local1.gotoAndStop("Credits");
}
if (count > 0) {
if ((count >= 1) and (count <= 20)) {
_alpha = (_alpha + 5);
}
if ((count >= 121) and (count <= 140)) {
_alpha = (_alpha - 5);
}
count = count + 1;
if ((count == 141) and (_currentframe < 5)) {
count = 1;
nextFrame();
}
}
if ((((count == 141) and (_alpha <= 0)) and (_currentframe == 5)) and (menu == 0)) {
menu = 1;
_local1.attachMovie("Menu", "Menu", 100000);
}
if (((_currentframe == 4) and (count >= 81)) or (_currentframe == 5)) {
if (musicvolume > 0) {
musicvolume = musicvolume - 1;
}
_local1.BG.setVolume(musicvolume);
if (musicvolume == 0) {
stopAllSounds();
}
}
};
Symbol 270 Button
on (release) {
playgame = 1;
}
Symbol 273 Button
on (release) {
instructions = 1;
}
Symbol 274 MovieClip [Menu] Frame 1
_x = 350;
_y = 170.25;
_alpha = 0;
Dot = 501;
while (Dot <= 550) {
attachMovie("Dot", ["Dot" + Dot], Dot);
Dot = Dot + 1;
}
show = true;
playgame = 0;
instructions = 0;
menuframe = 0;
onEnterFrame = function () {
var _local1 = _root;
if ((show == true) and (_alpha < 100)) {
_alpha = (_alpha + 1);
}
if ((show == false) and (_alpha > 0)) {
_alpha = (_alpha - 1);
}
if ((show == true) and (_alpha == 100)) {
if (menuframe == 0) {
menuframe = 1;
stopAllSounds();
_local1.gotoAndStop("Menu");
}
PlayButton._visible = true;
InstructionsButton._visible = true;
} else {
PlayButton._visible = false;
InstructionsButton._visible = false;
}
if ((playgame == 1) and (show == true)) {
show = false;
_local1.gotoAndStop("PlayGame");
}
if ((instructions == 1) and (show == true)) {
show = false;
_local1.gotoAndStop("Instructions");
}
};
Symbol 295 MovieClip Frame 1
stop();
_visible = false;
Symbol 298 Button
on (release) {
_root.gotoAndStop("Menu");
}
Symbol 303 MovieClip Frame 3683
_root.nextFrame();
Symbol 306 Button
on (release) {
returntomenu = 1;
}
Symbol 325 MovieClip Frame 1
_visible = false;
onEnterFrame = function () {
if (_name == "BorderStart") {
_root.borderstart = _x + _parent._x;
}
if (_name == "BorderEnd") {
_root.borderend = _x + _parent._x;
}
};
Symbol 326 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 1
hit = 0;
sithcount = 1;
onEnterFrame = function () {
var _local1 = _root;
if ((_local1.Jedi.fight == 1) or (_local1.Jedi.fight == 2)) {
while (sithcount <= 5) {
if (hitTest(_local1["Sith" + sithcount].Hit) and (hit == 0)) {
hit = 1;
if (((_local1.Jedi.fight != _local1["Sith" + sithcount].fight) or ((_local1.Jedi.fight == _local1["Sith" + sithcount].fight) and (math.abs(_local1.Jedi._y - _local1["Sith" + sithcount]._y) > 10))) and (((_local1["Sith" + sithcount].block == 0) and (_local1.Jedi.side != _local1["Sith" + sithcount].side)) or ((_local1["Sith" + sithcount].block == 1) and (_local1.Jedi.side == _local1["Sith" + sithcount].side)))) {
if (_local1["Sith" + sithcount].enemy <= 2) {
_local1["Sith" + sithcount].health = _local1["Sith" + sithcount].health - 50;
}
if (_local1["Sith" + sithcount].enemy == 3) {
_local1["Sith" + sithcount].health = _local1["Sith" + sithcount].health - 10;
}
if (_local1["Sith" + sithcount].enemy == 2) {
_local1.STHit = 1;
}
_local1.LightsaberHitBody.start();
}
if ((((_local1.Jedi.fight == _local1["Sith" + sithcount].fight) and (_local1.Jedi.fight > 0)) or (_local1["Sith" + sithcount].block == 1)) and (_local1.Jedi.side != _local1["Sith" + sithcount].side)) {
if ((((_local1.Jedi.jump == 0) and (_local1.Jedi.side != _local1["Sith" + sithcount].side)) and (_local1["Sith" + sithcount].distance >= 10)) and (_local1["Sith" + sithcount].distance <= 25)) {
_local1.LightsaberHit.start();
_local1.Lightsabercollision = sithcount;
}
}
}
sithcount = sithcount + 1;
}
sithcount = 1;
}
};
Symbol 336 MovieClip Frame 1
onEnterFrame = function () {
if (_parent._parent.walk == 1) {
play();
} else {
gotoAndStop (1);
}
};
Symbol 339 MovieClip Frame 1
_root.LightsaberSwing1.start(0, 1);
Symbol 339 MovieClip Frame 20
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 342 MovieClip Frame 1
_root.LightsaberSwing2.start(0, 1);
Symbol 342 MovieClip Frame 13
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 349 MovieClip Frame 1
sithcount = 1;
onEnterFrame = function () {
var _local1 = _root;
while (sithcount <= 5) {
if (hitTest(_local1["Sith" + sithcount].Hit) and (_local1["Sith" + sithcount].fight != 3)) {
if (_local1.Jedi.side == 1) {
_local1["Sith" + sithcount].forcepushed = 1;
}
if (_local1.Jedi.side == 2) {
_local1["Sith" + sithcount].forcepushed = 2;
}
}
sithcount = sithcount + 1;
}
sithcount = 1;
};
Symbol 351 MovieClip Frame 10
_root.ForcePushSound.stop();
_root.ForcePushSound.start();
Symbol 351 MovieClip Frame 30
_parent._parent.fight = 0;
_parent.gotoAndStop(1);
Symbol 366 MovieClip Frame 1
onEnterFrame = function () {
var _local1 = _root;
if (_local1.Lightsabercollision > 0) {
_rotation = (_local1.Jedi.collisionpoints + _local1.Jedi.collisionstart);
}
};
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 3
_root.LightsaberSwing1.start();
Symbol 367 MovieClip Frame 5
_root.LightsaberSwing2.start();
Symbol 369 MovieClip Frame 15
stop();
Symbol 378 MovieClip Frame 35
stop();
_root.gameover = 1;
Symbol 379 MovieClip Frame 1
stop();
walk = 0;
side = 1;
yspeed = 0;
xstart = _x;
ystart = _y;
xscalestart = _xscale;
yscalestart = _yscale;
jump = 0;
fight = 0;
block = 0;
health = 500;
collisionstart = -20;
collisionpoints = 0;
collisionpush = 0;
xspeed = 10;
forcedlightning = 0;
forcedlightningrotation = 1;
forcepushed = 0;
xspeedpush = 15;
onEnterFrame = function () {
var _local1 = _root;
_x = xstart;
if ((collisionpush > 0) and (xspeed > 0)) {
if ((collisionpush == 1) and (_local1.Background._currentframe < 600)) {
_local1.moveobjects2 = -xspeed;
_local1.Background.nextFrame();
}
if ((collisionpush == 2) and (_local1.Background._currentframe > 1)) {
_local1.moveobjects2 = xspeed;
_local1.Background.prevFrame();
}
xspeed = xspeed - 1;
} else {
collisionpush = 0;
xspeed = 10;
_local1.moveobjects2 = 0;
}
if (forcedlightning == 1) {
if ((forcedlightningrotation == 1) and (_rotation < 5)) {
_rotation = (_rotation + 1);
}
if ((forcedlightningrotation == 1) and (_rotation == 5)) {
forcedlightningrotation = 2;
}
if ((forcedlightningrotation == 2) and (_rotation > -5)) {
_rotation = (_rotation - 1);
}
if ((forcedlightningrotation == 2) and (_rotation == -5)) {
forcedlightningrotation = 1;
}
health = health - 1;
}
if ((forcepushed > 0) and (xspeedpush > 0)) {
if ((forcepushed == 1) and ((_x + xspeedpush) < _local1.borderend)) {
_local1.moveobjects1 = -xspeedpush;
_local1.Background.nextFrame();
if (xspeedpush == 6) {
_local1.Background.nextFrame();
}
if (xspeedpush == 9) {
_local1.Background.nextFrame();
}
if (xspeedpush == 12) {
_local1.Background.nextFrame();
}
if (xspeedpush == 15) {
_local1.Background.nextFrame();
}
}
if ((forcepushed == 2) and ((_x - xspeedpush) > _local1.borderstart)) {
_local1.moveobjects1 = xspeedpush;
_local1.Background.prevFrame();
if (xspeedpush == 6) {
_local1.Background.prevFrame();
}
if (xspeedpush == 9) {
_local1.Background.prevFrame();
}
if (xspeedpush == 12) {
_local1.Background.prevFrame();
}
if (xspeedpush == 15) {
_local1.Background.prevFrame();
}
}
xspeedpush = xspeedpush - 3;
} else {
forcepushed = 0;
xspeedpush = 15;
}
if ((health < 0) and (_currentframe == 1)) {
_y = ystart;
_local1.game = 0;
_local1.LightsaberStill.stop();
gotoAndStop ("Dead");
}
if ((((_local1.Lightsabercollision == 0) and (forcedlightning == 0)) and (forcepushed == 0)) and (health > 0)) {
if ((Key.isDown(39) and (fight != 3)) and (_local1.Background._currentframe < 600)) {
walk = 1;
_local1.Background.nextFrame();
_local1.moveobjects1 = -4;
if (side == 2) {
side = 1;
_xscale = (-_xscale);
}
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation + 15);
}
} else if ((Key.isDown(37) and (fight != 3)) and (_local1.Background._currentframe > 1)) {
walk = 1;
_local1.Background.prevFrame();
_local1.moveobjects1 = 4;
if (side == 1) {
side = 2;
_xscale = (-_xscale);
}
if ((jump == 1) and (fight == 1)) {
_rotation = (_rotation - 15);
}
} else {
walk = 0;
_local1.moveobjects1 = 0;
_rotation = 0;
}
if (((Key.isDown(38) and (jump == 0)) and (fight == 0)) and (block == 0)) {
jump = 1;
yspeed = -19;
_y = (_y + yspeed);
_local1.ForceJump.stop();
_local1.ForceJump.start();
}
if ((jump == 1) and (_y != ystart)) {
yspeed = yspeed + 1;
if (HandsLightsaber._currentframe == 5) {
if (_y < (ystart - 5)) {
yspeed = 12;
if (side == 1) {
_rotation = (_rotation + 5);
}
if (side == 2) {
_rotation = (_rotation - 5);
}
} else {
yspeed = 0;
_y = ystart;
HandsLightsaber.gotoAndStop(1);
fight = 0;
}
}
_y = (_y + yspeed);
} else {
jump = 0;
_y = ystart;
_rotation = 0;
}
if ((jump == 0) and (((fight == 1) and (HandsLightsaber._currentframe == 3)) or ((fight == 2) and (HandsLightsaber._currentframe == 5)))) {
HandsLightsaber.gotoAndStop(1);
fight = 0;
}
if ((Key.isDown(90) and (fight == 0)) and (block == 0)) {
fight = 1;
if ((jump == 0) or ((jump == 1) and (!(Key.isDown(39) or Key.isDown(37))))) {
HandsLightsaber.gotoAndStop("Fight1");
}
if ((jump == 1) and (Key.isDown(39) or Key.isDown(37))) {
HandsLightsaber.gotoAndStop("Fight1Jump");
}
}
if ((Key.isDown(88) and (fight == 0)) and (block == 0)) {
fight = 2;
if ((jump == 0) or ((jump == 1) and (!(Key.isDown(39) or Key.isDown(37))))) {
HandsLightsaber.gotoAndStop("Fight2");
}
if ((jump == 1) and (Key.isDown(39) or Key.isDown(37))) {
HandsLightsaber.gotoAndStop("Fight2Jump");
}
}
if (((Key.isDown(67) and (fight == 0)) and (jump == 0)) and (block == 0)) {
fight = 3;
HandsLightsaber.gotoAndStop("Force");
}
if ((Key.isDown(40) and (fight == 0)) and (jump == 0)) {
block = 1;
HandsLightsaber.gotoAndStop("Block");
} else {
block = 0;
if (HandsLightsaber._currentframe == 6) {
HandsLightsaber.gotoAndStop(1);
}
}
}
};