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);
Frame 4
stop();
Instance of Symbol 57 MovieClip "charDisp" in Frame 4
onClipEvent (load) {
stop();
}
Frame 5
function continueNow() {
_root.egStart = false;
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 66 MovieClip "jukebox" in Frame 5
onClipEvent (load) {
function vReset() {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(4);
}
snd = new Sound();
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 98 MovieClip "tBoard" in Frame 5
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 102 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (0 >= _root.world.player.bombs) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 108 MovieClip "bossGage" in Frame 5
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 121 MovieClip "dWindow" in Frame 5
onClipEvent (load) {
function open(port, msg) {
action = "open";
goNext = false;
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.egStart) {
_root.jukebox.gotoAndPlay(2);
_root.egStart = false;
}
_root.jukebox.snd.setVolume(100);
goNext = true;
}
action = "none";
goNext = false;
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 134 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_parent.world.player.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 408 MovieClip "world" in Frame 5
onClipEvent (load) {
safeY = 5197;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 409 MovieClip "white" in Frame 5
onClipEvent (load) {
this._visible = false;
}
Frame 6
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 453 MovieClip "world" in Frame 6
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 7
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 526 MovieClip "world" in Frame 7
onClipEvent (load) {
safeY = 2300;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 8
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 579 MovieClip "world" in Frame 8
onClipEvent (load) {
safeY = 2000;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 9
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 586 MovieClip "world" in Frame 9
onClipEvent (load) {
safeY = 5197;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 10
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 591 MovieClip "world" in Frame 10
onClipEvent (load) {
safeY = 5197;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 11
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 607 MovieClip "world" in Frame 11
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 12
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 617 MovieClip "world" in Frame 12
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 13
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 625 MovieClip "world" in Frame 13
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 14
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.theTarget = _root.world;
if (_root.selectedPlayer == "MILO") {
_root.world.player = _root.world.milo;
}
if (_root.selectedPlayer == "GALLAN") {
_root.world.player = _root.world.gallan;
}
Instance of Symbol 697 MovieClip "world" in Frame 14
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 104
stop();
Symbol 45 Button
on (rollOver) {
_root.charDisp.gotoAndStop(2);
}
on (rollOut) {
_root.charDisp.gotoAndStop(1);
}
on (release) {
_root.selectedPlayer = "MILO";
_root.nextFrame();
}
Symbol 50 Button
on (rollOver) {
_root.charDisp.gotoAndStop(3);
}
on (rollOut) {
_root.charDisp.gotoAndStop(1);
}
on (release) {
_root.selectedPlayer = "GALLAN";
_root.nextFrame();
}
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 3
stop();
Symbol 69 MovieClip Frame 1
doorFlag = false;
Symbol 69 MovieClip Frame 11
stop();
this._visible = false;
Symbol 69 MovieClip Frame 12
this._visible = true;
Symbol 69 MovieClip Frame 39
_root.nextFrame();
doorFlag = true;
this.gotoAndPlay("warpIn");
_root.white._visible = false;
Symbol 75 Button
on (release) {
getURL ("doneDonate.html");
}
Symbol 83 Button
on (release) {
_root.continueNow();
}
Symbol 85 MovieClip Frame 1
fadeType = "cont";
resetFlag = false;
Symbol 85 MovieClip Frame 11
stop();
this._visible = false;
Symbol 85 MovieClip Frame 12
this._visible = true;
Symbol 85 MovieClip Frame 37
if (fadeType == "cont") {
resetFlag = true;
}
Symbol 85 MovieClip Frame 39
resetFlag = false;
Symbol 85 MovieClip Frame 52
if (fadeType == "cont") {
gotoAndPlay (1);
}
if (fadeType == "game") {
gotoAndPlay (53);
}
Symbol 85 MovieClip Frame 53
stop();
Symbol 89 Button
on (release) {
_quality = "MEDIUM";
gotoAndPlay (1);
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 2
stop();
Instance of Symbol 123 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedPlayer == "GALLAN") {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 125 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedPlayer == "MILO") {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 128 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
if (_root.selectedPlayer == "GALLAN") {
this.gotoAndStop(1);
}
if (_root.selectedPlayer == "MILO") {
this.gotoAndStop(2);
}
}
Symbol 148 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 150 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 2
stop();
Symbol 238 MovieClip Frame 3
stop();
Symbol 238 MovieClip Frame 4
stop();
Symbol 238 MovieClip Frame 24
gotoAndPlay (5);
Symbol 238 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 238 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 238 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 238 MovieClip Frame 31
stop();
Symbol 238 MovieClip Frame 43
gotoAndPlay (32);
Symbol 238 MovieClip Frame 49
gotoAndPlay (44);
Symbol 238 MovieClip Frame 50
stop();
Symbol 238 MovieClip Frame 51
stop();
Symbol 238 MovieClip Frame 52
stop();
Symbol 238 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 238 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 238 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 238 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 238 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 238 MovieClip Frame 70
stop();
Symbol 238 MovieClip Frame 79
gotoAndPlay (71);
Symbol 238 MovieClip Frame 80
doneThrow = false;
Symbol 238 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 238 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 2
stop();
Symbol 336 MovieClip Frame 3
stop();
Symbol 336 MovieClip Frame 4
stop();
Symbol 336 MovieClip Frame 24
gotoAndPlay (5);
Symbol 336 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 336 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 336 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 336 MovieClip Frame 31
stop();
Symbol 336 MovieClip Frame 43
gotoAndPlay (32);
Symbol 336 MovieClip Frame 49
gotoAndPlay (44);
Symbol 336 MovieClip Frame 50
stop();
Symbol 336 MovieClip Frame 51
stop();
Symbol 336 MovieClip Frame 52
stop();
Symbol 336 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 336 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 336 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 336 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 336 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 336 MovieClip Frame 70
stop();
Symbol 336 MovieClip Frame 79
gotoAndPlay (71);
Symbol 336 MovieClip Frame 80
doneThrow = false;
Symbol 336 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 336 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 10
this._y = _root.world.safeY;
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 20
this._y = _root.world.safeY;
stop();
Instance of Symbol 398 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 401 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 402 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 403 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
_parent._parent.player.snowboard = false;
_parent._parent.player.groundSlope = 0;
}
}
Instance of Symbol 405 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 3;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 406 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 238 MovieClip "gallan" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 336 MovieClip "milo" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 338 MovieClip "seed" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 408 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--;
_root.arrowDisplay = _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 342 MovieClip in Symbol 408 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;
_root.arrowDisplay = _parent.player.arrows;
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 344 MovieClip in Symbol 408 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 345 MovieClip in Symbol 408 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 408 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 408 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 361 MovieClip in Symbol 408 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 365 MovieClip "deathEffect" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 366 MovieClip in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 386 MovieClip in Symbol 408 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(6, "This is the bunny hill. Thanks for saving Kenora by the way...");
active = false;
}
}
Instance of Symbol 371 MovieClip in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 392 MovieClip "sb1" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 407 MovieClip "ground" in Symbol 408 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 416 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 2
stop();
Symbol 416 MovieClip Frame 3
stop();
Symbol 416 MovieClip Frame 4
stop();
Symbol 416 MovieClip Frame 24
gotoAndPlay (5);
Symbol 416 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 416 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 416 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 416 MovieClip Frame 31
stop();
Symbol 416 MovieClip Frame 43
gotoAndPlay (32);
Symbol 416 MovieClip Frame 49
gotoAndPlay (44);
Symbol 416 MovieClip Frame 50
stop();
Symbol 416 MovieClip Frame 51
stop();
Symbol 416 MovieClip Frame 52
stop();
Symbol 416 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 416 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 416 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 416 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 416 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 416 MovieClip Frame 70
stop();
Symbol 416 MovieClip Frame 79
gotoAndPlay (71);
Symbol 416 MovieClip Frame 80
doneThrow = false;
Symbol 416 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 416 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 417 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 2
stop();
Symbol 417 MovieClip Frame 3
stop();
Symbol 417 MovieClip Frame 4
stop();
Symbol 417 MovieClip Frame 24
gotoAndPlay (5);
Symbol 417 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 417 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 417 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 417 MovieClip Frame 31
stop();
Symbol 417 MovieClip Frame 43
gotoAndPlay (32);
Symbol 417 MovieClip Frame 49
gotoAndPlay (44);
Symbol 417 MovieClip Frame 50
stop();
Symbol 417 MovieClip Frame 51
stop();
Symbol 417 MovieClip Frame 52
stop();
Symbol 417 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 417 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 417 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 417 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 417 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 417 MovieClip Frame 70
stop();
Symbol 417 MovieClip Frame 79
gotoAndPlay (71);
Symbol 417 MovieClip Frame 80
doneThrow = false;
Symbol 417 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 417 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 438 MovieClip Frame 1
stop();
Symbol 438 MovieClip Frame 2
shattering = true;
Symbol 438 MovieClip Frame 14
stop();
deactivate();
Symbol 440 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 27
stop();
Instance of Symbol 416 MovieClip "gallan" in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 344 MovieClip in Symbol 453 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 453 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 361 MovieClip in Symbol 453 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 365 MovieClip "deathEffect" in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 453 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--;
_root.arrowDisplay = _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 422 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "Oh, hey Gallan! Haven't seen you at Blizzard Peak for awhile!");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "Welcome to Bilzzard Peak kid! Did you come for the boarding?");
active = false;
}
}
}
Instance of Symbol 424 MovieClip in Symbol 453 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Are you one of Magenta's friends too?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "*giggle* You're cute!");
active = false;
}
}
}
Instance of Symbol 426 MovieClip in Symbol 453 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "The caves ahead ice up when it gets cold.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "The caves ahead ice up when it gets cold.");
active = false;
}
}
}
Instance of Symbol 427 MovieClip in Symbol 453 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Goodie! Fresh powder! Time to head to the board park!");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "Cold? What are you talking about?");
active = false;
}
}
}
Instance of Symbol 366 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 452 MovieClip "ground" in Symbol 453 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 460 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 460 MovieClip Frame 20
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 2
stop();
Symbol 464 MovieClip Frame 3
stop();
Symbol 495 MovieClip Frame 1
stop();
Symbol 495 MovieClip Frame 17
gotoAndPlay (2);
Symbol 495 MovieClip Frame 18
stop();
Symbol 495 MovieClip Frame 19
stop();
Symbol 495 MovieClip Frame 20
stop();
Symbol 495 MovieClip Frame 21
shooting = true;
Symbol 495 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 495 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 496 MovieClip Frame 1
stop();
Symbol 496 MovieClip Frame 17
gotoAndPlay (2);
Symbol 496 MovieClip Frame 18
stop();
Symbol 496 MovieClip Frame 19
stop();
Symbol 496 MovieClip Frame 20
stop();
Symbol 496 MovieClip Frame 21
shooting = true;
Symbol 496 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 496 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 497 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 27
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 27
stop();
Symbol 499 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 27
stop();
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 27
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 504 MovieClip Frame 20
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 2
shattering = true;
Symbol 505 MovieClip Frame 14
stop();
deactivate();
Instance of Symbol 416 MovieClip "gallan" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 460 MovieClip in Symbol 526 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 342 MovieClip in Symbol 526 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;
_root.arrowDisplay = _parent.player.arrows;
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 359 MovieClip in Symbol 526 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 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 466 MovieClip "enar2" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 495 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar1" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 496 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 526 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 526 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 361 MovieClip in Symbol 526 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 365 MovieClip "deathEffect" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 526 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 497 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock04;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 498 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock03;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 499 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock02;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 500 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 342 MovieClip in Symbol 526 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;
_root.arrowDisplay = _parent.player.arrows;
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 371 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 526 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 502 MovieClip in Symbol 526 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 504 MovieClip in Symbol 526 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 505 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 509 MovieClip "ballTrigger" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
active = false;
}
vreset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_parent.snowball.activate();
active = true;
}
}
}
Instance of Symbol 511 MovieClip "snowball" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
rollDirection = -1;
maxRoll = 10;
active = false;
grounded = false;
hVelocity = 0;
vVelocity = 0;
tVelocity = 30;
gravity = 4;
this._x = startX;
this._y = startY;
damage = 50;
}
function activate() {
this._x = 3870;
this._y = 1151;
active = true;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if (grounded) {
if ((hVelocity < maxRoll) && (rollDirection == 1)) {
hVelocity = hVelocity + (1 * rollDirection);
}
if (((maxRoll * -1) < hVelocity) && (rollDirection == -1)) {
hVelocity = hVelocity + (1 * rollDirection);
}
}
if (0 < hVelocity) {
this._rotation = this._rotation + 5;
}
if (hVelocity < 0) {
this._rotation = this._rotation - 5;
}
if ((this.hitmask.hitTest(_root.world.player.hitMask) && (active)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x - (350 * rollDirection), 25, true);
this.hVelocity = (this.hVelocity / 2) - 1;
}
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) + vVelocity, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true)) {
}
this._x = this._x + hVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, (newY + (this._height / 2)) + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, (newY + (this._height / 2)) + _parent._y, true)) {
newY--;
}
grounded = true;
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
active = false;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 525 MovieClip "ground" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 2
stop();
Symbol 527 MovieClip Frame 3
stop();
Symbol 527 MovieClip Frame 4
stop();
Symbol 527 MovieClip Frame 24
gotoAndPlay (5);
Symbol 527 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 527 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 527 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 527 MovieClip Frame 31
stop();
Symbol 527 MovieClip Frame 43
gotoAndPlay (32);
Symbol 527 MovieClip Frame 49
gotoAndPlay (44);
Symbol 527 MovieClip Frame 50
stop();
Symbol 527 MovieClip Frame 51
stop();
Symbol 527 MovieClip Frame 52
stop();
Symbol 527 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 527 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 527 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 527 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 527 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 527 MovieClip Frame 70
stop();
Symbol 527 MovieClip Frame 79
gotoAndPlay (71);
Symbol 527 MovieClip Frame 80
doneThrow = false;
Symbol 527 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 527 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 528 MovieClip Frame 1
stop();
Symbol 528 MovieClip Frame 2
stop();
Symbol 528 MovieClip Frame 3
stop();
Symbol 528 MovieClip Frame 4
stop();
Symbol 528 MovieClip Frame 24
gotoAndPlay (5);
Symbol 528 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 528 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 528 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 528 MovieClip Frame 31
stop();
Symbol 528 MovieClip Frame 43
gotoAndPlay (32);
Symbol 528 MovieClip Frame 49
gotoAndPlay (44);
Symbol 528 MovieClip Frame 50
stop();
Symbol 528 MovieClip Frame 51
stop();
Symbol 528 MovieClip Frame 52
stop();
Symbol 528 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 528 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 528 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 528 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 528 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 528 MovieClip Frame 70
stop();
Symbol 528 MovieClip Frame 79
gotoAndPlay (71);
Symbol 528 MovieClip Frame 80
doneThrow = false;
Symbol 528 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 528 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 552 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 2
stop();
Symbol 552 MovieClip Frame 3
stop();
Symbol 552 MovieClip Frame 18
gotoAndPlay (4);
Symbol 552 MovieClip Frame 37
attacking = false;
goFight = false;
Symbol 561 MovieClip Frame 1
stop();
Symbol 561 MovieClip Frame 27
stop();
Symbol 562 MovieClip Frame 1
stop();
Symbol 562 MovieClip Frame 27
stop();
Symbol 563 MovieClip Frame 1
stop();
Symbol 563 MovieClip Frame 27
stop();
Symbol 564 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 27
stop();
Instance of Symbol 527 MovieClip "gallan" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 528 MovieClip "milo" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 344 MovieClip in Symbol 579 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 504 MovieClip in Symbol 579 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 504 MovieClip in Symbol 579 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 552 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 344 MovieClip in Symbol 579 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 554 MovieClip in Symbol 579 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++;
_root.livesDisplay = _parent.player.lives;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 579 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 361 MovieClip in Symbol 579 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 365 MovieClip "deathEffect" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 579 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 555 MovieClip in Symbol 579 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "The board park ahead is experts only.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "The board park ahead is experts only.");
active = false;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 556 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "I haven't seen Magenta for a long time! She must be snuggled down for the winter.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "I haven't seen Magenta for a long time! She must be snuggled down for the winter.");
active = false;
}
}
}
Instance of Symbol 557 MovieClip in Symbol 579 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Magenta doesn't like snowboarding she says it's det-ri-ment-al to her health.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "Magenta doesn't like snowboarding she says it's det-ri-ment-al to her health.");
active = false;
}
}
}
Instance of Symbol 558 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "Strange creatures? Well, no I haven't seen any, have you?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "Strange creatures? Well, no I haven't seen any, have you?");
active = false;
}
}
}
Instance of Symbol 559 MovieClip in Symbol 579 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "Hello again Sir Gallan! Magenta's hut is up ahead, beyond the board park.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "Magenta's hut? It's up ahead, past the board park.");
active = false;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 579 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 502 MovieClip in Symbol 579 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 561 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock08;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 562 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock07;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 563 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock06;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 564 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock05;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 497 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock04;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 498 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock03;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 499 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock02;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 552 MovieClip in Symbol 579 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 500 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 438 MovieClip in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 577 MovieClip "ground" in Symbol 579 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 580 MovieClip Frame 1
stop();
Symbol 580 MovieClip Frame 2
stop();
Symbol 580 MovieClip Frame 3
stop();
Symbol 580 MovieClip Frame 4
stop();
Symbol 580 MovieClip Frame 24
gotoAndPlay (5);
Symbol 580 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 580 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 580 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 580 MovieClip Frame 31
stop();
Symbol 580 MovieClip Frame 43
gotoAndPlay (32);
Symbol 580 MovieClip Frame 49
gotoAndPlay (44);
Symbol 580 MovieClip Frame 50
stop();
Symbol 580 MovieClip Frame 51
stop();
Symbol 580 MovieClip Frame 52
stop();
Symbol 580 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 580 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 580 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 580 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 580 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 580 MovieClip Frame 70
stop();
Symbol 580 MovieClip Frame 79
gotoAndPlay (71);
Symbol 580 MovieClip Frame 80
doneThrow = false;
Symbol 580 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 580 MovieClip Frame 88
stop();
doneThrow = true;
Symbol 581 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 2
stop();
Symbol 581 MovieClip Frame 3
stop();
Symbol 581 MovieClip Frame 4
stop();
Symbol 581 MovieClip Frame 24
gotoAndPlay (5);
Symbol 581 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 581 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 581 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 581 MovieClip Frame 31
stop();
Symbol 581 MovieClip Frame 43
gotoAndPlay (32);
Symbol 581 MovieClip Frame 49
gotoAndPlay (44);
Symbol 581 MovieClip Frame 50
stop();
Symbol 581 MovieClip Frame 51
stop();
Symbol 581 MovieClip Frame 52
stop();
Symbol 581 MovieClip Frame 53
doneAttack = false;
Instance of Symbol 168 MovieClip "attMask" in Symbol 581 MovieClip Frame 53
onClipEvent (load) {
this._visible = false;
}
Symbol 581 MovieClip Frame 60
doneAttack = true;
stop();
Symbol 581 MovieClip Frame 61
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 581 MovieClip Frame 69
stop();
doneShoot = true;
Symbol 581 MovieClip Frame 70
stop();
Symbol 581 MovieClip Frame 79
gotoAndPlay (71);
Symbol 581 MovieClip Frame 80
doneThrow = false;
Symbol 581 MovieClip Frame 83
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 581 MovieClip Frame 88
stop();
doneThrow = true;
Instance of Symbol 401 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 401 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 402 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 403 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
_parent._parent.player.snowboard = false;
_parent._parent.player.groundSlope = 0;
}
}
Instance of Symbol 405 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 3;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 406 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 580 MovieClip "gallan" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 581 MovieClip "milo" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 554 MovieClip in Symbol 586 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++;
_root.livesDisplay = _parent.player.lives;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 338 MovieClip "seed" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 586 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--;
_root.arrowDisplay = _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 345 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 586 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 361 MovieClip in Symbol 586 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 365 MovieClip "deathEffect" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 582 MovieClip in Symbol 586 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)) {
if (_root.selectedPlayer == "GALLAN") {
if (2 < _root.world.player.lives) {
_root.dWindow.open(1, "Wow! Those were some kickin' moves sir!");
active = false;
}
if (_root.world.player.lives < 3) {
_root.dWindow.open(1, "That was um...interesting...why don't you try skiing?");
active = false;
}
}
if (_root.selectedPlayer == "MILO") {
if (2 < _root.world.player.lives) {
_root.dWindow.open(1, "Hey, not bad! I've never seen you before. Are you from the Castle?");
active = false;
}
if (_root.world.player.lives < 3) {
_root.dWindow.open(1, "You should be careful kid. This is not a run for beginners.");
active = false;
}
}
}
}
Instance of Symbol 366 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 586 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 502 MovieClip in Symbol 586 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 501 MovieClip in Symbol 586 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 502 MovieClip in Symbol 586 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 392 MovieClip "sb1" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 371 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 585 MovieClip "ground" in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 401 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 401 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 401 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 398 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 400 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 402 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 399 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = -3;
_parent._parent.player.slideSpeed = 12;
}
}
Instance of Symbol 403 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
_parent._parent.player.snowboard = false;
_parent._parent.player.groundSlope = 0;
}
}
Instance of Symbol 405 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20, true)) {
_parent._parent.player.groundSlope = 3;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 406 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.player._x + _root.world._x, (_parent._parent.player._y + _root.world._y) + 20)) {
_parent._parent.player.groundSlope = 0;
_parent._parent.player.slideSpeed = 0;
}
}
Instance of Symbol 580 MovieClip "gallan" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 581 MovieClip "milo" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 591 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 338 MovieClip "seed" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 591 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--;
_root.arrowDisplay = _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 345 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 591 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 361 MovieClip in Symbol 591 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 365 MovieClip "deathEffect" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 366 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 501 MovieClip in Symbol 591 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 502 MovieClip in Symbol 591 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 501 MovieClip in Symbol 591 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 502 MovieClip in Symbol 591 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 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 371 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 591 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 502 MovieClip in Symbol 591 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 501 MovieClip in Symbol 591 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 502 MovieClip in Symbol 591 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 392 MovieClip "sb1" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 371 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 590 MovieClip "ground" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 594 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 17
gotoAndPlay (2);
Symbol 594 MovieClip Frame 18
stop();
Symbol 594 MovieClip Frame 19
stop();
Symbol 594 MovieClip Frame 20
stop();
Symbol 594 MovieClip Frame 21
shooting = true;
Symbol 594 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 594 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 595 MovieClip Frame 1
stop();
Symbol 595 MovieClip Frame 17
gotoAndPlay (2);
Symbol 595 MovieClip Frame 18
stop();
Symbol 595 MovieClip Frame 19
stop();
Symbol 595 MovieClip Frame 20
stop();
Symbol 595 MovieClip Frame 21
shooting = true;
Symbol 595 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 595 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 596 MovieClip Frame 1
stop();
Symbol 596 MovieClip Frame 17
gotoAndPlay (2);
Symbol 596 MovieClip Frame 18
stop();
Symbol 596 MovieClip Frame 19
stop();
Symbol 596 MovieClip Frame 20
stop();
Symbol 596 MovieClip Frame 21
shooting = true;
Symbol 596 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 596 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 597 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 17
gotoAndPlay (2);
Symbol 597 MovieClip Frame 18
stop();
Symbol 597 MovieClip Frame 19
stop();
Symbol 597 MovieClip Frame 20
stop();
Symbol 597 MovieClip Frame 21
shooting = true;
Symbol 597 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 597 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 598 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 17
gotoAndPlay (2);
Symbol 598 MovieClip Frame 18
stop();
Symbol 598 MovieClip Frame 19
stop();
Symbol 598 MovieClip Frame 20
stop();
Symbol 598 MovieClip Frame 21
shooting = true;
Symbol 598 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 598 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Instance of Symbol 416 MovieClip "gallan" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 466 MovieClip "enar5" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 594 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar5.activateLeft(this._x, this._y);
} else {
_parent.enar5.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 460 MovieClip in Symbol 607 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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 342 MovieClip in Symbol 607 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;
_root.arrowDisplay = _parent.player.arrows;
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 466 MovieClip "enar1" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 595 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 552 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 607 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 504 MovieClip in Symbol 607 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 466 MovieClip "enar4" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 596 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar4.activateLeft(this._x, this._y);
} else {
_parent.enar4.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar3" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 597 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar2" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 598 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 607 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 361 MovieClip in Symbol 607 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 365 MovieClip "deathEffect" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 607 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 606 MovieClip "ground" in Symbol 607 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 504 MovieClip in Symbol 617 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 504 MovieClip in Symbol 617 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 344 MovieClip in Symbol 617 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 466 MovieClip "enar5" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 594 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar5.activateLeft(this._x, this._y);
} else {
_parent.enar5.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 342 MovieClip in Symbol 617 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;
_root.arrowDisplay = _parent.player.arrows;
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 466 MovieClip "enar1" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 595 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 466 MovieClip "enar2" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 598 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 617 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 361 MovieClip in Symbol 617 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 365 MovieClip "deathEffect" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 617 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--;
_root.arrowDisplay = _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 466 MovieClip "enar4" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 596 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar4.activateLeft(this._x, this._y);
} else {
_parent.enar4.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar3" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 597 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 366 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 617 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 371 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 616 MovieClip "ground" in Symbol 617 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 625 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 625 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 625 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 365 MovieClip "deathEffect" in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 625 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 618 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.jukebox.snd.stop();
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(4, "This was Magenta's hut! This must've burned weeks ago! What's going on?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(5, "Magenta's hut!? It's torched! Why would she burn her own hut?");
active = false;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 624 MovieClip "ground" in Symbol 625 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 683 MovieClip Frame 1
stop();
Symbol 683 MovieClip Frame 9
gotoAndPlay(jump);
Symbol 683 MovieClip Frame 29
attacking = false;
goFight = false;
Symbol 683 MovieClip Frame 44
gotoAndPlay (30);
Symbol 683 MovieClip Frame 46
stop();
Symbol 684 MovieClip Frame 1
stop();
Symbol 684 MovieClip Frame 9
gotoAndPlay(jump);
Symbol 684 MovieClip Frame 29
attacking = false;
goFight = false;
Symbol 684 MovieClip Frame 44
gotoAndPlay (30);
Symbol 684 MovieClip Frame 46
stop();
Symbol 690 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 27
stop();
Instance of Symbol 416 MovieClip "gallan" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 683 MovieClip "g2" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
lockMe = true;
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 300;
maxHp = hp;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
attackMax = 2;
attackCount = 0;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 83;
goFight = false;
voiceRatio = 0.5;
dead = false;
_root.bossGage.barA._xscale = (hp / maxHp) * 100;
}
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();
}
_root.bossGage.barA._xscale = (hp / maxHp) * 100;
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
function jump() {
this.grounded = false;
this.vVelocity = -40;
this.hVelocity = (30 * (this._xscale / 100)) * -1;
flip.start();
}
slash = new Sound(this);
slash.attachSound("slash2");
g = new Sound(this);
g.attachSound("goatHit");
flip = new Sound(this);
flip.attachSound("goatFlip");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (lockMe == false) {
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) {
if (grounded) {
hVelocity = speed * -1;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
if (grounded) {
hVelocity = speed;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
attackCount++;
goFight = true;
if (Math.random() < voiceRatio) {
g.start();
}
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
if (attackCount == attackMax) {
jump();
attackCount = 0;
}
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.attackMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
}
}
if (this.hitMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 684 MovieClip "g1" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
lockMe = true;
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 300;
maxHp = hp;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
attackMax = 2;
attackCount = 0;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 60;
waitDelay = 80;
goFight = false;
voiceRatio = 0.5;
dead = false;
_root.bossGage.barB._xscale = (hp / maxHp) * 100;
}
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();
}
_root.bossGage.barB._xscale = (hp / maxHp) * 100;
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
function jump() {
this.grounded = false;
this.vVelocity = -40;
this.hVelocity = (30 * (this._xscale / 100)) * -1;
flip.start();
}
slash = new Sound(this);
slash.attachSound("slash2");
g = new Sound(this);
g.attachSound("goatHit");
flip = new Sound(this);
flip.attachSound("goatFlip");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (lockMe == false) {
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) {
if (grounded) {
hVelocity = speed * -1;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
if (grounded) {
hVelocity = speed;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
attackCount++;
goFight = true;
if (Math.random() < voiceRatio) {
g.start();
}
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
if (attackCount == attackMax) {
jump();
attackCount = 0;
}
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.attackMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
}
}
if (this.hitMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 697 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 365 MovieClip "deathEffect" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 697 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--;
_root.arrowDisplay = _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 691 MovieClip "endBlock" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = true;
msgID = 0;
_root.egStart = false;
tally = false;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 5000;
scorePlay = false;
deathWait = 0;
deathWaitMax = 30;
}
vReset();
_root.attackOK = false;
}
onClipEvent (enterFrame) {
if (_parent.g1.dead && (_parent.g2.dead)) {
deathWait++;
if (deathWait == deathWaitMax) {
tally = true;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
}
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;
}
if (_root.fader.resetFlag) {
vReset();
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.attackOK == true) {
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
_root.jukebox.gotoAndPlay(2);
active = false;
}
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.attackOK == false) {
if (_root.selectedPlayer == "GALLAN") {
if (msgID == 0) {
_root.dWindow.open(7, "A bit late, aren't we Gallan? I was expecting you AGES ago old boy! Terribly bad manners...");
_root.egstart = true;
msgID = 1;
}
if ((msgID == 1) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "Sir Snargil!? What are you doing here? Where's Magenta?");
msgID = 2;
}
if ((msgID == 2) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "She's taking a little resort vacation, courtesy of yours truly...");
msgID = 3;
}
if ((msgID == 3) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "That's Magneta's Magic Book! What's going on here Snargil?");
msgID = 4;
}
if ((msgID == 4) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Oh my dear Gallan, haven't you figured it out? I sent the dragon! I stirred up the woods...");
msgID = 5;
}
if ((msgID == 5) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "And this is just the beginning! MWA HA HA HA HA HA!!!");
msgID = 6;
}
if ((msgID == 6) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "What? Maniacal laughter!? You can't do this! You were a Knight of Serenity! Like me!");
msgID = 7;
}
if ((msgID == 7) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Yes Gallan, like you...I'm your SHADOW!");
msgID = 8;
}
if ((msgID == 8) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "...that is SO overdone...");
msgID = 9;
}
if ((msgID == 9) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Worth a try anyway...now if you'll excuse me...I've a kingdom to take over!");
msgID = 10;
}
if ((msgID == 10) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "I don't suppose we're going to fight before you go?");
msgID = 11;
}
if ((msgID == 11) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Of course not. That is what henchmen and teleportation are for. Hodge! Podge! Take him!");
msgID = 12;
}
if ((msgID == 12) && (_root.dWindow.goNext)) {
msgID = 13;
_parent.snargil.gotoAndPlay(2);
active = false;
_root.attackOK = true;
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
}
}
if (_root.selectedPlayer == "MILO") {
if (msgID == 0) {
_root.dWindow.open(7, "Well if it isn't Jr.! Gallan got your running errands for him?");
_root.egstart = true;
msgID = 1;
}
if ((msgID == 1) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Huh? Who are you?");
msgID = 2;
}
if ((msgID == 2) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "You're probably too young to remember kid. It was before your time. I am Sir Snargil.");
msgID = 3;
}
if ((msgID == 3) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Gallan told me about you. You and King Oblig used to be knights.");
msgID = 4;
}
if ((msgID == 4) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Yes, My old friend King Oblig is going to be stepping down I'm afraid...");
msgID = 5;
}
if ((msgID == 5) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "What are you talking about?");
msgID = 6;
}
if ((msgID == 6) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Revenge boy! With Magenta's Magic Book the Kingdom of Serenity will be mine!");
msgID = 7;
}
if ((msgID == 7) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "So YOU'RE the one behind this! It wasn't Magenta at all!");
msgID = 8;
}
if ((msgID == 8) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Brilliant! Looks like you figured it out, but too late I'm afraid.");
msgID = 9;
}
if ((msgID == 9) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Come on Snargil! I'll take you on right now!");
msgID = 10;
}
if ((msgID == 10) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Obviously you're new at this. You're no match for me son. You're not even a knight yet.");
msgID = 11;
}
if ((msgID == 11) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Besides, you don't get a crack at me until you defeat a half-dozen or so of my henchmen.");
msgID = 12;
}
if ((msgID == 12) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Hodge! Podge! Let's show our little friend how difficult becoming a knight can be!");
msgID = 13;
}
if ((msgID == 13) && (_root.dWindow.goNext)) {
msgID = 14;
_parent.snargil.gotoAndPlay(2);
active = false;
_root.attackOK = true;
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
}
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 696 MovieClip "ground" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 683 MovieClip "g2" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
lockMe = true;
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 300;
maxHp = hp;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
attackMax = 2;
attackCount = 0;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 83;
goFight = false;
voiceRatio = 0.5;
dead = false;
_root.bossGage.barA._xscale = (hp / maxHp) * 100;
}
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();
}
_root.bossGage.barA._xscale = (hp / maxHp) * 100;
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
function jump() {
this.grounded = false;
this.vVelocity = -40;
this.hVelocity = (30 * (this._xscale / 100)) * -1;
flip.start();
}
slash = new Sound(this);
slash.attachSound("slash2");
g = new Sound(this);
g.attachSound("goatHit");
flip = new Sound(this);
flip.attachSound("goatFlip");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (lockMe == false) {
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) {
if (grounded) {
hVelocity = speed * -1;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
if (grounded) {
hVelocity = speed;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
attackCount++;
goFight = true;
if (Math.random() < voiceRatio) {
g.start();
}
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
if (attackCount == attackMax) {
jump();
attackCount = 0;
}
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.attackMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
}
}
if (this.hitMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 684 MovieClip "g1" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
lockMe = true;
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 300;
maxHp = hp;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
attackMax = 2;
attackCount = 0;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 60;
waitDelay = 80;
goFight = false;
voiceRatio = 0.5;
dead = false;
_root.bossGage.barB._xscale = (hp / maxHp) * 100;
}
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();
}
_root.bossGage.barB._xscale = (hp / maxHp) * 100;
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
function jump() {
this.grounded = false;
this.vVelocity = -40;
this.hVelocity = (30 * (this._xscale / 100)) * -1;
flip.start();
}
slash = new Sound(this);
slash.attachSound("slash2");
g = new Sound(this);
g.attachSound("goatHit");
flip = new Sound(this);
flip.attachSound("goatFlip");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (lockMe == false) {
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) {
if (grounded) {
hVelocity = speed * -1;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
if (grounded) {
hVelocity = speed;
}
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
if (grounded) {
hVelocity = 0;
}
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
attackCount++;
goFight = true;
if (Math.random() < voiceRatio) {
g.start();
}
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
if (attackCount == attackMax) {
jump();
attackCount = 0;
}
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.attackMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
}
}
if (this.hitMask.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 699 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 365 MovieClip "deathEffect" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 699 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--;
_root.arrowDisplay = _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 691 MovieClip "endBlock" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = true;
msgID = 0;
_root.egStart = false;
tally = false;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 5000;
scorePlay = false;
deathWait = 0;
deathWaitMax = 30;
}
vReset();
_root.attackOK = false;
}
onClipEvent (enterFrame) {
if (_parent.g1.dead && (_parent.g2.dead)) {
deathWait++;
if (deathWait == deathWaitMax) {
tally = true;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
}
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;
}
if (_root.fader.resetFlag) {
vReset();
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.attackOK == true) {
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
_root.jukebox.gotoAndPlay(2);
active = false;
}
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.attackOK == false) {
if (_root.selectedPlayer == "GALLAN") {
if (msgID == 0) {
_root.dWindow.open(7, "A bit late, aren't we Gallan? I was expecting you AGES ago old boy! Terribly bad manners...");
_root.egstart = true;
msgID = 1;
}
if ((msgID == 1) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "Sir Snargil!? What are you doing here? Where's Magenta?");
msgID = 2;
}
if ((msgID == 2) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "She's taking a little resort vacation, courtesy of yours truly...");
msgID = 3;
}
if ((msgID == 3) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "That's Magneta's Magic Book! What's going on here Snargil?");
msgID = 4;
}
if ((msgID == 4) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Oh my dear Gallan, haven't you figured it out? I sent the dragon! I stirred up the woods...");
msgID = 5;
}
if ((msgID == 5) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "And this is just the beginning! MWA HA HA HA HA HA!!!");
msgID = 6;
}
if ((msgID == 6) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "What? Maniacal laughter!? You can't do this! You were a Knight of Serenity! Like me!");
msgID = 7;
}
if ((msgID == 7) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Yes Gallan, like you...I'm your SHADOW!");
msgID = 8;
}
if ((msgID == 8) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "...that is SO overdone...");
msgID = 9;
}
if ((msgID == 9) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Worth a try anyway...now if you'll excuse me...I've a kingdom to take over!");
msgID = 10;
}
if ((msgID == 10) && (_root.dWindow.goNext)) {
_root.dWindow.open(4, "I don't suppose we're going to fight before you go?");
msgID = 11;
}
if ((msgID == 11) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Of course not. That is what henchmen and teleportation are for. Hodge! Podge! Take him!");
msgID = 12;
}
if ((msgID == 12) && (_root.dWindow.goNext)) {
msgID = 13;
_parent.snargil.gotoAndPlay(2);
active = false;
_root.attackOK = true;
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
}
}
if (_root.selectedPlayer == "MILO") {
if (msgID == 0) {
_root.dWindow.open(7, "Well if it isn't Jr.! Gallan got your running errands for him?");
_root.egstart = true;
msgID = 1;
}
if ((msgID == 1) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Huh? Who are you?");
msgID = 2;
}
if ((msgID == 2) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "You're probably too young to remember kid. It was before your time. I am Sir Snargil.");
msgID = 3;
}
if ((msgID == 3) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Gallan told me about you. You and King Oblig used to be knights.");
msgID = 4;
}
if ((msgID == 4) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Yes, My old friend King Oblig is going to be stepping down I'm afraid...");
msgID = 5;
}
if ((msgID == 5) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "What are you talking about?");
msgID = 6;
}
if ((msgID == 6) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Revenge boy! With Magenta's Magic Book the Kingdom of Serenity will be mine!");
msgID = 7;
}
if ((msgID == 7) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "So YOU'RE the one behind this! It wasn't Magenta at all!");
msgID = 8;
}
if ((msgID == 8) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Brilliant! Looks like you figured it out, but too late I'm afraid.");
msgID = 9;
}
if ((msgID == 9) && (_root.dWindow.goNext)) {
_root.dWindow.open(5, "Come on Snargil! I'll take you on right now!");
msgID = 10;
}
if ((msgID == 10) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Obviously you're new at this. You're no match for me son. You're not even a knight yet.");
msgID = 11;
}
if ((msgID == 11) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Besides, you don't get a crack at me until you defeat a half-dozen or so of my henchmen.");
msgID = 12;
}
if ((msgID == 12) && (_root.dWindow.goNext)) {
_root.dWindow.open(7, "Hodge! Podge! Let's show our little friend how difficult becoming a knight can be!");
msgID = 13;
}
if ((msgID == 13) && (_root.dWindow.goNext)) {
msgID = 14;
_parent.snargil.gotoAndPlay(2);
active = false;
_root.attackOK = true;
_parent.g1.lockMe = false;
_parent.g2.lockMe = false;
_root.bossGage._visible = true;
}
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 696 MovieClip "ground" in Symbol 699 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 700 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 700 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 700 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 365 MovieClip "deathEffect" in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 700 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 618 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.jukebox.snd.stop();
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(4, "This was Magenta's hut! This must've burned weeks ago! What's going on?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(5, "Magenta's hut!? It's torched! Why would she burn her own hut?");
active = false;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 624 MovieClip "ground" in Symbol 700 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 504 MovieClip in Symbol 701 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 504 MovieClip in Symbol 701 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 344 MovieClip in Symbol 701 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 466 MovieClip "enar5" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 594 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar5.activateLeft(this._x, this._y);
} else {
_parent.enar5.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 342 MovieClip in Symbol 701 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;
_root.arrowDisplay = _parent.player.arrows;
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 466 MovieClip "enar1" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 595 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 466 MovieClip "enar2" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 598 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 701 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 361 MovieClip in Symbol 701 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 365 MovieClip "deathEffect" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 701 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--;
_root.arrowDisplay = _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 466 MovieClip "enar4" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 596 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar4.activateLeft(this._x, this._y);
} else {
_parent.enar4.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar3" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 597 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 366 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 701 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 371 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 616 MovieClip "ground" in Symbol 701 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 466 MovieClip "enar5" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 594 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar5.activateLeft(this._x, this._y);
} else {
_parent.enar5.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 460 MovieClip in Symbol 702 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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 342 MovieClip in Symbol 702 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;
_root.arrowDisplay = _parent.player.arrows;
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 466 MovieClip "enar1" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 595 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 552 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 702 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 504 MovieClip in Symbol 702 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 466 MovieClip "enar4" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 596 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar4.activateLeft(this._x, this._y);
} else {
_parent.enar4.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar3" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 597 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar2" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 598 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 702 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 361 MovieClip in Symbol 702 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 365 MovieClip "deathEffect" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 702 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 606 MovieClip "ground" in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 580 MovieClip "gallan" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 581 MovieClip "milo" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 703 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 338 MovieClip "seed" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 703 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--;
_root.arrowDisplay = _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 345 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 703 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 361 MovieClip in Symbol 703 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 365 MovieClip "deathEffect" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 366 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 501 MovieClip in Symbol 703 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 502 MovieClip in Symbol 703 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 501 MovieClip in Symbol 703 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 502 MovieClip in Symbol 703 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 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 371 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 703 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 502 MovieClip in Symbol 703 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 501 MovieClip in Symbol 703 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 502 MovieClip in Symbol 703 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 392 MovieClip "sb1" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 371 MovieClip in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 590 MovieClip "ground" in Symbol 703 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 238 MovieClip "gallan" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 336 MovieClip "milo" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 338 MovieClip "seed" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 704 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--;
_root.arrowDisplay = _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 342 MovieClip in Symbol 704 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;
_root.arrowDisplay = _parent.player.arrows;
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 344 MovieClip in Symbol 704 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 345 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 704 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 361 MovieClip in Symbol 704 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 365 MovieClip "deathEffect" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 366 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 386 MovieClip in Symbol 704 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(6, "This is the bunny hill. Thanks for saving Kenora by the way...");
active = false;
}
}
Instance of Symbol 371 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 392 MovieClip "sb1" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 407 MovieClip "ground" in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 527 MovieClip "gallan" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 528 MovieClip "milo" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = startX;
this._y = startY;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 552 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 344 MovieClip in Symbol 705 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 504 MovieClip in Symbol 705 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 504 MovieClip in Symbol 705 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 552 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 344 MovieClip in Symbol 705 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 554 MovieClip in Symbol 705 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++;
_root.livesDisplay = _parent.player.lives;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 705 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 361 MovieClip in Symbol 705 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 365 MovieClip "deathEffect" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 705 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 555 MovieClip in Symbol 705 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "The board park ahead is experts only.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "The board park ahead is experts only.");
active = false;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 556 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "I haven't seen Magenta for a long time! She must be snuggled down for the winter.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "I haven't seen Magenta for a long time! She must be snuggled down for the winter.");
active = false;
}
}
}
Instance of Symbol 557 MovieClip in Symbol 705 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Magenta doesn't like snowboarding she says it's det-ri-ment-al to her health.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "Magenta doesn't like snowboarding she says it's det-ri-ment-al to her health.");
active = false;
}
}
}
Instance of Symbol 558 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "Strange creatures? Well, no I haven't seen any, have you?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "Strange creatures? Well, no I haven't seen any, have you?");
active = false;
}
}
}
Instance of Symbol 559 MovieClip in Symbol 705 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "Hello again Sir Gallan! Magenta's hut is up ahead, beyond the board park.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "Magenta's hut? It's up ahead, past the board park.");
active = false;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 705 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 502 MovieClip in Symbol 705 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 561 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock08;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 562 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock07;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 563 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock06;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 564 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock05;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 497 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock04;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 498 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock03;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 499 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock02;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 552 MovieClip in Symbol 705 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 500 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 438 MovieClip in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 577 MovieClip "ground" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 460 MovieClip in Symbol 706 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 342 MovieClip in Symbol 706 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;
_root.arrowDisplay = _parent.player.arrows;
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 359 MovieClip in Symbol 706 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 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 466 MovieClip "enar2" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 495 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 466 MovieClip "enar1" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
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();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= 800) {
deactivate();
}
}
}
}
Instance of Symbol 496 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
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 + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if ((Math.abs(_parent.player._x - this._x) < 600) && (Math.abs(_parent.player._y - this._y) < 500)) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, 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 (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 (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 464 MovieClip in Symbol 706 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) && (Math.abs(_parent.player._y - this._y) < 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 (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _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 418 MovieClip "seed" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 706 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 361 MovieClip in Symbol 706 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 365 MovieClip "deathEffect" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 706 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--;
_root.arrowDisplay = _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 366 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 497 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock04;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 498 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock03;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 499 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock02;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 500 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tBlk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
if (this.hitTest(_parent.seed)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
tBlk._yscale = 0;
}
}
Instance of Symbol 342 MovieClip in Symbol 706 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;
_root.arrowDisplay = _parent.player.arrows;
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 371 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 706 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 502 MovieClip in Symbol 706 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 504 MovieClip in Symbol 706 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 505 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 505 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if ((Math.abs(_root.world.player._x - this._x) < activationRange) && (_parent.ballTrigger.active)) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 509 MovieClip "ballTrigger" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
active = false;
}
vreset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_parent.snowball.activate();
active = true;
}
}
}
Instance of Symbol 511 MovieClip "snowball" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
rollDirection = -1;
maxRoll = 10;
active = false;
grounded = false;
hVelocity = 0;
vVelocity = 0;
tVelocity = 30;
gravity = 4;
this._x = startX;
this._y = startY;
damage = 50;
}
function activate() {
this._x = 3870;
this._y = 1151;
active = true;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if (grounded) {
if ((hVelocity < maxRoll) && (rollDirection == 1)) {
hVelocity = hVelocity + (1 * rollDirection);
}
if (((maxRoll * -1) < hVelocity) && (rollDirection == -1)) {
hVelocity = hVelocity + (1 * rollDirection);
}
}
if (0 < hVelocity) {
this._rotation = this._rotation + 5;
}
if (hVelocity < 0) {
this._rotation = this._rotation - 5;
}
if ((this.hitmask.hitTest(_root.world.player.hitMask) && (active)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x - (350 * rollDirection), 25, true);
this.hVelocity = (this.hVelocity / 2) - 1;
}
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) + vVelocity, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true)) {
}
this._x = this._x + hVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, (newY + (this._height / 2)) + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, (newY + (this._height / 2)) + _parent._y, true)) {
newY--;
}
grounded = true;
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
active = false;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 438 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 525 MovieClip "ground" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 416 MovieClip "gallan" in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 417 MovieClip "milo" in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bombs = 0;
_root.bombDisplay = bombs;
bow._visible = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = startX;
_parent.player._y = startY;
this._x = -452;
this._y = -638;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
_root.livesDisplay = lives;
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 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 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 344 MovieClip in Symbol 707 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.bombs = _parent.player.bombs + 3;
_root.bombDisplay = _parent.player.bombs;
s.start();
_parent.player.doneThrow = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 418 MovieClip "seed" in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 359 MovieClip in Symbol 707 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 361 MovieClip in Symbol 707 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 365 MovieClip "deathEffect" in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 707 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--;
_root.arrowDisplay = _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 422 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this) && (active)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(3, "Oh, hey Gallan! Haven't seen you at Blizzard Peak for awhile!");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(3, "Welcome to Bilzzard Peak kid! Did you come for the boarding?");
active = false;
}
}
}
Instance of Symbol 424 MovieClip in Symbol 707 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Are you one of Magenta's friends too?");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "*giggle* You're cute!");
active = false;
}
}
}
Instance of Symbol 426 MovieClip in Symbol 707 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(1, "The caves ahead ice up when it gets cold.");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(1, "The caves ahead ice up when it gets cold.");
active = false;
}
}
}
Instance of Symbol 427 MovieClip in Symbol 707 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)) {
if (_root.selectedPlayer == "GALLAN") {
_root.dWindow.open(2, "Goodie! Fresh powder! Time to head to the board park!");
active = false;
}
if (_root.selectedPlayer == "MILO") {
_root.dWindow.open(2, "Cold? What are you talking about?");
active = false;
}
}
}
Instance of Symbol 366 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 371 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 438 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
active = false;
activationRange = 150;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
damage = 20;
shattering = false;
this.gotoAndStop(1);
this._x = startX;
this._y = startY;
}
function deactivate() {
this._x = 0;
this._y = _root.world.safeY;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (Math.abs(_root.world.player._x - this._x) < activationRange) {
active = true;
}
if (_root.fader.resetFlag) {
vReset();
}
if (active) {
if ((this.hitTest(_root.world.player.hitMask) && (shattering == false)) && (_root.world.player.wincing == false)) {
_root.world.player.getHit(damage, this._x, 14, true);
}
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
if (!shattering) {
this.gotoAndPlay("break");
}
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 440 MovieClip in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
tblk._yscale = tbos;
this.gotoAndStop(1);
this._xscale = xReset;
}
tBlk = _parent.ground.cblock01;
tbos = tBlk._yscale;
xReset = this._xscale;
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.attMask)) {
if (this._x < _root.world.player._x) {
this._xscale = -100;
}
this.gotoAndPlay("break");
_parent.ground.cblock01._yscale = 0;
}
}
Instance of Symbol 452 MovieClip "ground" in Symbol 707 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 580 MovieClip "gallan" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 581 MovieClip "milo" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
this._visible = false;
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
bombs = _root.bombPass;
lives = _root.lifePass;
_root.livesDisplay = lives;
_root.arrowDisplay = arrows;
_root.bombDisplay = bombs;
score = _root.scorePass;
prevScore = score;
snowboard = false;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function vReset() {
this._visible = false;
arrows = 0;
_root.arrowDisplay = arrows;
bow._visible = false;
bombs = 0;
_root.bombDisplay = bombs;
snowboard = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = true;
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;
groundSlope = 0;
slideSpeed = 0;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
_parent.player._visible = true;
_parent.player.actionLock = false;
_parent.player._x = -101;
_parent.player._y = -508;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
groundSlope = 0;
if (damageWas != 9) {
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--;
_root.livesDisplay = lives;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
if (_root.selectedPlayer == "GALLAN") {
u.attachSound("urg");
}
if (_root.selectedPlayer == "MILO") {
u.attachSound("ow");
}
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
_root.livesDisplay = lives;
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)) {
if (snowboard == false) {
_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(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (snowboard) {
pose = "boardRun";
if (Key.isDown(Key.RIGHT)) {
pose = "boardSprint";
}
if (Key.isDown(Key.LEFT)) {
pose = "boardCarve";
}
if ((grounded == false) && (vVelocity < 4)) {
pose = "boardJumpUp";
}
if ((grounded == false) && (4 < vVelocity)) {
pose = "boardJumpDown";
}
if ((countAttack == 1) || (doneAttack == false)) {
if (grounded == false) {
pose = "boardBackFlip";
}
}
} else 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) && (grounded == false)) {
pose = "jumpUp";
}
if ((0 < vVelocity) && (grounded == false)) {
pose = "jumpDown";
}
if (0 < bombs) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
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 (snowBoard) {
if (((maxRun / 2) * -1) < hVelocity) {
hVelocity--;
}
} else 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;
groundSlope = 0;
}
}
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;
}
}
if (grounded) {
if (groundSlope != 0) {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
_root.world._y = _root.world._y + (-1 * vVelocity);
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if ((_parent.ground.hitTest(newX + _parent._x, ((this._y + _parent._y) + 3) + vVelocity, true) == false) && (groundSlope == 0)) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + vVelocity, true) && (groundSlope == 0)) {
hVelocity = 0;
}
this._x = this._x + (hVelocity + slideSpeed);
_root.world._x = _root.world._x + ((hVelocity + slideSpeed) * -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;
if (groundSlope == 0) {
vVelocity = 0;
} else {
vVelocity = -1 * ((hVelocity + slideSpeed) / groundSlope);
}
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (300 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 25;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 554 MovieClip in Symbol 708 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++;
_root.livesDisplay = _parent.player.lives;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 338 MovieClip "seed" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = -100;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
this._xscale = 100;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.bombs = _parent.player.bombs - 1;
_root.bombDisplay = _parent.player.bombs;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
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, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (_root.world.safeY < this._y) {
deactivate();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 340 MovieClip "arrow1" in Symbol 708 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--;
_root.arrowDisplay = _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 345 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.sb2._visible = true;
_parent.player.snowboard = false;
_parent.sb1.s.stop("snowSlide");
}
}
Instance of Symbol 346 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
_parent.player.snowBoard = true;
}
sb1._visible = false;
}
Instance of Symbol 359 MovieClip in Symbol 708 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 361 MovieClip in Symbol 708 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 365 MovieClip "deathEffect" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 582 MovieClip in Symbol 708 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)) {
if (_root.selectedPlayer == "GALLAN") {
if (2 < _root.world.player.lives) {
_root.dWindow.open(1, "Wow! Those were some kickin' moves sir!");
active = false;
}
if (_root.world.player.lives < 3) {
_root.dWindow.open(1, "That was um...interesting...why don't you try skiing?");
active = false;
}
}
if (_root.selectedPlayer == "MILO") {
if (2 < _root.world.player.lives) {
_root.dWindow.open(1, "Hey, not bad! I've never seen you before. Are you from the Castle?");
active = false;
}
if (_root.world.player.lives < 3) {
_root.dWindow.open(1, "You should be careful kid. This is not a run for beginners.");
active = false;
}
}
}
}
Instance of Symbol 366 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 371 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 501 MovieClip in Symbol 708 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 502 MovieClip in Symbol 708 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 501 MovieClip in Symbol 708 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 502 MovieClip in Symbol 708 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 392 MovieClip "sb1" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = true;
s.setVolume(0);
s.start(0, 99);
}
s = new Sound(this);
s.attachSound("snowSlide");
vReset();
}
onClipEvent (enterFrame) {
if (_parent.player.grounded && (_parent.player.snowboard)) {
s.setVolume(100);
} else {
s.setVolume(0);
}
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = false;
}
}
Instance of Symbol 394 MovieClip "sb2" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._visible = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player.hitMask)) {
this._visible = true;
}
}
Instance of Symbol 371 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.bombPass = _parent.player.bombs;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 585 MovieClip "ground" in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}