Frame 1
Frame 2
stop();
items = new Array();
MovieClip.prototype.setCookie = function (c, n, v) {
var so = SharedObject.getLocal(c);
so.data[n] = v;
so.flush();
};
MovieClip.prototype.getCookie = function (c, n) {
var so = SharedObject.getLocal(c);
return(so.data[n]);
};
MovieClip.prototype.liftItem = function (item) {
_root.items.push(item);
this.drawItems();
};
MovieClip.prototype.dropItem = function (item) {
var i;
var l;
l = _root.items.length;
i = 0;
while (i < l) {
if (_root.items[i] == item) {
_root.items[i] = _root.items[l - 1];
_root.items[l - 1] = item;
_root.items.pop();
i = l;
}
i++;
}
this.drawItems();
};
MovieClip.prototype.hasItem = function (item) {
l = _root.items.length;
i = 0;
while (i < l) {
if (_root.items[i] == item) {
return(true);
}
i++;
}
return(false);
};
spacing = 10;
MovieClip.prototype.drawItems = function () {
var i;
for (i in /item_bar) {
_root.item_bar[i].removeMovieClip();
}
i = 0;
while (i < _root.items.length) {
_root.item_bar.attachMovie("icons", "icon" + i, i);
_root.item_bar["icon" + i]._x = (i * (10 + _root.spacing)) + _root.spacing;
_root.item_bar["icon" + i].gotoAndStop(_root.items[i]);
i++;
}
};
Instance of Symbol 141 MovieClip "item_bar" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 143 MovieClip in Frame 2
onClipEvent (load) {
bI = _parent.getBytesLoaded();
}
onClipEvent (enterFrame) {
data = int((_parent.getBytesLoaded() * 100) / _parent.getBytesTotal()) + "%";
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
_parent.gotoAndStop(3);
}
}
Frame 3
stop();
Instance of Symbol 181 MovieClip "healthbar" in Frame 3
onClipEvent (enterFrame) {
if (_root.health == 0) {
_root.gotoAndPlay(5);
} else {
this.gotoAndStop(11 - Math.ceil(_root.health / 15));
}
}
Instance of Symbol 193 MovieClip "talk" in Frame 3
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 265 MovieClip "hero" in Frame 3
onClipEvent (load) {
r = 1;
c = 1;
frame = substring(_root["row" + r], c, 1);
with (_root.floor) {
gotoAndStop(frame);
}
nearnpc = "";
talking = false;
pause = false;
speed = 4;
key_down = 0;
s = 25;
lock = true;
count = 0;
inventory = new Array();
}
onClipEvent (keyDown) {
this.zelda.play();
}
onClipEvent (keyUp) {
key_down = 0;
this.zelda.gotoAndStop(1);
}
onClipEvent (enterFrame) {
function change_room(dir) {
frame = substring(_root["row" + r], c, 1);
if (dir == "right") {
_root.floor.gotoAndStop(_root.floor._currentframe + 1);
} else if (dir == "left") {
_root.floor.gotoAndStop(_root.floor._currentframe - 1);
} else if (dir == "up") {
_root.floor.gotoAndStop(_root.floor._currentframe - 4);
} else if (dir == "down") {
_root.floor.gotoAndStop(_root.floor._currentframe + 4);
}
i = _root.bomb_brain.count;
while (i >= 1) {
if (_root["bomb" + i]) {
_root["bomb" + i].removeMovieClip();
_root.bomb_brain.count--;
}
i--;
}
}
if (!_root.pause) {
room = _currentframe;
if (!_root.floor.hitTest(this._x + Xstep, this._y + Ystep, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
Ystep = 0;
Xstep = 0;
}
if (this._y >= 295) {
this._y = 45;
c = c + 1;
change_room("down");
}
if (5 >= this._y) {
this._y = 295;
c = c - 1;
change_room("up");
}
if (this._x >= 295) {
this._x = 45;
r = r + 1;
change_room("right");
}
if (5 >= this._x) {
this._x = 295;
r = r - 1;
change_room("left");
}
if (lock == true) {
if (Key.isDown(32)) {
_root.hero.sword.play(2);
this.zelda.gotoAndStop(1);
}
if (_root.item_bar._visible == false) {
if (Key.isDown(73)) {
setProperty(_root.item_bar, _visible , true);
_root.item_bar.message = "INVENTORY";
}
if (Key.isDown(DELETEKEY)) {
setProperty(_root.container, _visible , true);
}
if (count >= 5) {
count = 6;
}
}
old_x = this._x;
old_y = this._y;
if ((Key.isDown(38) and (!Key.isDown(37))) and (!Key.isDown(39))) {
Ystep = -4;
Xstep = 0;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("back");
} else if ((Key.isDown(40) and (!Key.isDown(37))) and (!Key.isDown(39))) {
Ystep = 4;
Xstep = 0;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("front");
} else if ((Key.isDown(37) and (!Key.isDown(38))) and (!Key.isDown(40))) {
Xstep = -4;
Ystep = 0;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("left");
} else if ((Key.isDown(39) and (!Key.isDown(38))) and (!Key.isDown(40))) {
Xstep = 4;
Ystep = 0;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("right");
} else if (Key.isDown(39) and Key.isDown(38)) {
Xstep = 3;
Ystep = -3;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("back");
} else if (Key.isDown(39) and Key.isDown(40)) {
Xstep = 3;
Ystep = 3;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("front");
} else if (Key.isDown(37) and Key.isDown(38)) {
Xstep = -3;
Ystep = -3;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("back");
} else if (Key.isDown(37) and Key.isDown(40)) {
Xstep = -3;
Ystep = 3;
if (moving == false) {
moving = true;
this.gotoAndPlay(2);
}
this.gotoAndStop("front");
}
if (_root.floor.hitTest(this._x + 40, this._y, true)) {
this._y = old_y;
this._x = old_x;
}
if (_root.floor.hitTest(this._x - 40, this._y, true)) {
this._y = old_y;
this._x = old_x;
}
if (_root.floor.hitTest(this._x, this._y + 40, true)) {
this._x = old_x;
this._y = old_y;
}
if (_root.floor.hitTest(this._x, this._y - 40, true)) {
this._x = old_x;
this._y = old_y;
}
if (_root.floor.hitTest(this._x + 40, this._y + 40, true)) {
this._y = old_y;
this._x = old_x;
}
if (_root.floor.hitTest(this._x - 40, this._y + 40, true)) {
this._y = old_y;
this._x = old_x;
}
if (_root.floor.hitTest(this._x + 40, this._y - 40, true)) {
this._x = old_x;
this._y = old_y;
}
if (_root.floor.hitTest(this._x - 40, this._y - 40, true)) {
this._x = old_x;
this._y = old_y;
}
}
}
}
Instance of Symbol 489 MovieClip "floor" in Frame 3
onClipEvent (enterFrame) {
_root.roomNum = this._currentframe;
}
Instance of Symbol 521 MovieClip "arrow" in Frame 3
onClipEvent (load) {
fire = 1;
step = 9;
}
onClipEvent (enterFrame) {
if (this.hasItem("bow")) {
if (fire == 0) {
this._x = _root.hero._x;
this._y = _root.hero._y;
this._rotation = _root.hero._rotation;
if (Key.isDown(16) and (0 < _root.arrowcount)) {
_root.arrowcount = _root.arrowcount - 1;
_root.hero.bowmove.gotoAndPlay(2);
this.gotoAndStop(2);
if (_root.hero._currentframe == 4) {
this._rotation = this._rotation - 180;
xx = -step;
yy = 0;
}
if (_root.hero._currentframe == 3) {
xx = step;
yy = 0;
}
if (_root.hero._currentframe == 2) {
this._rotation = this._rotation + 270;
xx = 0;
yy = -step;
}
if (_root.hero._currentframe == 1) {
this._rotation = this._rotation + 90;
xx = 0;
yy = step;
}
fire = 1;
this._x = this._x + xx;
this._y = this._y + yy;
}
} else {
this._x = this._x + xx;
this._y = this._y + yy;
if ((((_root.floor.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
this.gotoAndStop(1);
}
if ((((_root.enemies.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
this.gotoAndStop(1);
}
}
}
if (!this.hasItem("bow")) {
_root.f = c;
if (Key.isDown(16)) {
_root.talk._visible = 1;
_root.talk.message = "Please find the bow and arrow";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 30) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
}
Instance of Symbol 526 MovieClip in Frame 3
onClipEvent (enterFrame) {
_root.enemyarrowtime = _root.enemyarrowtime - 1;
if (0 >= _root.enemyarrowtime) {
_root.enemyarrowtime = "0";
}
}
Instance of Symbol 531 MovieClip "bomb_brain" in Frame 3
onClipEvent (load) {
count = 1;
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.bombTime = _root.bombTime - 1;
if (this.hasItem("bomb")) {
if (0 >= _root.bombTime) {
_root.bombtime = "0";
}
if (Key.isDown(17) and (0 < _root.bombcount)) {
if (0 >= _root.bombTime) {
_root.bombTime = 20;
_root.bombcount = _root.bombcount - 1;
duplicateMovieClip (_root.bomb, "bomb" + count, count);
_root["bomb" + count]._x = _root.hero._x;
_root["bomb" + count]._y = _root.hero._y;
count = count + 1;
}
}
}
if (!this.hasItem("bomb")) {
_root.f = c;
if (Key.isDown(17)) {
_root.talk._visible = 1;
_root.talk.message = "Please find the bomb bag";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 30) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
}
Instance of Symbol 579 MovieClip "walkable" in Frame 3
onClipEvent (enterFrame) {
c = _root.roomNum;
this.gotoAndStop(c);
}
Frame 4
row1 = "abcde";
row2 = "fghij";
row3 = "klmno";
row4 = "pqrst";
stop();
Instance of Symbol 127 MovieClip [key] in Frame 4
/* no clip actions */
Instance of Symbol 587 MovieClip "arrow2" in Frame 4
onClipEvent (load) {
fire = 1;
step = 9;
shootarrow = false;
}
onClipEvent (enterFrame) {
if (0 >= _root.enemyarrowtime) {
if (!fire) {
this._x = _root.enemies.enemy2.point.x;
this._y = _root.enemies.enemy2.point.y;
this._rotation = _root.hero._rotation;
if (shootarrow) {
_root.enemyarrowtime = 20;
this.gotoAndStop(2);
if (_root.enemies.enemy2._currentframe == 3) {
this._rotation = this._rotation - 180;
xx = -step;
yy = 0;
}
if (_root.enemies.enemy2._currentframe == 4) {
xx = step;
yy = 0;
}
if (_root.enemies.enemy2._currentframe == 1) {
this._rotation = this._rotation + 270;
xx = 0;
yy = -step;
}
if (_root.enemies.enemy2._currentframe == 2) {
this._rotation = this._rotation + 90;
xx = 0;
yy = step;
}
fire = 1;
this._x = this._x + xx;
this._y = this._y + yy;
}
} else {
this._x = this._x + xx;
this._y = this._y + yy;
if ((((_root.floor.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
shootarrow = false;
this.gotoAndStop(1);
}
if ((((_root.hero.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
_root.health = _root.health - 15;
_root.hero.hit.play();
this.gotoAndStop(1);
}
}
}
}
Instance of Symbol 589 MovieClip "arrow3" in Frame 4
onClipEvent (load) {
fire = 1;
step = 9;
shootarrow = false;
}
onClipEvent (enterFrame) {
if (!fire) {
if (0 >= _root.enemyarrowtime) {
this._x = _root.enemies.enemy2.point.x;
this._y = _root.enemies.enemy2.point.y;
this._rotation = _root.hero._rotation;
if (shootarrow) {
_root.enemyarrowtime = 20;
this.gotoAndStop(2);
if (_root.enemies.enemy2._currentframe == 3) {
this._rotation = this._rotation - 180;
xx = -step;
yy = 0;
}
if (_root.enemies.enemy2._currentframe == 4) {
xx = step;
yy = 0;
}
if (_root.enemies.enemy2._currentframe == 1) {
this._rotation = this._rotation + 270;
xx = 0;
yy = -step;
}
if (_root.enemies.enemy2._currentframe == 2) {
this._rotation = this._rotation + 90;
xx = 0;
yy = step;
}
fire = 1;
this._x = this._x + xx;
this._y = this._y + yy;
}
} else {
this._x = this._x + xx;
this._y = this._y + yy;
if ((((_root.floor.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
shootarrow = false;
this.gotoAndStop(1);
}
if ((((_root.hero.hitTest(this._x, this._y, true) or (_x < 20)) or (300 < _x)) or (_y < 20)) or (300 < _y)) {
fire = 0;
_root.health = _root.health - 15;
_root.hero.hit.play();
this.gotoAndStop(1);
}
}
}
}
Instance of Symbol 714 MovieClip "enemies" in Frame 4
onClipEvent (enterFrame) {
c = _root.roomNum;
this.gotoAndStop(c);
}
Frame 32
stop();
Symbol 15 MovieClip [swordright] Frame 1
stop();
Symbol 18 MovieClip [sheild] Frame 1
stop();
Instance of Symbol 21 MovieClip in Symbol 22 MovieClip [5arrows] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this._x = 350;
this._y = 360;
this._visible = 1;
_root.arrowcount = _root.arrowcount + 5;
if (_root.arrowcount < 30) {
this.removeMovieClip();
} else {
_root.arrowcount = "30";
this._visible = 0;
}
}
}
Instance of Symbol 26 MovieClip in Symbol 27 MovieClip [bomb] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this._x = 350;
this._y = 360;
this._visible = 1;
_root.bombcount = _root.bombcount + 1;
if (_root.arrowcount < 20) {
this.removeMovieClip();
} else {
_root.arrowcount = "20";
this._visible = 0;
}
}
}
Instance of Symbol 53 MovieClip in Symbol 54 MovieClip [heartpickup] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this._x = 350;
this._y = 360;
this._visible = 1;
_root.health = _root.health + 15;
if (_root.health < 150) {
this.removeMovieClip();
} else {
_root.health = "150";
this._visible = 0;
}
}
}
Symbol 67 MovieClip [swordleft] Frame 1
stop();
Symbol 80 MovieClip [swordback] Frame 1
stop();
Symbol 91 MovieClip [swordfront] Frame 1
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 8
gotoAndPlay (2);
Symbol 119 MovieClip [guard] Frame 66
gotoAndPlay (1);
Symbol 119 MovieClip [guard] Frame 98
stop();
Symbol 129 Button
on (release) {
_root.setCookie("zelda", "items", _root.items);
_root.setCookie("zelda", "gotitem", _root.gotitem);
_root.setCookie("zelda", "gotitem2", _root.gotitem2);
_root.setCookie("zelda", "gotitem3", _root.gotitem3);
_root.setCookie("zelda", "gotitem4", _root.gotitem4);
_root.setCookie("zelda", "gotitem5", _root.gotitem5);
_root.setCookie("zelda", "pause", _root.pause);
_root.setCookie("zelda", "key1", _root.key1);
_root.setCookie("zelda", "health", _root.health);
_root.setCookie("zelda", "bombcount", _root.bombcount);
_root.setCookie("zelda", "arrowcount", _root.arrowcount);
_root.setCookie("zelda", "keys", _root.keys);
_root.setCookie("zelda", "posx", _root.hero._x);
_root.setCookie("zelda", "posy", _root.hero._y);
this.setCookie("zelda", "room", _root.floor._currentframe);
}
Symbol 133 Button
on (release, keyPress "i") {
i = 0;
_root.pause = false;
_visible = false;
}
on (release, keyPress "I") {
i = 0;
_root.pause = false;
_visible = false;
}
Symbol 160 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 166 Button
on (release) {
_root.items = _root.getCookie("zelda", "items");
this.drawItems();
_root.gotitem = _root.getCookie("zelda", "gotitem");
_root.key1 = _root.getCookie("zelda", "key1");
_root.health = _root.getCookie("zelda", "health");
_root.bombcount = _root.getCookie("zelda", "bombcount");
_root.arrowcount = _root.getCookie("zelda", "arrowcount");
_root.keys = _root.getCookie("zelda", "keys");
_root.hero._x = _root.getCookie("zelda", "posx");
_root.hero._y = _root.getCookie("zelda", "posy");
_root.floor.gotoAndStop(this.getCookie("zelda", "room"));
_root.gotitem2 = _root.getCookie("zelda", "gotitem2");
_root.gotitem3 = _root.getCookie("zelda", "gotitem3");
_root.gotitem4 = _root.getCookie("zelda", "gotitem4");
_root.gotitem5 = _root.getCookie("zelda", "gotitem5");
_root.pause = _root.getCookie("zelda", "pause");
_root.gotoAndStop(4);
}
Symbol 181 MovieClip Frame 1
stop();
Symbol 189 Button
on (release, keyPress "<Space>") {
message.scroll = message.scroll + 1;
message.scroll = message.scroll + 1;
}
Symbol 190 Button
on (release) {
message.scroll = message.scroll - 1;
message.scroll = message.scroll - 1;
}
Symbol 195 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 10
gotoAndStop (1);
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 2
_root.sword = true;
Symbol 227 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 1
stop();
stop();
stop();
Symbol 265 MovieClip Frame 2
stop();
stop();
stop();
Symbol 265 MovieClip Frame 3
stop();
stop();
stop();
Symbol 265 MovieClip Frame 4
stop();
stop();
stop();
Symbol 296 MovieClip Frame 1
a = random(10);
stop();
Symbol 296 MovieClip Frame 11
stop();
Symbol 296 MovieClip Frame 12
stop();
Symbol 296 MovieClip Frame 18
stop();
Symbol 296 MovieClip Frame 26
stop();
Symbol 414 MovieClip Frame 1
fscommand ("allowscale", "false");
random_answer = [["Thats what they all say."], ["If only you had some rupees, I could sell you this power up."], ["Are you looking for the town??"]];
good_answer = [["I see that you have chosen wisely and would like to purchase that power up. Let me know how it works!"], ["The town is very far north-westardly from here."], ["I have already done enough"]];
keywords = [["power"], ["town"], ["help"]];
stop();
Symbol 489 MovieClip Frame 1
stop();
Instance of Symbol 268 MovieClip "testing" in Symbol 489 MovieClip Frame 1
onClipEvent (load) {
item = "bomb bag";
i = 0;
l = _root.inventory.length;
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Welcome to your adventure Link! You must first go find the bomb bag. Now run and discover your destiny!";
c = 0;
timer = true;
n = 0;
while (n < _root.items.length) {
if (_root.items[n] eq "bomb") {
this.dropItem("bomb");
setProperty(_root.item_bar, _visible , true);
_root.item_bar.message = "You have lost the bomb bag";
}
n++;
}
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 282 MovieClip "4" in Symbol 489 MovieClip Frame 1
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "To throw bombs, press CTRL. I will be your spiritual guide through the process of your training";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 1
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 1
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("5arrows", "heroarrows", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 2
stop();
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 2
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 250;
tellTarget (_root.floor) {
gotoAndStop (24);
};
}
}
Instance of Symbol 282 MovieClip "2" in Symbol 489 MovieClip Frame 2
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "To use your sword press the space bar. The sword only effects objects such as enemies.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 2
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 3
stop();
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush4" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 282 MovieClip "4" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "You must find the temple of time...";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 124 MovieClip [kokiriboys] "kokirikids" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Only boys with fairies may chop as well as we do! *HEHEHE*";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush3" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 3
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 4
stop();
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 4
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 250;
tellTarget (_root.floor) {
gotoAndStop (21);
};
}
}
Instance of Symbol 282 MovieClip "4" in Symbol 489 MovieClip Frame 4
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "This is not the direction to the Temple of Time! Turn back!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 5
stop();
Instance of Symbol 282 MovieClip "4" in Symbol 489 MovieClip Frame 5
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "You must cross the through a maze to get to hyrule field!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 6
stop();
Instance of Symbol 121 MovieClip [bomb bag] in Symbol 489 MovieClip Frame 6
onClipEvent (enterFrame) {
if (this.hasItem("bomb")) {
this._x = 1000;
}
if (this.hitTest(_root.hero)) {
this.liftItem("bomb");
this._x = 1000;
setProperty(_root.item_bar, _visible , true);
_root.item_bar.message = "You have found the Bomb Bag";
}
}
Symbol 489 MovieClip Frame 7
stop();
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 7
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("5arrows", "heroarrows", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 7
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 282 MovieClip "4" in Symbol 489 MovieClip Frame 7
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Welcome to Hyrule Field.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 8
stop();
Symbol 489 MovieClip Frame 9
stop();
Instance of Symbol 120 MovieClip [bow] in Symbol 489 MovieClip Frame 9
onClipEvent (enterFrame) {
if (this.hasItem("bow")) {
this._x = 1000;
}
if (this.hitTest(_root.hero)) {
this.liftItem("bow");
this._x = 1000;
setProperty(_root.item_bar, _visible , true);
_root.item_bar.message = "You have found the Bow and Arrow";
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 9
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("5arrows", "heroarrows", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 9
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 10
stop();
Instance of Symbol 296 MovieClip "bush7" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush8" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush9" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush6" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush3" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush5" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("5arrows", "heroarrows", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush4" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 10
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 11
stop();
Instance of Symbol 296 MovieClip "bush7" in Symbol 489 MovieClip Frame 11
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush3" in Symbol 489 MovieClip Frame 11
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 11
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 12
stop();
Symbol 489 MovieClip Frame 13
stop();
Instance of Symbol 119 MovieClip [guard] "enemy" in Symbol 489 MovieClip Frame 13
onClipEvent (enterFrame) {
if (this.hitTest(_root.bomb)) {
tellTarget (_root.ROOM.enemy) {
gotoAndPlay (70);
};
removeMovieClip(_root.ROOM.guard1);
}
if (this.hitTest(_root.arrow)) {
tellTarget (_root.ROOM.enemy) {
gotoAndPlay (70);
removeMovieClip(_root.ROOM.guard1);
};
}
if (this.hitTest(_root.hero.sword)) {
tellTarget (_root.ROOM.enemy) {
gotoAndPlay (70);
removeMovieClip(_root.ROOM.guard1);
};
}
if (this.hitTest(_root.hero)) {
_root.ROOM.guard1.sword.gotoAndPlay(2);
}
}
Instance of Symbol 333 MovieClip in Symbol 489 MovieClip Frame 13
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Aren't you that lad that is the hero of time....";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 336 MovieClip in Symbol 489 MovieClip Frame 13
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I'm staying here with my arms crossed until someone decides to stop me!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 339 MovieClip in Symbol 489 MovieClip Frame 13
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I hate all those mice in the Lostwoods. They make me vulnerable.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 489 MovieClip Frame 13
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Cross my heart and hope to die, stick a needle in my eye: I had a dream where you fought Ganon to the death and he was put into the Secret Realm for all eternity.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 345 MovieClip in Symbol 489 MovieClip Frame 13
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I have travelled a long ways to see my sister, and she as disappeared.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 14
stop();
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 14
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 250;
tellTarget (_root.floor) {
gotoAndStop (18);
};
}
}
Instance of Symbol 348 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "You require a key to get into the temple of time.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 351 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I hear that there is a secret passage way in the cemetery. The boys and I are going to go take a look later today!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 354 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "TUmpa, Lumpa, bitta bee boo!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 357 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I wouldn't recommend going to the cemetery. There are many evil creatures there!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 360 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "To be is not to be...";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 363 MovieClip in Symbol 489 MovieClip Frame 14
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Why do you always find the thing that you have lost in the last place that you look??";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 15
stop();
Instance of Symbol 369 MovieClip "stone" in Symbol 489 MovieClip Frame 15
onClipEvent (load) {
posy = _x;
movey = 50;
maxy = posy - movey;
activate = true;
}
onClipEvent (enterFrame) {
if (_root.boulder eq "complete") {
activate = false;
_x = -150;
_y = 70;
}
if (activate) {
if (this.hitTest(_root.hero._x - 12, _root.hero._y, true) and Key.isDown(37)) {
if (_x < maxy) {
_x = maxy;
activate = false;
}
_x = (_x-1);
_root.hero.speed = 1;
}
}
if (this.hitTest(_root.boulderstop)) {
_root.boulder = "complete";
}
}
Instance of Symbol 268 MovieClip in Symbol 489 MovieClip Frame 15
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "If a tree were to fall in the woods, would it make a sound if no one were there to hear it??";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 372 MovieClip in Symbol 489 MovieClip Frame 15
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I like peanut brittle..";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 375 MovieClip in Symbol 489 MovieClip Frame 15
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "We have heard many tails of your heroic adventures. The king wishes to see you.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 16
stop();
Instance of Symbol 384 MovieClip in Symbol 489 MovieClip Frame 16
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 100;
_root.hero._y = 125;
tellTarget (_root.floor) {
gotoAndStop (19);
};
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 16
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 250;
tellTarget (_root.floor) {
gotoAndStop (12);
};
}
}
Symbol 489 MovieClip Frame 17
stop();
Instance of Symbol 393 MovieClip in Symbol 489 MovieClip Frame 17
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I'm sorry but we are all out of power ups. Perhaps our kokiri forest correspondant will be able to assist you.";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 18
stop();
Instance of Symbol 420 MovieClip in Symbol 489 MovieClip Frame 18
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 150;
_root.talk._visible = 0;
tellTarget (_root.floor) {
gotoAndStop (14);
};
}
}
Instance of Symbol 430 MovieClip in Symbol 489 MovieClip Frame 18
onClipEvent (enterFrame) {
if (_root.gotitem2 == 1) {
this._y = 1000;
}
if (this.hasItem("rupee")) {
if (this.hitTest(_root.hero)) {
_root.gotitem2 = 1;
this._y = 1000;
_root.item_bar.message = "Your life has been replenished";
setProperty("_root.item_bar", _visible , true);
_root.health = 150;
this.dropItem("rupee");
this.liftItem("200rupee");
}
}
}
Instance of Symbol 434 MovieClip in Symbol 489 MovieClip Frame 18
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (_root.gotitem3 == 1) {
this._y = 1000;
}
if (this.hasItem("rupee")) {
if (this.hitTest(_root.hero)) {
_root.gotitem3 = 1;
this._y = 1000;
_root.item_bar.message = "You have bought a bag of nothing";
setProperty("_root.item_bar", _visible , true);
this.liftItem("bag");
this.dropItem("rupee");
}
}
if (this.hasItem("200rupee")) {
if (this.hitTest(_root.hero)) {
_root.gotitem3 = 1;
this._y = 1000;
_root.item_bar.message = "You have bought a bag of nothing";
setProperty("_root.item_bar", _visible , true);
this.liftItem("bag");
this.dropItem("200rupee");
_root.talk._visible = 1;
_root.talk.message = "You somehow got a discounted version of this bag. What luck!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 20) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 489 MovieClip Frame 18
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hasItem("rupee")) {
_root.talk._visible = 1;
_root.talk.message = "What would you like to buy??";
c = 0;
timer = true;
}
if (!this.hasItem("rupee")) {
_root.talk._visible = 1;
_root.talk.message = "You are not welcome in my shop if you do not have money!";
c = 0;
timer = true;
}
if (_root.gotitem3 == 1) {
_root.talk._visible = 1;
_root.talk.message = "Thank you for purchasing!";
c = 0;
timer = true;
}
if (_root.gotitem2 == 1) {
_root.talk._visible = 1;
_root.talk.message = "Thank you for purchasing!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Symbol 489 MovieClip Frame 19
stop();
Instance of Symbol 448 MovieClip in Symbol 489 MovieClip Frame 20
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Zelda has told me of your heroic adventures in conquering the quest of the ocarina of time. Please take this reward of rupees as a sign of our gratitude.";
if (_root.gotitem != 1) {
_root.gotitem = 1;
_root.item_bar.message = "You have received 300 rupees";
setProperty("_root.item_bar", _visible , true);
this.liftItem("rupee");
}
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 393 MovieClip in Symbol 489 MovieClip Frame 21
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "I don't know what to say...";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
Instance of Symbol 299 MovieClip "left" in Symbol 489 MovieClip Frame 24
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 75;
tellTarget (_root.floor) {
gotoAndStop (2);
};
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 24
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 75;
_root.hero._y = 140;
tellTarget (_root.floor) {
gotoAndStop (24);
};
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 24
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 200;
tellTarget (_root.floor) {
gotoAndStop (25);
};
}
}
Instance of Symbol 296 MovieClip "bush7" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush8" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush9" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush6" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush3" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush2" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush5" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("5arrows", "heroarrows", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush4" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("none", "none", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 296 MovieClip "bush" in Symbol 489 MovieClip Frame 24
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.hero.sword)) {
_root.f = c;
play();
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (12 < c) {
this.attachMovie("heartpickup", "heart", 1);
c = 0;
timer = false;
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 489 MovieClip Frame 25
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 75;
_root.hero._y = 140;
tellTarget (_root.floor) {
gotoAndStop (24);
};
}
}
Instance of Symbol 483 MovieClip in Symbol 489 MovieClip Frame 25
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {
_root.talk._visible = 1;
_root.talk.message = "Hello Link and thank you for venturing this far out into the wilderness to see me. I believe you are in great danger Link. I can feel an evil force amongst us. Thus, I am offering you the Book of Mudora as you will need it to fight this evil force. Good luck Link ";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
if (!this.hasItem("book")) {
_root.item_bar.message = "You have received the book of mudora";
setProperty("_root.item_bar", _visible , true);
this.liftItem("book");
}
}
}
Symbol 518 MovieClip Frame 47
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 1
stop();
Instance of Symbol 537 MovieClip "bluewater" in Symbol 544 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero.watertest)) {
_root.hero.water.gotoAndPlay(2);
} else {
_root.hero.water.gotoAndStop(1);
}
}
Symbol 579 MovieClip Frame 1
stop();
Instance of Symbol 127 MovieClip [key] "key" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
if (_root.key1 eq "incomplete") {
this._x = 350;
this._y = 360;
this._visible = 0;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this._x = 350;
this._y = 360;
_root.key1 = "incomplete";
_root.keys = _root.keys + 1;
}
}
Instance of Symbol 299 MovieClip "hitTest2" in Symbol 579 MovieClip Frame 14
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 290;
tellTarget (_root.floor) {
gotoAndStop (17);
};
}
}
Instance of Symbol 299 MovieClip "hitTest23432" in Symbol 579 MovieClip Frame 15
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 100;
tellTarget (_root.floor) {
gotoAndStop (19);
};
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 579 MovieClip Frame 15
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 250;
tellTarget (_root.floor) {
gotoAndStop (20);
};
}
}
Instance of Symbol 562 MovieClip in Symbol 579 MovieClip Frame 17
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 250;
_root.hero._y = 150;
tellTarget (_root.floor) {
gotoAndStop (14);
};
}
}
Instance of Symbol 420 MovieClip in Symbol 579 MovieClip Frame 18
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 150;
_root.talk._visible = 0;
tellTarget (_root.floor) {
gotoAndStop (14);
};
}
}
Instance of Symbol 299 MovieClip "right" in Symbol 579 MovieClip Frame 19
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 150;
tellTarget (_root.floor) {
gotoAndStop (16);
};
}
}
Instance of Symbol 299 MovieClip "hitTest4" in Symbol 579 MovieClip Frame 19
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 270;
tellTarget (_root.floor) {
gotoAndStop (15);
};
}
}
Instance of Symbol 562 MovieClip in Symbol 579 MovieClip Frame 20
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 150;
_root.hero._y = 100;
tellTarget (_root.floor) {
gotoAndStop (15);
};
}
}
Instance of Symbol 562 MovieClip in Symbol 579 MovieClip Frame 21
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.hero._x = 250;
_root.hero._y = 150;
tellTarget (_root.floor) {
gotoAndStop (4);
};
}
}
Symbol 583 Button
on (release, keyPress "i") {
if (!_root.pause) {
_root.pause = true;
} else {
_root.pause = false;
}
}
on (release, keyPress "I") {
if (!_root.pause) {
_root.pause = true;
} else {
_root.pause = false;
}
}
Symbol 587 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 1
stop();
Symbol 607 MovieClip Frame 1
a = random(2);
stop();
Symbol 607 MovieClip Frame 2
stop();
Symbol 607 MovieClip Frame 3
stop();
Symbol 607 MovieClip Frame 4
stop();
Symbol 607 MovieClip Frame 19
if (a == 1) {
gotoAndStop (30);
} else if (a == 2) {
gotoAndStop (31);
}
stop();
Symbol 607 MovieClip Frame 30
stop();
Symbol 607 MovieClip Frame 31
stop();
Symbol 626 MovieClip Frame 1
a = random(2);
stop();
Symbol 626 MovieClip Frame 2
stop();
Symbol 626 MovieClip Frame 3
stop();
Symbol 626 MovieClip Frame 4
stop();
Symbol 626 MovieClip Frame 14
stop();
Instance of Symbol 54 MovieClip [heartpickup] in Symbol 626 MovieClip Frame 14
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this._x = 350;
this._y = 360;
this._visible = 1;
_root.health = _root.health + 15;
if (_root.health < 150) {
this.removeMovieClip();
} else {
_root.health = "150";
this._visible = 0;
}
}
}
Symbol 644 MovieClip Frame 1
a = random(2);
stop();
Symbol 644 MovieClip Frame 2
stop();
Symbol 644 MovieClip Frame 3
stop();
Symbol 644 MovieClip Frame 4
stop();
Symbol 644 MovieClip Frame 17
if (a == 1) {
gotoAndStop (28);
} else if (a == 2) {
gotoAndStop (29);
}
stop();
Symbol 644 MovieClip Frame 28
stop();
Symbol 644 MovieClip Frame 29
stop();
Symbol 661 MovieClip Frame 1
a = random(2);
stop();
Symbol 661 MovieClip Frame 2
stop();
Symbol 661 MovieClip Frame 3
stop();
Symbol 661 MovieClip Frame 4
stop();
Symbol 661 MovieClip Frame 18
if (a == 1) {
gotoAndStop (29);
} else if (a == 2) {
gotoAndStop (30);
}
stop();
Symbol 661 MovieClip Frame 29
stop();
Symbol 661 MovieClip Frame 30
stop();
Symbol 695 MovieClip Frame 1
a = random(3);
Symbol 695 MovieClip Frame 35
if (a == 1) {
gotoAndPlay (36);
} else if (a == 2) {
gotoAndPlay (209);
} else if (a == 3) {
gotoAndPlay (1);
} else if (a == 4) {
gotoAndPlay (399);
}
Symbol 695 MovieClip Frame 202
gotoAndPlay (1);
Symbol 695 MovieClip Frame 398
gotoAndPlay (1);
Symbol 695 MovieClip Frame 539
gotoAndPlay (1);
Symbol 695 MovieClip Frame 541
stop();
Symbol 713 MovieClip Frame 1
a = random(2);
stop();
Symbol 713 MovieClip Frame 2
stop();
Symbol 713 MovieClip Frame 3
stop();
Symbol 713 MovieClip Frame 4
stop();
Symbol 713 MovieClip Frame 25
stop();
Instance of Symbol 51 MovieClip [moneydrop] in Symbol 713 MovieClip Frame 25
onClipEvent (load) {
timer = false;
c = 0;
}
onClipEvent (enterFrame) {
if ((!_root.gotitem4) != 1) {
this._y = 1000;
}
n = 0;
while (n < _root.items.length) {
if (_root.items[n] eq "bag") {
if (this.hitTest(_root.hero)) {
this._x = 1000;
_root.gotitem4 = 1;
setProperty(_root.item_bar, _visible , true);
_root.item_bar.message = "You got money to put in your bag";
}
}
n++;
}
if (!this.hasItem("bag")) {
if (this.hitTest(_root.hero)) {
_root.f = c;
_root.talk._visible = 1;
_root.talk.message = "You require a bag to put this money in!";
c = 0;
timer = true;
}
if (timer == true) {
c++;
}
if (c >= 5) {
_root.talk._visible = 0;
c = 0;
timer = false;
}
}
}
Symbol 714 MovieClip Frame 1
stop();
stop();
Instance of Symbol 607 MovieClip "enemy" in Symbol 714 MovieClip Frame 1
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 626 MovieClip "enemy2" in Symbol 714 MovieClip Frame 4
onClipEvent (load) {
function checkproximity() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
dist_hero = 80;
dx = point.x - _root.hero._x;
dy = point.y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function faceHero() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
_parent.mcx = point.x;
_parent.mcy = point.y;
xDistance = Math.abs(point.x - _root.hero._x);
yDistance = Math.abs(point.y - _root.hero._y);
if (xDistance < yDistance) {
if (_root.hero._y < point.y) {
this.gotoAndStop("back");
} else {
this.gotoAndStop("front");
}
} else if (_root.hero._x < point.x) {
this.gotoAndStop("left");
} else {
this.gotoAndStop("right");
}
}
function attack() {
dir = halt;
_root.arrow2.shootarrow = true;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
face();
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
if (!_root.floor.hitTest(point.x + Xstep, ((point.y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
faceHero();
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
} else if (dir == halt) {
Xstep = 0;
Ystep = 0;
stop();
}
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < _root.dam) {
gotoAndPlay (6);
}
}
}
}
Instance of Symbol 644 MovieClip "enemy2" in Symbol 714 MovieClip Frame 5
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 644 MovieClip "enemy" in Symbol 714 MovieClip Frame 5
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy2" in Symbol 714 MovieClip Frame 6
onClipEvent (load) {
function checkproximity() {
dist_hero = 0;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 1;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero.zelda)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy5" in Symbol 714 MovieClip Frame 6
onClipEvent (load) {
function checkproximity() {
dist_hero = 0;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 1;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero.zelda)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy3" in Symbol 714 MovieClip Frame 6
onClipEvent (load) {
function checkproximity() {
dist_hero = 0;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 1;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero.zelda)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy4" in Symbol 714 MovieClip Frame 6
onClipEvent (load) {
function checkproximity() {
dist_hero = 0;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 1;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero.zelda)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy" in Symbol 714 MovieClip Frame 6
onClipEvent (load) {
function checkproximity() {
dist_hero = 0;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 1;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero.zelda)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
all = false;
gotoAndPlay (6);
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 644 MovieClip "enemy2" in Symbol 714 MovieClip Frame 7
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 607 MovieClip "enemy" in Symbol 714 MovieClip Frame 7
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 607 MovieClip "enemy" in Symbol 714 MovieClip Frame 9
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 644 MovieClip "enemy2" in Symbol 714 MovieClip Frame 10
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 644 MovieClip "enemy" in Symbol 714 MovieClip Frame 10
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 626 MovieClip "enemy2" in Symbol 714 MovieClip Frame 11
onClipEvent (load) {
function checkproximity() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
if (0 >= _root.enemyarrowtime) {
dist_hero = 80;
dx = point.x - _root.hero._x;
dy = point.y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
}
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function faceHero() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
_parent.mcx = point.x;
_parent.mcy = point.y;
xDistance = Math.abs(point.x - _root.hero._x);
yDistance = Math.abs(point.y - _root.hero._y);
if (xDistance < yDistance) {
if (_root.hero._y < point.y) {
this.gotoAndStop("back");
} else {
this.gotoAndStop("front");
}
} else if (_root.hero._x < point.x) {
this.gotoAndStop("left");
} else {
this.gotoAndStop("right");
}
}
function attack() {
dir = halt;
if (0 >= _root.enemyarrowtime) {
_root.arrow2.shootarrow = true;
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 1;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
face();
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
if (!_root.floor.hitTest(point.x + Xstep, ((point.y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
faceHero();
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
} else if (dir == halt) {
Xstep = 0;
Ystep = 0;
stop();
}
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
}
}
Instance of Symbol 607 MovieClip "enemy" in Symbol 714 MovieClip Frame 11
onClipEvent (load) {
function checkproximity() {
dist_hero = 50;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
_root.hero.hit._visible = 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 695 MovieClip in Symbol 714 MovieClip Frame 12
onClipEvent (load) {
function attack() {
_root.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if ((damage = 100)) {
all = false;
gotoAndPlay (541);
}
}
}
onClipEvent (enterFrame) {
if (!_root.pause) {
this.play();
} else {
this.stop();
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
}
}
Instance of Symbol 661 MovieClip "enemy" in Symbol 714 MovieClip Frame 16
onClipEvent (load) {
function checkproximity() {
dist_hero = 1;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 661 MovieClip "enemy2" in Symbol 714 MovieClip Frame 16
onClipEvent (load) {
function checkproximity() {
dist_hero = 1;
dx = _x - _root.hero._x;
dy = _y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
speed = 2;
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 2;
}
}
function follow() {
if (in_range) {
if (this.hitTest(_root.hero)) {
xstep = _root.hero.xstep + 1;
ystep = _root.hero.ystep + 1;
}
lock = false;
my = _root.hero._y;
mx = _root.hero._x;
if (mx < _x) {
dx = _x - mx;
this.gotoAndStop("left");
} else {
dx = mx - _x;
this.gotoAndStop("right");
}
moveSpeedx = dx / 10;
if (mx < _x) {
_x = (_x - moveSpeedx);
} else {
_x = (_x + moveSpeedx);
}
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 10;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
}
function attack() {
_parent.dam = damage;
if (this.hitTest(_root.hero.sword)) {
damage = damage + 1;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 2;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
follow();
if (!_root.floor.hitTest(this._x + Xstep, ((this._y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
}
}
if (this.hitTest(_root.hero.zelda)) {
_root.health = _root.health - 1;
_root.hero.hit.play();
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
}
}
}
Instance of Symbol 713 MovieClip "enemy" in Symbol 714 MovieClip Frame 19
onClipEvent (load) {
function checkproximity() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
dist_hero = 80;
dx = point.x - _root.hero._x;
dy = point.y - _root.hero._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < dist_hero) {
in_range = true;
} else {
in_range = false;
lock = true;
speed = 3;
}
}
function faceHero() {
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
_parent.mcx = point.x;
_parent.mcy = point.y;
xDistance = Math.abs(point.x - _root.hero._x);
yDistance = Math.abs(point.y - _root.hero._y);
if (xDistance < yDistance) {
if (_root.hero._y < point.y) {
this.gotoAndStop("back");
} else {
this.gotoAndStop("front");
}
} else if (_root.hero._x < point.x) {
this.gotoAndStop("left");
} else {
this.gotoAndStop("right");
}
}
function attack() {
dir = halt;
if (0 >= _root.enemyarrowtime) {
_root.arrow3.shootarrow = true;
}
}
lock = true;
up = 1;
down = 2;
right = 3;
left = 4;
speed = 3;
none = 0;
dir = random(4) + 1;
off = true;
damage = 0;
all = true;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (all) {
checkproximity();
face();
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
if (!_root.floor.hitTest(point.x + Xstep, ((point.y + Ystep) + Ystep) + 15, true)) {
this._x = this._x + Xstep;
this._y = this._y + Ystep;
hit = false;
} else {
hit = true;
}
if (in_range and (!hit)) {
faceHero();
attack();
}
if (off) {
if (hit or (98 < random(100))) {
dir = random(4) + 1;
}
}
if (lock) {
if (dir == UP) {
Ystep = -speed;
Xstep = 0;
this.gotoAndStop("back");
} else if (dir == down) {
Ystep = speed;
Xstep = 0;
this.gotoAndStop("front");
} else if (dir == left) {
Xstep = -speed;
Ystep = 0;
this.gotoAndStop("left");
} else if (dir == right) {
Xstep = speed;
Ystep = 0;
this.gotoAndStop("right");
} else if (dir == halt) {
Xstep = 0;
Ystep = 0;
stop();
}
}
if (this.hitTest(_root.arrow)) {
_root.dam = _root.dam + 2;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root["bomb" + count])) {
_root.dam = _root.dam + 3;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (this.hitTest(_root.hero.sword)) {
_root.dam = _root.dam + 5;
_x = (_x + xstep);
_y = (_y + ystep);
}
if (3 < damage) {
all = false;
gotoAndPlay (6);
}
}
}
}