Frame 2
fscommand ("showMenu", false);
Stage.scaleMode = "exactFit";
Stage.showMenu = false;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
play();
} else {
gotoAndPlay (1);
}
Frame 3
game = false;
removeMovieClip(_root.deadM);
hat = "Normal";
soundOn = true;
playSound = function (sound) {
if (_root.soundOn == true) {
_root.soundFX.gotoAndPlay(sound);
}
};
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
removeMovieClip(_root.deadM);
Frame 11
cloud = 0;
stop();
game = true;
playSound("bgsound");
pLife = 5;
pLifeMax = 5;
pStamina = 1000;
pStaminaMax = 1000;
wDefeat = 0;
hDefeat = 0;
score = 0;
gameOver = false;
onEnterFrame = function () {
if (game == true) {
depthCheck();
pStamina--;
}
};
depthCheck = function () {
if ((enemy2._y < enemy1._y) && (enemy2.getDepth() > enemy1.getDepth())) {
enemy2.swapDepths(enemy1);
}
if ((enemy2._y > enemy1._y) && (enemy2.getDepth() < enemy1.getDepth())) {
enemy2.swapDepths(enemy1);
}
if ((player._y < enemy2._y) && (player.getDepth() > enemy2.getDepth())) {
player.swapDepths(enemy2);
}
if ((player._y > enemy2._y) && (player.getDepth() < enemy2.getDepth())) {
player.swapDepths(enemy2);
}
if ((player._y < enemy1._y) && (player.getDepth() > enemy1.getDepth())) {
player.swapDepths(enemy1);
}
if ((player._y > enemy1._y) && (player.getDepth() < enemy1.getDepth())) {
player.swapDepths(enemy1);
}
};
makeCloud = function (x, y, depth) {
_root.cloud++;
name12 = ["could" + _root.cloud];
_root.attachMovie("DustCloud", name12, depth + _root.cloud);
_root["could" + _root.cloud]._x = x;
_root["could" + _root.cloud]._y = y;
if (_root.cloud > 10) {
_root.cloud = 0;
}
};
Instance of Symbol 176 MovieClip "enemy1" in Frame 11
onClipEvent (load) {
gotoAndStop ("start");
this.swapDepths(200);
lifeMax = 5;
life = lifeMax;
speed = 4;
range = 60;
counter = 0;
counterMax = 48;
follow = true;
attack = false;
hit = true;
}
onClipEvent (keyDown) {
if (_root.keyAttack == true) {
if (((hitTest(_root.player.player.rightArm) && ((_y < (_root.player._y + range)) && (_y > (_root.player._y - range)))) && (((_root.player._xscale == -100) && (_x < _root.player._x)) || ((_root.player._xscale == 100) && (_x > _root.player._x)))) && ((_root.player.attack == true) && (hit == false))) {
if (attack == false) {
hit = true;
this.gotoAndPlay("hit");
} else {
forceField.play();
}
}
}
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
if (((((((_root.player.dead == false) && (_x < (_root.player._x + range))) && (_x > (_root.player._x - range))) && (_y > (_root.player._y - 5))) && (_y < (_root.player._y + 5))) && (attack == false)) && (hit == false)) {
attack = true;
this.gotoAndPlay("attack");
}
if ((attack == false) && (hit == false)) {
if (_root.player._x < _x) {
_xscale = 100;
} else {
_xscale = -100;
}
}
if (((attack == false) && (hit == false)) && (hit == false)) {
counter++;
}
if (((counter == counterMax) && (attack == false)) && (hit == false)) {
counter = 0;
rand = random(3);
if (rand == 0) {
follow = true;
} else {
follow = false;
xDir = random(3) - 1;
yDir = random(3) - 1;
}
}
if (((follow == false) && (attack == false)) && (hit == false)) {
if ((_x < 20) || (_x > 480)) {
follow = true;
}
if ((_y < 260) || (_y > 400)) {
follow = true;
}
_x = (_x + (speed * xDir));
_y = (_y + (speed * yDir));
}
if (((follow == true) && (attack == false)) && (hit == false)) {
if (_x > (_root.player._x + range)) {
_x = (_x - speed);
}
if (_x < (_root.player._x - range)) {
_x = (_x + speed);
}
if (_y > (_root.player._y + 5)) {
_y = (_y - speed);
}
if (_y < (_root.player._y - 5)) {
_y = (_y + speed);
}
}
}
Instance of Symbol 178 MovieClip "h1" in Frame 11
onClipEvent (load) {
hit = false;
this.swapDepths(400);
speed = 7;
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
if (hobbitGo == true) {
_x = (_x + speed);
if (_x > 550) {
_x = -50;
hobbitGo = false;
}
}
}
onClipEvent (keyDown) {
if (_root.keyAttack == true) {
if (hitTest(_root.player) && ((_root.player.attack == true) && (hit == false))) {
hit = true;
this.gotoAndPlay("hit");
}
}
}
Instance of Symbol 178 MovieClip "h0" in Frame 11
onClipEvent (load) {
hit = false;
this.swapDepths(0);
speed = 7;
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
if (hobbitGo == true) {
_x = (_x + speed);
if (_x > 550) {
_x = -50;
hobbitGo = false;
}
}
}
onClipEvent (keyDown) {
if (_root.keyAttack == true) {
if (hitTest(_root.player) && ((_root.player.attack == true) && (hit == false))) {
hit = true;
this.gotoAndPlay("hit");
}
}
}
Instance of Symbol 180 MovieClip "lifeBar" in Frame 11
onClipEvent (load) {
widthKeep = _width;
}
Instance of Symbol 180 MovieClip "sBar" in Frame 11
onClipEvent (load) {
widthKeep = _width;
}
onClipEvent (enterFrame) {
if (_root.gameOver != true) {
_width = ((_root.pStamina / _root.pStaminaMax) * widthKeep);
}
}
Instance of Symbol 184 MovieClip in Frame 11
onClipEvent (load) {
hobbitTime = 480;
eOneTime = 48;
time = 0;
eTwoTime = 35;
FirstE = false;
SecondE = false;
}
onClipEvent (enterFrame) {
time++;
if ((time == eOneTime) && (FirstE == false)) {
FirstE = true;
_root.enemy1.gotoAndPlay("start");
}
if (time == hobbitTime) {
time = 0;
_root["h" + random(2)].hobbitGo = true;
}
if ((_root.score >= eTwoTime) && (SecondE == false)) {
SecondE = true;
_root.enemy2.gotoAndPlay("start");
}
}
Instance of Symbol 176 MovieClip "enemy2" in Frame 11
onClipEvent (load) {
gotoAndStop ("start");
this.swapDepths(300);
lifeMax = 5;
life = lifeMax;
speed = 4;
range = 60;
counter = 0;
counterMax = 48;
follow = true;
attack = false;
hit = true;
}
onClipEvent (keyDown) {
if (_root.keyAttack == true) {
if (((hitTest(_root.player.player.rightArm) && ((_y < (_root.player._y + range)) && (_y > (_root.player._y - range)))) && (((_root.player._xscale == -100) && (_x < _root.player._x)) || ((_root.player._xscale == 100) && (_x > _root.player._x)))) && ((_root.player.attack == true) && (hit == false))) {
if (attack == false) {
hit = true;
this.gotoAndPlay("hit");
} else {
forceField.play();
}
}
}
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
if (((((((_root.player.dead == false) && (_x < (_root.player._x + range))) && (_x > (_root.player._x - range))) && (_y > (_root.player._y - 5))) && (_y < (_root.player._y + 5))) && (attack == false)) && (hit == false)) {
attack = true;
this.gotoAndPlay("attack");
}
if ((attack == false) && (hit == false)) {
if (_root.player._x < _x) {
_xscale = 100;
} else {
_xscale = -100;
}
}
if (((attack == false) && (hit == false)) && (hit == false)) {
counter++;
}
if (((counter == counterMax) && (attack == false)) && (hit == false)) {
counter = 0;
rand = random(3);
if (rand == 0) {
follow = true;
} else {
follow = false;
xDir = random(3) - 1;
yDir = random(3) - 1;
}
}
if (((follow == false) && (attack == false)) && (hit == false)) {
if ((_x < 20) || (_x > 480)) {
follow = true;
}
if ((_y < 260) || (_y > 400)) {
follow = true;
}
_x = (_x + (speed * xDir));
_y = (_y + (speed * yDir));
}
if (((follow == true) && (attack == false)) && (hit == false)) {
if (_x > (_root.player._x + range)) {
_x = (_x - speed);
}
if (_x < (_root.player._x - range)) {
_x = (_x + speed);
}
if (_y > (_root.player._y + 5)) {
_y = (_y - speed);
}
if (_y < (_root.player._y - 5)) {
_y = (_y + speed);
}
}
}
Instance of Symbol 207 MovieClip "player" in Frame 11
onClipEvent (load) {
speed = 10;
weapon1 = "Sword";
weapon1Attack = "melee";
player.leftArm.weaponArm.gotoAndStop(weapon1);
player.rightArm.weaponArm._visible = false;
this.swapDepths(100);
dead = false;
rel = true;
rel2 = true;
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
if (!Key.isDown(65)) {
_root.keyAttack = false;
}
if ((_root.pStamina <= 0) && (dead == false)) {
dead = true;
_root.gameOver = true;
gotoAndPlay ("dead");
}
if ((hit == true) && (dead == false)) {
_root.pLife--;
_root.lifeBar._width = (_root.pLife / _root.pLifeMax) * _root.lifeBar.widthKeep;
gotoAndPlay ("hit");
if (_root.pLife <= 0) {
dead = true;
_root.gameOver = true;
gotoAndPlay ("dead");
}
hit = false;
}
if ((((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(38))) || (Key.isDown(40))) && (dead == false)) {
keyLeft = Key.isDown(37);
keyRight = Key.isDown(39);
keyUp2 = Key.isDown(38);
keyDown2 = Key.isDown(40);
if ((keyUp2 == true) && (keyDown2 == true)) {
keyUp2 = false;
}
if ((keyRight == true) && (keyLeft == true)) {
keyLeft = false;
}
player.play();
if (((_x > 20) && (keyLeft == true)) || ((_x < 480) && (keyRight == true))) {
_x = (_x + ((keyLeft * (-speed)) + (keyRight * speed)));
}
if (((_y > 280) && (keyUp2 == true)) || ((_y < 400) && (keyDown2 == true))) {
_y = (_y + ((keyUp2 * (-speed)) + (keyDown2 * speed)));
}
if ((keyRight == true) || (keyLeft == true)) {
this._xscale = (keyLeft * -100) + (keyRight * 100);
}
if ((_xscale == -100) && (dead == false)) {
player.leftArm.gotoAndStop(1);
player.rightArm.weaponArm.gotoAndStop(weapon1);
player.rightArm.weaponArm._visible = true;
player.leftArm.weaponArm._visible = false;
} else {
player.rightArm.gotoAndStop(1);
player.leftArm.weaponArm.gotoAndStop(weapon1);
player.leftArm.weaponArm._visible = true;
player.rightArm.weaponArm._visible = false;
}
}
}
onClipEvent (keyDown) {
if ((Key.isDown(83) && (dead == false)) && (rel == true)) {
rel = false;
if (player.jumping != true) {
player.gotoAndPlay("jump");
player.jumping = true;
_root.pStamina = _root.pStamina - 24;
if (_root.pStamina < 0) {
_root.pStamina = 0;
}
}
}
if ((Key.isDown(65) && (dead == false)) && (rel2 == true)) {
_root.keyAttack = true;
rel2 = false;
attack = true;
_root.pStamina = _root.pStamina - 24;
if (_root.pStamina < 0) {
_root.pStamina = 0;
}
if (_xscale == -100) {
player.rightArm.gotoAndPlay(weapon1Attack);
} else {
player.leftArm.gotoAndPlay(weapon1Attack);
}
}
}
onClipEvent (keyUp) {
if (!Key.isDown(83)) {
rel = true;
}
if (!Key.isDown(65)) {
rel2 = true;
}
}
Instance of Symbol 208 MovieClip "pill" in Frame 11
onClipEvent (load) {
this.swapDepths(500);
}
onClipEvent (enterFrame) {
if (_root.game == false) {
removeMovieClip(this);
}
_y = (_y + 10);
if (_root.player.player.box.hitTest(this) && (_root.gameOver != true)) {
_root.player.gotoAndPlay("med");
_root.pStamina = _root.pStamina + 240;
if (_root.pStamina > _root.pStaminaMax) {
_root.pStamina = _root.pStaminaMax;
}
_y = -480;
_x = random(500);
}
if (_y >= 330) {
_root.makeCloud(_x, _y, getDepth());
_y = -480;
_x = random(500);
}
}
Instance of Symbol 127 MovieClip in Frame 11
onClipEvent (enterFrame) {
this._x = _root.pill._x;
this._alpha = -30 + ((_root.pill._y / 300) * 100);
}
Instance of Symbol 229 MovieClip "deadM" in Frame 11
onClipEvent (load) {
this.swapDepths(600);
}
Frame 12
prevFrame();
removeMovieClip(_root.deadM);
Symbol 2 MovieClip [DustCloud] Frame 16
removeMovieClip(this);
Instance of Symbol 4 MovieClip "Bar" in Symbol 6 MovieClip Frame 1
onClipEvent (load) {
widthkeep = _width;
}
onClipEvent (enterFrame) {
_width = (widthkeep * (_root.getBytesLoaded() / _root.getBytesTotal()));
}
Symbol 50 Button
on (release) {
_root.play();
}
Symbol 51 MovieClip Frame 143
_root.play();
stop();
Symbol 54 MovieClip Frame 45
_root.play();
Symbol 63 Button
on (release) {
gotoAndStop ("game");
}
Symbol 67 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 71 Button
on (release) {
gotoAndStop ("bonus");
}
Symbol 78 Button
on (release) {
getURL ("http://www.armorgames.com", "_BLANK");
}
Symbol 108 Button
on (release) {
getURL ("http://www.infrarift.net", "_blank");
}
Symbol 125 Button
on (release) {
nextFrame();
}
Symbol 135 MovieClip Frame 1
stop();
Symbol 139 Button
on (release) {
prevFrame();
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 153 Button
on (release) {
_root.gotoAndStop("menu");
_root.game = false;
removeMovieClip(_parent);
}
Symbol 155 Button
on (release) {
wHat.nextFrame();
}
Symbol 163 MovieClip Frame 1
gotoAndStop(_root.hat);
Symbol 163 MovieClip Frame 2
if (_root.game != true) {
_root.hat = "Normal";
}
Symbol 163 MovieClip Frame 3
if (_root.game != true) {
_root.hat = "Black Hat";
}
Symbol 163 MovieClip Frame 4
if (_root.game != true) {
_root.hat = "Mohawk";
}
Symbol 163 MovieClip Frame 5
if (_root.game != true) {
_root.hat = "Presley";
}
Symbol 163 MovieClip Frame 6
if (_root.game != true) {
_root.hat = "Sun Glasses";
}
Symbol 163 MovieClip Frame 7
if (_root.game != true) {
_root.hat = "None";
}
Symbol 164 Button
on (release) {
wHat.prevFrame();
}
Symbol 176 MovieClip Frame 1
attack = false;
stop();
Symbol 176 MovieClip Frame 11
_root.playSound("swing2");
Instance of Symbol 175 MovieClip in Symbol 176 MovieClip Frame 14
onClipEvent (load) {
if (this.hitTest(_root.player.player.box)) {
_root.player.hit = true;
}
}
Symbol 176 MovieClip Frame 21
gotoAndStop (1);
Symbol 176 MovieClip Frame 22
_root.playSound("hit");
Symbol 176 MovieClip Frame 38
life--;
if (life == 0) {
play();
_root.wDefeat++;
_root.score = _root.score + 10;
} else {
hit = false;
gotoAndStop (1);
}
Symbol 176 MovieClip Frame 42
_root.makeCloud(_x, _y, getDepth());
_root.playSound("scream");
Symbol 176 MovieClip Frame 74
_x = (random(300) + 50);
_y = (random(50) + 250);
Symbol 176 MovieClip Frame 75
_root.makeCloud(_x, _y, getDepth());
Symbol 176 MovieClip Frame 80
_root.makeCloud(_x, _y, getDepth());
Symbol 176 MovieClip Frame 91
hit = false;
life = lifeMax;
Symbol 178 MovieClip Frame 15
gotoAndPlay (1);
Symbol 178 MovieClip Frame 16
_root.hDefeat++;
_root.score = _root.score + 5;
Symbol 178 MovieClip Frame 19
_root.makeCloud(_x, _y, getDepth());
hobbitGo = false;
Symbol 178 MovieClip Frame 37
_x = -75;
hit = false;
Symbol 194 MovieClip Frame 3
gotoAndStop (1);
Symbol 194 MovieClip Frame 5
gotoAndStop (1);
Symbol 194 MovieClip Frame 7
gotoAndStop (1);
Symbol 194 MovieClip Frame 9
gotoAndStop (1);
Symbol 194 MovieClip Frame 11
gotoAndStop (1);
Symbol 194 MovieClip Frame 13
gotoAndStop (1);
Symbol 194 MovieClip Frame 15
gotoAndStop (1);
Symbol 194 MovieClip Frame 17
gotoAndStop (1);
Symbol 194 MovieClip Frame 19
gotoAndStop (1);
Symbol 201 MovieClip Frame 1
stop();
_parent._parent.attack = false;
Symbol 201 MovieClip Frame 4
_root.playSound("swing");
Symbol 201 MovieClip Frame 13
gotoAndStop (1);
Symbol 201 MovieClip Frame 17
_parent._parent.attack = false;
Symbol 201 MovieClip Frame 24
gotoAndStop (1);
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 13
if (Key.isDown(37) || (Key.isDown(39))) {
gotoAndPlay ("walk");
} else {
gotoAndStop (1);
}
Symbol 206 MovieClip Frame 32
jumping = false;
_root.makeCloud(_parent._x, _parent._y, _parent.getDepth());
Symbol 206 MovieClip Frame 37
gotoAndStop (1);
Symbol 206 MovieClip Frame 46
_root.makeCloud(_parent._x, _parent._y, _parent.getDepth());
Symbol 206 MovieClip Frame 51
stop();
_root.deadM.play();
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 2
_root.playSound("hit2");
if (_root.pLife != 0) {
_root.playSound("scream" + random(2));
}
Symbol 207 MovieClip Frame 9
gotoAndStop (1);
Symbol 207 MovieClip Frame 17
gotoAndStop (1);
Symbol 207 MovieClip Frame 18
_root.playSound("dead");
Symbol 207 MovieClip Frame 25
if (player.jumping != true) {
player.gotoAndPlay("dead");
stop();
}
Symbol 207 MovieClip Frame 26
gotoAndPlay ("end");
Symbol 214 Button
on (release) {
getURL ("http://www.infrarift.net", "_BLANK");
}
Symbol 218 Button
on (release) {
getURL ("http://www.armorgames.com", "_BLANK");
}
Symbol 226 Button
on (release) {
_root.play();
_root.game = false;
removeMovieClip(_parent);
stopAllSounds();
}
Symbol 227 Button
on (release) {
_root.gotoAndStop("menu");
_root.game = false;
removeMovieClip(_parent);
stopAllSounds();
}
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 20
stop();
Symbol 235 Button
on (press) {
if (game != false) {
if (soundOn == true) {
soundOn = false;
stopAllSounds();
} else if (soundOn == false) {
soundOn = true;
playSound("bgsound");
}
}
}