Frame 2
function itemHandler3(obj, item) {
getURL ("http://souled.newgrounds.com", "_blank");
}
function itemHandler4(obj, item) {
_quality = "high";
}
function itemHandler5(obj, item) {
_quality = "medium";
}
function itemHandler6(obj, item) {
_quality = "low";
}
stopAllSounds();
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
bbb_cmi = new ContextMenuItem("souled", itemHandler3);
eee_cmi = new ContextMenuItem("High Quality", itemHandler4);
fff_cmi = new ContextMenuItem("Mid Quality", itemHandler5);
ggg_cmi = new ContextMenuItem("Low Quality", itemHandler6);
bbb_cmi.separatorBefore = true;
eee_cmi.separatorBefore = true;
root_cm.customItems.push(bbb_cmi, eee_cmi, fff_cmi, ggg_cmi);
_root.menu = root_cm;
Frame 41
stop();
Frame 42
stop();
health = 3;
score = 0;
level = 1;
_global.dead = false;
_global.bullets_off = false;
_root.attachMovie("the_arrow", "the_arrow", 2, {_x:250, _y:175});
onEnterFrame = function () {
if (score == level) {
score = 0;
level++;
i = 0;
while (i < level) {
duplicateMovieClip ("enemy", "enemy_" + i, i);
i++;
}
a = 0;
while (a < (level - 2)) {
duplicateMovieClip ("enemy2", "enemy2_" + a, _root.getNextHighestDepth());
a++;
}
}
if (health < 3) {
_root.health1.nextFrame();
}
if (health < 2) {
_root.health2.nextFrame();
}
if ((health < 1) && (_global.dead == false)) {
_root.gotoAndPlay("Death");
_global.dead = true;
}
};
Instance of Symbol 47 MovieClip "gun" in Frame 42
onClipEvent (load) {
power = 0.2;
yspeed = 0;
xspeed = 0;
radius = 10;
friction = 0.97;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - power;
}
if (Key.isDown(40)) {
yspeed = yspeed + power;
}
xspeed = xspeed * friction;
yspeed = yspeed * friction;
_x = (_x + xspeed);
_y = (_y + yspeed);
_rotation = (_rotation + xspeed);
while (_root.wall.hitTest(_x, _y + radius, true)) {
_y = (_y-1);
xspeed = 0;
yspeed = 0;
}
while (_root.wall.hitTest(_x, _y - radius, true)) {
_y = (_y+1);
xspeed = 0;
yspeed = 0;
}
while (_root.wall.hitTest(_x - radius, _y, true)) {
_x = (_x+1);
xspeed = 0;
yspeed = 0;
}
while (_root.wall.hitTest(_x + radius, _y, true)) {
_x = (_x-1);
xspeed = 0;
yspeed = 0;
}
}
Instance of Symbol 60 MovieClip "enemy" in Frame 42
onClipEvent (load) {
function getPoints() {
(getX = random(550));
(getY = random(400));
(gotoX = (getX - _x) / speed);
(gotoY = (getY - _y) / speed);
clearInterval(id);
id = setInterval(getPoints, random(2000) + 500);
}
_x = random(550);
_y = random(400);
no_move = false;
speed = 60;
id = setInterval(getPoints, 1);
(getX = random(550));
(getY = random(400));
}
onClipEvent (enterFrame) {
if (_global.dead == true) {
this.removeMovieClip();
} else if (_root.gun.hitTest(this.hit)) {
_root.score++;
this._x = -200;
no_move = true;
} else if (!no_move) {
_x = (_x + gotoX);
_x + gotoX;
_y = (_y + gotoY);
_y + gotoY;
_rotation = (_rotation + gotoX);
}
}
Instance of Symbol 72 MovieClip "enemy2" in Frame 42
onClipEvent (load) {
function getPoints() {
(getX = random(550));
(getY = random(400));
(gotoX = (getX - _x) / speed);
(gotoY = (getY - _y) / speed);
clearInterval(id);
id = setInterval(getPoints, random(2000) + 500);
}
_x = random(550);
_y = random(400);
no_move = false;
speed = 60;
id = setInterval(getPoints, 1);
(getX = random(550));
(getY = random(400));
}
onClipEvent (enterFrame) {
if (_global.dead == true) {
this.removeMovieClip();
} else if (_root.gun.hitTest(this.hit2)) {
_root.health--;
this._x = -200;
no_move = true;
} else if (!no_move) {
_x = (_x + gotoX);
_x + gotoX;
_y = (_y + gotoY);
_y + gotoY;
_rotation = (_rotation + gotoX);
}
}
Frame 81
stop();
Frame 82
stop();
Instance of Symbol 90 MovieClip "bug" in Frame 82
onClipEvent (load) {
power = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_x = (_x - power);
}
if (Key.isDown(39)) {
_x = (_x + power);
}
if (Key.isDown(38)) {
_y = (_y - power);
}
if (Key.isDown(40)) {
_y = (_y + power);
}
}
onClipEvent (enterFrame) {
if (_root.exit.hitTest(_x, _y, true)) {
_root.nextFrame();
}
if (_root.boost.hitTest(_x, _y, true)) {
power = 10;
}
if (_root.walls.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
}
Instance of Symbol 90 MovieClip in Frame 83
onClipEvent (load) {
power = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_x = (_x - power);
}
if (Key.isDown(39)) {
_x = (_x + power);
}
if (Key.isDown(38)) {
_y = (_y - power);
}
if (Key.isDown(40)) {
_y = (_y + power);
}
}
onClipEvent (enterFrame) {
if (_root.exit.hitTest(_x, _y, true)) {
_root.gotoAndStop("frame_4");
}
if (_root.walls.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.trigger.hitTest(_x, _y, true)) {
_root.nextFrame();
_root.environment.moving = 0;
_root.environment3.moving = 0;
}
if (_root.trigger2.hitTest(_x, _y, true)) {
_root.prevFrame();
_root.environment.moving = 1;
_root.environment3.moving = 1;
}
}
Instance of Symbol 113 MovieClip "environment" in Frame 83
onClipEvent (load) {
dir = 4;
moving = 1;
}
onClipEvent (enterFrame) {
if (moving) {
_y = (_y + dir);
if (_y > 300) {
dir = -4;
}
if (_y < 50) {
dir = 4;
}
}
}
Instance of Symbol 118 MovieClip "environment3" in Frame 83
onClipEvent (load) {
dir = 4;
moving = 1;
}
onClipEvent (enterFrame) {
if (moving) {
_y = (_y + dir);
if (_y > 300) {
dir = -4;
}
if (_y < 50) {
dir = 4;
}
}
}
Instance of Symbol 90 MovieClip in Frame 85
onClipEvent (load) {
power = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_x = (_x - power);
}
if (Key.isDown(39)) {
_x = (_x + power);
}
if (Key.isDown(38)) {
_y = (_y - power);
}
if (Key.isDown(40)) {
_y = (_y + power);
}
}
onClipEvent (enterFrame) {
if (_root.exit.hitTest(_x, _y, true)) {
_root.nextFrame();
}
if (_root.walls.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.warp1.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 85;
_y = 250;
}
if (_root.warp2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 165;
_y = 200;
}
}
Instance of Symbol 90 MovieClip in Frame 86
onClipEvent (load) {
power = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_x = (_x - power);
}
if (Key.isDown(39)) {
_x = (_x + power);
}
if (Key.isDown(38)) {
_y = (_y - power);
}
if (Key.isDown(40)) {
_y = (_y + power);
}
}
onClipEvent (enterFrame) {
if (_root.exit.hitTest(_x, _y, true)) {
_root.nextFrame();
}
if (_root.walls.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p1.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 290;
_y = 80;
}
if (_root.p2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p3.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 444;
_y = 23;
}
if (_root.p4.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p5.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 371;
_y = 371;
}
if (_root.p6.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 290;
_y = 80;
}
if (_root.p7.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p8.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 85;
_y = 253;
}
if (_root.p9.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 225;
_y = 318;
}
if (_root.p10.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p11.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p12.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 301;
_y = 251;
}
if (_root.p13.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p14.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p15.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p16.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 225;
_y = 318;
}
if (_root.p17.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p18.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 516;
_y = 81;
}
if (_root.p19.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 152;
_y = 370;
}
if (_root.p20.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 367;
_y = 141;
}
if (_root.p21.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 294;
_y = 24;
}
if (_root.p22.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 444;
_y = 313;
}
if (_root.p23.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 94;
_y = 195;
}
if (_root.p24.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 110;
_y = 30;
}
if (_root.p25.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.p26.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 444;
_y = 194;
}
if (_root.p27.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 516;
_y = 318;
}
if (_root.p28.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
}
Instance of Symbol 208 MovieClip in Frame 87
onClipEvent (load) {
power = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_x = (_x - power);
}
if (Key.isDown(39)) {
_x = (_x + power);
}
if (Key.isDown(38)) {
_y = (_y - power);
}
if (Key.isDown(40)) {
_y = (_y + power);
}
}
onClipEvent (enterFrame) {
if (_root.exit.hitTest(_x, _y, true)) {
_root.gotoAndPlay("menu");
}
if (_root.walls.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
if (_root.environment3.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 18;
_y = 18;
}
}
Frame 88
stop();
_global.dead = false;
zc = 0;
enemy_spawn = 1000;
_global.health = 10;
_global.zd = 0;
idvariable2 = setInterval(function () {
enemy_spawn = enemy_spawn + 0.001;
}, 1000);
idvariable = setInterval(function () {
zc++;
duplicateMovieClip ("zombie", "zombie2" + zc, zc);
}, enemy_spawn + 100);
onEnterFrame = function () {
_root.jimbob = (_global.zn - _global.zd) / 500;
_global.zn = zc;
_root.timer_bar.gotoAndStop(Math.round(_global.health));
if (_global.health < 1) {
_global.dead = true;
_root.play();
}
};
Instance of Symbol 245 MovieClip "link" in Frame 88
onClipEvent (load) {
switch_closed = true;
chest_closed = true;
_global.attacking = false;
moving = false;
dir = "down";
_global.spd = 4;
}
onClipEvent (enterFrame) {
if (_global.dead) {
this.removeMovieClip();
} else {
if (this.sword_down._currentframe == 20) {
_global.attacking = false;
}
if (this.sword_up._currentframe == 20) {
_global.attacking = false;
}
if (this.sword_left._currentframe == 20) {
_global.attacking = false;
}
if (this.sword_right._currentframe == 20) {
_global.attacking = false;
}
if (Key.isDown(32)) {
_global.attacking = true;
if (dir == "down") {
this.gotoAndStop(9);
}
if (dir == "up") {
this.gotoAndStop(10);
}
if (dir == "left") {
this.gotoAndStop(11);
}
if (dir == "right") {
this.gotoAndStop(12);
}
} else if (!_global.attacking) {
if (Key.isDown(37)) {
if (!_root.bounds.hitTest(_x - _global.spd, _y, true)) {
if (!_root.wall.hitTest(_x - _global.spd, _y, true)) {
_x = (_x - _global.spd);
moving = true;
dir = "left";
}
}
} else if (Key.isDown(39)) {
if (!_root.bounds.hitTest(_x + _global.spd, _y, true)) {
if (!_root.wall.hitTest(_x + _global.spd, _y, true)) {
_x = (_x + _global.spd);
moving = true;
dir = "right";
}
}
} else if (Key.isDown(38)) {
if (!_root.bounds.hitTest(_x, _y - _global.spd, true)) {
if (!_root.wall.hitTest(_x, _y - _global.spd, true)) {
_y = (_y - _global.spd);
moving = true;
dir = "up";
}
}
} else if (Key.isDown(40)) {
if (!_root.bounds.hitTest(_x, _y + _global.spd, true)) {
if (!_root.wall.hitTest(_x, _y + _global.spd, true)) {
_y = (_y + _global.spd);
moving = true;
dir = "down";
}
}
}
if (moving && (dir == "left")) {
moving = false;
this.gotoAndStop(7);
} else if (dir == "left") {
this.gotoAndStop(3);
}
if (moving && (dir == "right")) {
moving = false;
this.gotoAndStop(8);
} else if (dir == "right") {
this.gotoAndStop(4);
}
if (moving && (dir == "up")) {
moving = false;
this.gotoAndStop(6);
} else if (dir == "up") {
this.gotoAndStop(2);
}
if (moving && (dir == "down")) {
moving = false;
this.gotoAndStop(5);
} else if (dir == "down") {
this.gotoAndStop(1);
}
}
}
}
Instance of Symbol 268 MovieClip "zombie" in Frame 88
onClipEvent (load) {
this.place = Math.round(Math.random() * 3) + 1;
if (this.place == 4) {
this._x = 270;
this._y = -110;
} else if (this.place == 1) {
this._x = -110;
this._y = 200;
} else if (this.place == 2) {
this._x = 265;
this._y = 460;
} else if (this.place == 3) {
this._x = 630;
this._y = 200;
}
cage_hit = false;
this.zttacking = false;
this.dead = false;
this.now_dead = false;
this.number_down = true;
}
onClipEvent (enterFrame) {
if (_global.dead) {
this.removeMovieClip();
} else if (this.now_dead) {
this.removeMovieClip();
} else if (_name == "zombie") {
this._x = this._x - 1000;
} else {
if (_root.link.hit.hitTest(this)) {
this.zttacking = true;
if (_global.attacking) {
this.dead = true;
}
}
if (_root.cage.hitTest(_x, _y, true)) {
cage_hit = true;
}
if (!cage_hit) {
if (_root.cage._x > (this._x + 1)) {
_x = (_x+1);
dir = "right";
} else if (_root.cage._x < (this._x - 1)) {
_x = (_x-1);
dir = "left";
} else if (_root.cage._y < (this._y - 1)) {
_y = (_y-1);
dir = "up";
} else if (_root.cage._y > (this._y + 1)) {
_y = (_y+1);
dir = "down";
}
} else if (cage_hit) {
x_new_pos = _root.link._x;
y_new_pos = _root.link._y;
if ((_root.link._x >= this._x) && (_root.link._y >= this._y)) {
if (this._x < (x_new_pos - 2)) {
this._x++;
dir = "right";
} else if (this._y < y_new_pos) {
this._y++;
dir = "down";
}
}
if ((_root.link._x < this._x) && (_root.link._y >= this._y)) {
if (this._x > (x_new_pos + 2)) {
this._x--;
dir = "left";
} else if (this._y < y_new_pos) {
this._y++;
dir = "down";
}
}
if ((_root.link._x >= this._x) && (_root.link._y < this._y)) {
if (this._x < (x_new_pos - 2)) {
this._x++;
dir = "right";
} else if (this._y > y_new_pos) {
this._y--;
dir = "up";
}
}
if ((_root.link._x < this._x) && (_root.link._y < this._y)) {
if (this._x > (x_new_pos + 2)) {
this._x--;
dir = "left";
} else if (this._y > y_new_pos) {
this._y--;
dir = "up";
}
}
}
if (this.dead && (this.number_down)) {
_global.zd = _global.zd + 0.7;
this.number_down = false;
}
if (this.dead) {
this.gotoAndStop(6);
death_timer = setInterval(function () {
this.now_dead = true;
clearInterval(death_timer);
}, 1000);
} else if (this.zttacking) {
this.gotoAndStop(5);
} else if (dir == "right") {
this.gotoAndStop(1);
} else if (dir == "left") {
this.gotoAndStop(2);
} else if (dir == "up") {
this.gotoAndStop(3);
} else if (dir == "down") {
this.gotoAndStop(4);
}
}
}
Instance of Symbol 277 MovieClip in Frame 88
onClipEvent (enterFrame) {
this._x = this._x + ((_global.zn - _global.zd) / 500);
if (this._x > 540) {
_global.dead = true;
_root.play();
}
}
Instance of Symbol 279 MovieClip in Frame 88
onClipEvent (enterFrame) {
this.swapDepths(999999999);
}
Frame 89
onEnterFrame = null;
Frame 127
stop();
Symbol 10 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 15 Button
on (release) {
_root.play();
}
Symbol 16 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 16 MovieClip Frame 2
gotoAndPlay (1);
Symbol 25 Button
on (release) {
getURL ("http://souled.newgrounds.com", "_blank");
}
Symbol 35 Button
on (release) {
gotoAndStop (42);
}
Symbol 40 Button
on (release) {
gotoAndStop ("game3");
}
Symbol 45 Button
on (release) {
gotoAndStop (82);
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 85 Button
on (release) {
stopAllSounds();
gotoAndStop (42);
}
Symbol 86 Button
on (release) {
gotoAndPlay (2);
}
Symbol 245 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 20
_global.health--;
Symbol 267 MovieClip Frame 30
stop();
_parent.fadedOut = true;
Symbol 268 MovieClip Frame 1
stop();
Symbol 285 Button
on (release) {
gotoAndStop ("game3");
}
Symbol 289 Button
on (release) {
gotoAndPlay (2);
}
Symbol 290 Button
on (release) {
stopAllSounds();
gotoAndStop ("game3");
}