Frame 1
_root.count1 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
setProperty("load.g", _xscale , _root.count1);
Frame 2
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
_root.m.s.setVolume(100);
_root.m.s.start();
gotoAndPlay (4);
System.security.allowDomain("gamezhero.com", "www.gamezhero.com");
_root.createEmptyMovieClip("gamezhero", 100000);
_root.gamezhero.loadMovie("http://www.gamezhero.com/flash/gamezhero2.swf?x=25&y=380&from=armadilloknight1&scale=80&t=1128173728203");
Stage.showMenu = false;
Frame 4
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 29 MovieClip "jukebox" in Frame 4
onClipEvent (load) {
function vReset() {
snd.stop();
_root.jukebox.gotoAndPlay(4);
}
snd = new Sound();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 61 MovieClip "tBoard" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 68 MovieClip "bossGage" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 79 MovieClip "dWindow" in Frame 4
onClipEvent (load) {
function open(port, msg) {
action = "open";
message = msg;
portrait.gotoAndStop(port);
_root.world.player.actionLock = true;
_root.world.player.stop();
this._visible = true;
this._y = targetY;
this._xscale = 0;
this._yscale = 0;
}
function close() {
_root.world.player.actionLock = false;
if (_root.world.player.pose == "stand") {
_root.world.player.gotoAndStop("stand");
_root.world.player.pose = "stand";
} else {
_root.world.player.prevPose = "bleh";
_root.world.player.pose = "ko";
}
this._visible = false;
this._y = -200;
action = "done";
if (_root.world.endBlock.egStart) {
_root.jukebox.gotoAndPlay(2);
_root.world.endBlock.egStart = false;
}
_root.jukebox.snd.setVolume(100);
}
action = "none";
this._visible = false;
targetY = this._y;
this._y = -200;
scaleStep = 10;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (Key.isDown(88)) {
action = "close";
}
}
if (action == "open") {
if (this._xscale < 100) {
this._xscale = this._xscale + scaleStep;
this._yscale = this._yscale + scaleStep;
} else {
action = "none";
}
}
if (action == "close") {
if (0 < this._xscale) {
this._xscale = this._xscale - scaleStep;
this._yscale = this._yscale - scaleStep;
} else {
close();
}
}
}
Instance of Symbol 90 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_parent.world.player.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 249 MovieClip "world" in Frame 4
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "BEST";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 5
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 269 MovieClip "world" in Frame 5
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "BEST";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 6
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 298 MovieClip "world" in Frame 6
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "BEST";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 301 MovieClip "world" in Frame 7
onClipEvent (load) {
safeY = -600;
}
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 2
stop();
Symbol 29 MovieClip Frame 3
stop();
Symbol 38 Button
on (release) {
getURL ("doneDonate.html");
}
Symbol 45 Button
on (release) {
_root.continueNow();
}
Symbol 47 MovieClip Frame 1
fadeType = "cont";
resetFlag = false;
Symbol 47 MovieClip Frame 11
stop();
this._visible = false;
Symbol 47 MovieClip Frame 12
this._visible = true;
Symbol 47 MovieClip Frame 37
if (fadeType == "cont") {
resetFlag = true;
}
Symbol 47 MovieClip Frame 39
resetFlag = false;
Symbol 47 MovieClip Frame 52
if (fadeType == "cont") {
gotoAndPlay (1);
}
if (fadeType == "game") {
gotoAndPlay (53);
}
Symbol 47 MovieClip Frame 53
stop();
Symbol 52 Button
on (release) {
_quality = "MEDIUM";
loadMovie ("PL2.swf", _level0);
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 10
this._y = _root.world.safeY;
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 2
stop();
Symbol 118 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 18
gotoAndPlay (4);
Symbol 148 MovieClip Frame 37
attacking = false;
goFight = false;
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 155 MovieClip Frame 20
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 2
stop();
Symbol 158 MovieClip Frame 3
stop();
Symbol 158 MovieClip Frame 18
gotoAndPlay (4);
Symbol 158 MovieClip Frame 37
attacking = false;
goFight = false;
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 160 MovieClip Frame 20
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 20
this._y = _root.world.safeY;
stop();
Symbol 173 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 175 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 2
stop();
Symbol 208 MovieClip Frame 3
stop();
Symbol 208 MovieClip Frame 4
stop();
Symbol 208 MovieClip Frame 24
gotoAndPlay (5);
Symbol 208 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 193 MovieClip "attMask" in Symbol 208 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 208 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 208 MovieClip Frame 31
stop();
Symbol 208 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 208 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 208 MovieClip Frame 41
stop();
Symbol 208 MovieClip Frame 50
gotoAndPlay (42);
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 30
stop();
Instance of Symbol 96 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 110 MovieClip "fireBall" in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 10, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 120 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.nextFrame();
}
}
Instance of Symbol 122 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 148 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 155 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 158 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 158 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 160 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 162 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 118 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 208 MovieClip "player" in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(4);
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 210 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "Hey, you're a Knight of Serenity right? Our village is under attack! Please help us!");
active = false;
}
}
Instance of Symbol 212 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "I saw something flying overhead just before the attack. What was it?");
active = false;
}
}
Instance of Symbol 213 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
}
Instance of Symbol 96 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 217 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 234 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge1._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge1._rotation = _parent.ground.bridge1._rotation + 3;
if (_parent.ground.bridge1._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 217 MovieClip in Symbol 249 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 2
stop();
Symbol 252 MovieClip Frame 3
stop();
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 2
stop();
Symbol 253 MovieClip Frame 3
stop();
Symbol 253 MovieClip Frame 4
stop();
Symbol 253 MovieClip Frame 24
gotoAndPlay (5);
Symbol 253 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 193 MovieClip "attMask" in Symbol 253 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 253 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 253 MovieClip Frame 31
stop();
Symbol 253 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 253 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 253 MovieClip Frame 41
stop();
Symbol 253 MovieClip Frame 50
gotoAndPlay (42);
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 30
stop();
Symbol 261 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 30
stop();
Instance of Symbol 96 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 110 MovieClip "fireBall" in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 10, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 120 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.nextFrame();
}
}
Instance of Symbol 155 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 155 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 219 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 217 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 160 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 253 MovieClip "player" in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 162 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 254 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "I saw a young armadillo with a lance run up ahead. Is he with you?");
active = false;
}
}
Instance of Symbol 235 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 256 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(3, "A kid my size just went by. He better be careful!");
active = false;
}
}
Instance of Symbol 257 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
}
Instance of Symbol 258 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "Tiago is safe!? Oh, thank you Sir Knight!");
active = false;
}
}
Instance of Symbol 259 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge4._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge4._rotation = _parent.ground.bridge4._rotation + 3;
if (_parent.ground.bridge4._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 260 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(3, "Thanks for saving me mister! My name's Tiago. If you see my mom, tell her I'm OK.");
active = false;
}
}
Instance of Symbol 160 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 261 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge3._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge3._rotation = _parent.ground.bridge3._rotation + 3;
if (_parent.ground.bridge3._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 262 MovieClip "endBlock" in Symbol 269 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 1300;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Aaah! Gallan look out! There's a d..d..d..DRAGON!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 50;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Symbol 287 MovieClip Frame 7
if (fireBreath) {
gotoAndPlay (15);
}
Symbol 287 MovieClip Frame 14
if (fireBreath == false) {
gotoAndPlay (1);
}
Symbol 287 MovieClip Frame 33
fireCount++;
_parent.fireBall.activate(this._x - 248, this._y + 66, -20);
Symbol 287 MovieClip Frame 39
gotoAndPlay (1);
Symbol 289 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 2
stop();
Symbol 289 MovieClip Frame 3
stop();
Symbol 289 MovieClip Frame 4
stop();
Symbol 289 MovieClip Frame 24
gotoAndPlay (5);
Symbol 289 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 193 MovieClip "attMask" in Symbol 289 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 289 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 289 MovieClip Frame 31
stop();
Symbol 289 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 289 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 289 MovieClip Frame 41
stop();
Symbol 289 MovieClip Frame 50
gotoAndPlay (42);
Instance of Symbol 96 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 270 MovieClip "fireBall" in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, 20000, 14, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 155 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 287 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._x = startX;
this._y = startY;
_root.bossGage.bar._xscale = 100;
_root.bossGage._visible = false;
attackPwr = 20;
gotoAndPlay (1);
fireBreath = false;
fireLimit = 3;
fireCount = 0;
dead = false;
active = true;
hp = 140;
wincing = false;
winceTmp = 0;
winceDelay = 30;
flySpeed = 5;
seek = true;
dive = false;
diveTimer = 0;
hVelocity = 0;
vVelocity = 0;
}
function getHit(damage, xOffset) {
hp = hp - damage;
wincing = true;
winceTmp = 0;
_root.bossGage.bar._xscale = (this.hp / 160) * 100;
if (0 >= hp) {
hp = 0;
die();
}
}
function die() {
active = false;
fireBreath = false;
dead = true;
_parent.spang._y = _root.world.safeY;
this.gotoAndStop("wince");
stop();
_root.bossGage._visible = false;
_parent.player.score = _parent.player.score + 100;
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (dead && (this._y < (_parent.player._y + 1500))) {
this._y = this._y + 20;
}
if (dead && (this._y >= (_parent.player._y + 1500))) {
_parent.endBlock.tally = true;
}
if (_parent.player.dead) {
this.stop();
}
if (active && (dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 900) {
if (_parent.player.actionLock == false) {
if (_parent.player.dead == false) {
if (wincing) {
this.gotoAndStop("wince");
winceTmp++;
if (winceTmp == winceDelay) {
wincing = false;
this.gotoAndPlay("fly");
}
if (winceTmp == 2) {
_parent.spang._y = _root.world.safeY;
}
}
if (this.hitMask.hitTest(_parent.player.attMask) && (wincing == false)) {
slash.start();
_parent.spang._y = this._y;
_parent.spang._x = this._x - (this._width / 2);
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr / 2, _parent.player._x);
}
fireBreath = false;
if (fireCount == fireLimit) {
fireCount = 0;
seek = false;
hVelocity = 0;
vVelocity = 0;
dive = true;
}
if (seek) {
if (_parent.player._x < (this._x - 275)) {
hVelocity = (flySpeed * -1) - 3;
fireBreath = false;
}
if (_parent.player._x >= (this._x - 200)) {
hVelocity = flySpeed;
fireBreath = false;
}
if (((this._x - 275) < _parent.player._x) && (_parent.player._x < (this._x - 200))) {
hVelocity = 0;
fireBreath = true;
}
if (_parent.player._y < (this._y + 150)) {
vVelocity = flySpeed * -1;
}
if (_parent.player._y >= (this._y + 200)) {
vVelocity = flySpeed;
}
if (((this._y + 200) < _parent.player._y) && (_parent.player._y < (this._y + 150))) {
vVelocity = 0;
}
}
if (wincing) {
hVelocity = flySpeed;
vVelocity = flySpeed * -1;
}
if (dive) {
if ((-400 < this._y) && (diveTimer == 0)) {
hVelocity = 0;
vVelocity = flySpeed * -2;
}
if (-400 >= this._y) {
diveTimer = 1;
}
if (diveTimer == 1) {
this._y = _parent.player._y - 40;
this._x = _parent.player._x + 600;
this.gotoAndStop("dive");
hVelocity = flySpeed * -8;
vVelocity = 0;
diveTimer = 2;
}
if ((diveTimer == 2) && (this._x < (_parent.player._x - 600))) {
this._y = _parent.player._y - 400;
this._x = _parent.player._x + 600;
seek = true;
this.gotoAndPlay("fly");
diveTimer = 0;
dive = false;
}
if (diveTimer == 2) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, 20000, 14, true);
}
}
}
this._x = this._x + hVelocity;
this._y = this._y + vVelocity;
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 122 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 288 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(4, "Well, sounds like Milo DIDN'T wait for me like I asked. I hope he's allright...");
active = false;
}
}
Instance of Symbol 289 MovieClip "player" in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 250;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 162 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 290 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "You better take these arrows, I saw something big up ahead...");
active = false;
}
}
Instance of Symbol 291 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "Please take this fruit, to recover your strength!");
active = false;
}
}
Instance of Symbol 235 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 217 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 235 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 261 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge3._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge3._rotation = _parent.ground.bridge3._rotation + 3;
if (_parent.ground.bridge3._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 292 MovieClip "endBlock" in Symbol 298 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Aaah! Gallan look out! There's a d..d..d..DRAGON!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 96 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 110 MovieClip "fireBall" in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 10, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 120 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.nextFrame();
}
}
Instance of Symbol 155 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 155 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 219 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 217 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 160 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 253 MovieClip "player" in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 162 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 254 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "I saw a young armadillo with a lance run up ahead. Is he with you?");
active = false;
}
}
Instance of Symbol 235 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 256 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(3, "A kid my size just went by. He better be careful!");
active = false;
}
}
Instance of Symbol 257 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
}
Instance of Symbol 258 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "Tiago is safe!? Oh, thank you Sir Knight!");
active = false;
}
}
Instance of Symbol 259 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge4._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge4._rotation = _parent.ground.bridge4._rotation + 3;
if (_parent.ground.bridge4._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 260 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(3, "Thanks for saving me mister! My name's Tiago. If you see my mom, tell her I'm OK.");
active = false;
}
}
Instance of Symbol 160 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 261 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge3._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge3._rotation = _parent.ground.bridge3._rotation + 3;
if (_parent.ground.bridge3._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 262 MovieClip "endBlock" in Symbol 299 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 1300;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Aaah! Gallan look out! There's a d..d..d..DRAGON!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 50;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 96 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 270 MovieClip "fireBall" in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, 20000, 14, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 155 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 287 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._x = startX;
this._y = startY;
_root.bossGage.bar._xscale = 100;
_root.bossGage._visible = false;
attackPwr = 20;
gotoAndPlay (1);
fireBreath = false;
fireLimit = 3;
fireCount = 0;
dead = false;
active = true;
hp = 140;
wincing = false;
winceTmp = 0;
winceDelay = 30;
flySpeed = 5;
seek = true;
dive = false;
diveTimer = 0;
hVelocity = 0;
vVelocity = 0;
}
function getHit(damage, xOffset) {
hp = hp - damage;
wincing = true;
winceTmp = 0;
_root.bossGage.bar._xscale = (this.hp / 160) * 100;
if (0 >= hp) {
hp = 0;
die();
}
}
function die() {
active = false;
fireBreath = false;
dead = true;
_parent.spang._y = _root.world.safeY;
this.gotoAndStop("wince");
stop();
_root.bossGage._visible = false;
_parent.player.score = _parent.player.score + 100;
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (dead && (this._y < (_parent.player._y + 1500))) {
this._y = this._y + 20;
}
if (dead && (this._y >= (_parent.player._y + 1500))) {
_parent.endBlock.tally = true;
}
if (_parent.player.dead) {
this.stop();
}
if (active && (dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 900) {
if (_parent.player.actionLock == false) {
if (_parent.player.dead == false) {
if (wincing) {
this.gotoAndStop("wince");
winceTmp++;
if (winceTmp == winceDelay) {
wincing = false;
this.gotoAndPlay("fly");
}
if (winceTmp == 2) {
_parent.spang._y = _root.world.safeY;
}
}
if (this.hitMask.hitTest(_parent.player.attMask) && (wincing == false)) {
slash.start();
_parent.spang._y = this._y;
_parent.spang._x = this._x - (this._width / 2);
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr / 2, _parent.player._x);
}
fireBreath = false;
if (fireCount == fireLimit) {
fireCount = 0;
seek = false;
hVelocity = 0;
vVelocity = 0;
dive = true;
}
if (seek) {
if (_parent.player._x < (this._x - 275)) {
hVelocity = (flySpeed * -1) - 3;
fireBreath = false;
}
if (_parent.player._x >= (this._x - 200)) {
hVelocity = flySpeed;
fireBreath = false;
}
if (((this._x - 275) < _parent.player._x) && (_parent.player._x < (this._x - 200))) {
hVelocity = 0;
fireBreath = true;
}
if (_parent.player._y < (this._y + 150)) {
vVelocity = flySpeed * -1;
}
if (_parent.player._y >= (this._y + 200)) {
vVelocity = flySpeed;
}
if (((this._y + 200) < _parent.player._y) && (_parent.player._y < (this._y + 150))) {
vVelocity = 0;
}
}
if (wincing) {
hVelocity = flySpeed;
vVelocity = flySpeed * -1;
}
if (dive) {
if ((-400 < this._y) && (diveTimer == 0)) {
hVelocity = 0;
vVelocity = flySpeed * -2;
}
if (-400 >= this._y) {
diveTimer = 1;
}
if (diveTimer == 1) {
this._y = _parent.player._y - 40;
this._x = _parent.player._x + 600;
this.gotoAndStop("dive");
hVelocity = flySpeed * -8;
vVelocity = 0;
diveTimer = 2;
}
if ((diveTimer == 2) && (this._x < (_parent.player._x - 600))) {
this._y = _parent.player._y - 400;
this._x = _parent.player._x + 600;
seek = true;
this.gotoAndPlay("fly");
diveTimer = 0;
dive = false;
}
if (diveTimer == 2) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, 20000, 14, true);
}
}
}
this._x = this._x + hVelocity;
this._y = this._y + vVelocity;
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 122 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 288 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(4, "Well, sounds like Milo DIDN'T wait for me like I asked. I hope he's allright...");
active = false;
}
}
Instance of Symbol 289 MovieClip "player" in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 250;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 252 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 162 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 290 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "You better take these arrows, I saw something big up ahead...");
active = false;
}
}
Instance of Symbol 291 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "Please take this fruit, to recover your strength!");
active = false;
}
}
Instance of Symbol 235 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 217 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 235 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 261 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge3._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge3._rotation = _parent.ground.bridge3._rotation + 3;
if (_parent.ground.bridge3._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 292 MovieClip "endBlock" in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Aaah! Gallan look out! There's a d..d..d..DRAGON!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 96 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 110 MovieClip "fireBall" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function activate(xLoc, yLoc, direc) {
s.start();
this._x = xLoc;
this._y = yLoc;
this.play();
active = true;
moveX = direc;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
this._y = _root.world.safeY;
this.stop();
active = false;
}
moveY = 20;
moveX = -20;
s = new Sound();
s.attachSound("breathe");
active = false;
this.stop();
}
onClipEvent (enterFrame) {
if (active) {
this._x = this._x + moveX;
this._y = this._y + moveY;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 10, false);
}
if (_parent.ground.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
explode();
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 120 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.nextFrame();
}
}
Instance of Symbol 122 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 148 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 148 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 155 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 158 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 158 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 160 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 162 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 122 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 118 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 166 MovieClip "deathEffect" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 168 MovieClip "arrow1" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 208 MovieClip "player" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(4);
arrows = 0;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "PAUSE!");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 210 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "Hey, you're a Knight of Serenity right? Our village is under attack! Please help us!");
active = false;
}
}
Instance of Symbol 212 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "I saw something flying overhead just before the attack. What was it?");
active = false;
}
}
Instance of Symbol 213 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = 100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = -100;
}
}
Instance of Symbol 96 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.getHit(100, this._x, 0, false);
_parent.player.die();
_parent.player._y = _parent.player._y + this._height;
}
}
Instance of Symbol 97 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false)) {
_parent.player.vLock = true;
}
}
Instance of Symbol 217 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 234 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
bridgeRotation = 0;
_parent.ground.bridge1._rotation = 0;
goRotate = false;
this.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitMask.hitTest(_parent.player.attMask)) {
this.gotoAndPlay(2);
goRotate = true;
}
if (goRotate) {
_parent.ground.bridge1._rotation = _parent.ground.bridge1._rotation + 3;
if (_parent.ground.bridge1._rotation == 90) {
goRotate = false;
}
}
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 235 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
active = false;
s = new Sound(this);
s.attachSound("flag");
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
gotoAndStop (2);
_parent.startX = _parent._x + _parent.player.screenNudge;
_parent.startY = _parent._y;
_parent.player.startX = this._x;
_parent.player.startY = this._y - 500;
_parent.player.prevScore = _parent.player.score;
s.start();
active = true;
}
}
}
Instance of Symbol 217 MovieClip in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}