Frame 1
play();
onEnterFrame = function () {
_root.hero.activated = true;
};
Frame 2
_quality = "LOW";
stop();
Instance of Symbol 2 MovieClip in Frame 2
onClipEvent (enterFrame) {
this._x = _root.vcam._x;
}
Instance of Symbol 6 MovieClip "deadZone" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 44 MovieClip in Frame 2
onClipEvent (load) {
_xscale = -100;
var life = 100;
var xSpeed = 0;
var moveSpeed = 1.5;
var grav = 0;
var eyeSight = 500;
var xdist = 0;
var ydist = 0;
var jumpHeight = 4;
var deathBounce = true;
var onGround = false;
var hurt = false;
var dead = false;
}
Instance of Symbol 183 MovieClip "hero" in Frame 2
onClipEvent (load) {
var xSpeed = 0;
var maxMoveSpeed = 5;
var maxAirMoveSpeed = 5;
var grav = 0;
var jump = 8;
var jumpAnimThres = 0;
var stopSliding = 10;
var shortHop = 0;
var pressingAttack = false;
var life = 10;
var activated = false;
Left = 37;
Right = 39;
Jump = 38;
Down = 40;
Punch = 65;
var onGround = false;
var onLeftWall = false;
var onRightWall = false;
var skiding = false;
var hurt = false;
var walling = false;
var fighting = false;
}
Instance of Symbol 184 MovieClip "leveluptext" in Frame 2
onClipEvent (enterFrame) {
this._x = _root.hero._x;
this._y = _root.hero._y;
}
Instance of Symbol 186 MovieClip "spawnPoint" in Frame 2
onClipEvent (load) {
_visible = false;
_root.hero._x = this._x;
_root.hero._y = this._y;
}
Instance of Symbol 187 MovieClip "lScroll" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 189 MovieClip "rScroll" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 200 MovieClip "bar" in Frame 2
onClipEvent (enterFrame) {
this._x = _root.vcam._x;
this._y = _root.vcam._y;
}
Instance of Symbol 202 MovieClip "vcam" in Frame 2
onClipEvent (load) {
_xscale = 50;
_yscale = 50;
var moveSpeed = 0;
var onHero = true;
}
onClipEvent (enterFrame) {
while ((this._x - (_width / 2)) < _root.lScroll._x) {
_x = (_x+1);
_x = (_x+1);
}
while ((this._x + (_width / 2)) > _root.rScroll._x) {
_x = (_x-1);
_x = (_x-1);
}
if (onHero == true) {
moveSpeed = (this._x = this._x + ((_root.hero._x - _x) / 4));
}
this._y = this._y + (((_root.hero._y - _y) / 2) - 20);
if (_root.hero.onGround == false) {
if (_root.hero.grav > 0) {
if (_xscale < 100) {
_xscale = _xscale;
_yscale = _yscale;
}
}
if (_root.hero.grav < 0) {
if (_xscale > 100) {
_xscale = (_xscale-1);
_xscale = (_xscale-1);
_yscale = (_yscale-1);
_yscale = (_yscale-1);
}
}
} else if (_xscale > 100) {
_xscale = (_xscale-1);
_xscale = (_xscale-1);
_yscale = (_yscale-1);
_yscale = (_yscale-1);
}
_root.BG._x = this._x;
_root.BG._y = this._y;
_root.BG._xscale = this._xscale;
_root.BG._yscale = this._yscale;
_root.hud._x = this._x;
_root.hud._y = this._y;
_root.hud._xscale = this._xscale;
_root.hud._yscale = this._yscale;
}
Symbol 22 MovieClip Frame 31
stop();
_root.hud.fader.gotoAndPlay("dead");
stopAllSounds();
Symbol 23 MovieClip Frame 2
_root.bar.xpbar.xp = _root.bar.xpbar.xp + 10;
Symbol 23 MovieClip Frame 11
_parent.gotoAndStop(1);
Symbol 23 MovieClip Frame 13
_root.bar.xpbar.xp = _root.bar.xpbar.xp + 10;
Symbol 23 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 28 MovieClip Frame 1
_visible = false;
Symbol 43 MovieClip Frame 26
_parent.gotoAndStop(1);
Symbol 44 MovieClip Frame 1
stop();
onEnterFrame = function () {
grav = grav - 0.5;
this._y = this._y - grav;
if (!dead) {
if (_root.ground.hitTest(_x, _y + 1, true)) {
onGround = true;
} else {
onGround = false;
}
while (_root.ground.hitTest(_x, _y, true)) {
grav = 0;
_y = (_y-1);
_y = (_y-1);
}
while (_root.ground.hitTest(_x - 20, _y - (_height / 2), true)) {
_x = (_x + moveSpeed);
}
while (_root.ground.hitTest(_x + 20, _y - (_height / 2), true)) {
_x = (_x - moveSpeed);
}
while (_root.ground.hitTest(_x, _y - _height, true)) {
_y = (_y+1);
_y = (_y+1);
grav = -4;
}
}
xdist = _root.hero._x - this._x;
ydist = _root.hero._y - this._y;
if (xdist > 0) {
_xscale = 100;
}
if (xdist < 0) {
_xscale = -100;
}
if (!dead) {
if (!hurt) {
if (this.hitTest(_root.hero) == false) {
if ((ydist < eyeSight) && ((-ydist) > (-eyeSight))) {
if ((xdist > (-eyeSight)) && (_xscale == -100)) {
_x = (_x - moveSpeed);
if (this._currentframe == 1) {
}
}
if ((xdist < eyeSight) && (_xscale == 100)) {
_x = (_x + moveSpeed);
if (this._currentframe == 1) {
}
}
}
}
}
}
if (xSpeed > 0) {
_x = (_x + xSpeed);
if (onGround) {
xSpeed = xSpeed - 0.5;
} else {
xSpeed = xSpeed - 0.05;
}
}
if (xSpeed < 0) {
_x = (_x + xSpeed);
if (onGround) {
xSpeed = xSpeed + 0.5;
} else {
xSpeed = xSpeed + 0.05;
}
}
if (!dead) {
if (!hurt) {
if (onGround) {
if (_root.ground.hitTest(_x + 21, _y, true) && (_xscale == 100)) {
this.grav = jumpHeight;
}
if (_root.ground.hitTest(_x - 21, _y, true) && (_xscale == 100)) {
this.grav = jumpHeight;
}
}
if (onGround) {
if ((_root.ground.hitTest(_x + 20, _y + 100, true) == false) && (_xscale == 100)) {
this.grav = jumpHeight * 2;
xSpeed = 4;
}
if ((_root.ground.hitTest(_x - 20, _y + 100, true) == false) && (_xscale == -100)) {
this.grav = jumpHeight * 2;
xSpeed = -4;
}
}
}
}
if (this._currentframe == 2) {
hurt = true;
} else {
hurt = false;
}
if (this.hitTest(_root.hero.attack.hit1)) {
life = life - 1;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt1");
_root.hero.attack.hitEffect.gotoAndStop(2);
_root.hero.attack.hitEffect.hit1.gotoAndPlay(1);
if (_root.hero._xscale == 100) {
this.xSpeed = _root.hero.xSpeed + 1;
}
if (_root.hero._xscale == -100) {
this.xSpeed = _root.hero.xSpeed - 1;
}
if (!onGround) {
grav = grav - 2;
_root.hud.score = _root.hud.score + 3;
} else {
_root.hud.score = _root.hud.score + 1;
}
}
if (this.hitTest(_root.hero.attack.hit2)) {
life = life - 2;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt1");
this.grav = 3;
_root.hero.attack.hitEffect.gotoAndStop(3);
if (_root.hero._xscale == 100) {
this.xSpeed = _root.hero.xSpeed + 1.5;
}
if (_root.hero._xscale == -100) {
this.xSpeed = _root.hero.xSpeed - 1.5;
}
if (!onGround) {
_root.hud.score = _root.hud.score + 4;
} else {
_root.hud.score = _root.hud.score + 2;
}
}
if (this.hitTest(_root.hero.attack.hit3)) {
_root.hero.attack.hitEffect.gotoAndStop(4);
life = life - 3;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt3");
this.grav = 4;
if (_root.hero._xscale == 100) {
this.xSpeed = _root.hero.xSpeed + 6;
}
if (_root.hero._xscale == -100) {
this.xSpeed = _root.hero.xSpeed - 6;
}
if (!onGround) {
_root.hud.score = _root.hud.score + 5;
} else {
_root.hud.score = _root.hud.score + 3;
}
}
if (this.hitTest(_root.hero.attack.hit4)) {
_root.hero.attack.hitEffect.gotoAndStop(5);
life = life - 4;
this.grav = 4;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt4");
if (_root.hero._xscale == 100) {
this.xSpeed = _root.hero.xSpeed + 15;
}
if (_root.hero._xscale == -100) {
this.xSpeed = _root.hero.xSpeed - 15;
}
if (!onGround) {
_root.hud.score = _root.hud.score + 6;
} else {
_root.hud.score = _root.hud.score + 4;
}
}
if (this.hitTest(_root.hero.attack.hit5)) {
_root.hero.attack.hitEffect.gotoAndStop(6);
life = life - 1;
this.grav = 20;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt5");
if (_root.hero._xscale == 100) {
this.xSpeed = _root.hero.xSpeed + random(7);
}
if (_root.hero._xscale == -100) {
this.xSpeed = _root.hero.xSpeed - random(7);
}
if (!onGround) {
_root.hud.score = _root.hud.score + 7;
} else {
_root.hud.score = _root.hud.score + 5;
}
}
if (this.hitTest(_root.hero.attack.hit6)) {
_root.hero.attack.hitEffect.gotoAndStop(5);
if (!onGround) {
this.grav = -20;
life = life - 3;
} else {
this.grav = 7;
life = life - 1;
}
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt5");
if (_root.hero._xscale == 100) {
if (!onGround) {
this.xSpeed = _root.hero.xSpeed + 5;
} else {
this.xSpeed = _root.hero.xSpeed + 1;
}
}
if (_root.hero._xscale == -100) {
if (!onGround) {
this.xSpeed = _root.hero.xSpeed - 5;
} else {
this.xSpeed = _root.hero.xSpeed - 1;
}
}
if (!onGround) {
_root.hud.score = _root.hud.score + 8;
} else {
_root.hud.score = _root.hud.score + 6;
}
}
if (!dead) {
if (hurt) {
if (_root.ground.hitTest(_x - 23, _y - 20, true)) {
this.xSpeed = (xSpeed + 1) * -1;
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndPlay("hurt1");
}
if (_root.ground.hitTest(_x + 23, _y - 20, true)) {
this.xSpeed = (xSpeed + 1) * -1;
this.hurt_mc.gotoAndPlay("hurt1");
}
if (grav < 0) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
if ((this.hurt_mc._currentframe >= 69) && (this.hurt_mc._currentframe <= 82)) {
this.grav = (grav / 2) * -1;
this.hurt_mc.gotoAndPlay("hurt6");
}
}
}
}
}
if (_root.hero.life > 0) {
if (onGround && (this._currentframe == 1)) {
if (this.hitTest(_root.hero.bound)) {
this.gotoAndStop("attack");
xSpeed = 0;
}
}
if (this.attack.hit1.hitTest(_root.hero.bound)) {
if (this._xscale == 100) {
_root.hero.xSpeed = 6;
}
if (this._xscale == -100) {
_root.hero.xSpeed = -6;
}
_root.hero.hurt = true;
_root.hero.gotoAndStop("hurt");
_root.hero.life = _root.hero.life - 0.5;
}
if (this.attack.hit2.hitTest(_root.hero.bound)) {
if (this._xscale == 100) {
_root.hero.xSpeed = 10;
}
if (this._xscale == -100) {
_root.hero.xSpeed = -10;
}
grav = 4;
_root.hero.grav = 10;
_root.hero.hurt = true;
_root.hero.gotoAndStop("hurt");
_root.hero.hurt_mc.gotoAndPlay("hurt2");
_root.hero.life = _root.hero.life - 0.5;
}
}
if (hurt) {
this.gotoAndStop(2);
}
if (!dead) {
if (this._currentframe == 1) {
if (onGround) {
if (this.hitTest(_root.hero)) {
this.walk.gotoAndStop(1);
} else {
this.walk.play();
}
} else {
this.walk.gotoAndStop(10);
}
}
}
if (life <= 0) {
dead = true;
if (this._currentframe == 1) {
this.gotoAndStop("hurt");
this.hurt_mc.gotoAndStop("dead");
}
} else if (life > 0) {
dead = false;
}
if (dead) {
if (deathBounce == true) {
grav = 7;
deathBounce = false;
}
}
};
Symbol 46 MovieClip Frame 1
_visible = false;
Symbol 85 MovieClip Frame 18
_parent.gotoAndStop(1);
Symbol 92 MovieClip Frame 18
_parent.gotoAndStop(1);
Symbol 105 MovieClip Frame 22
_parent.gotoAndStop(1);
Symbol 116 MovieClip Frame 22
_parent.gotoAndStop(1);
Symbol 127 MovieClip Frame 12
_parent.gotoAndStop(1);
Symbol 128 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 1
onEnterFrame = function () {
if (_parent.pressingAttack == false) {
if ((Key.isDown(_parent.Punch) && (Key.isDown(_parent.Left) == false)) && (Key.isDown(_parent.Right) == false)) {
if ((this._currentframe > 9) && (this._currentframe < 23)) {
this.gotoAndPlay("attack4");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 79) && (this._currentframe < 88)) {
this.gotoAndPlay("attack3");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 85) && (this._currentframe < 94)) {
this.gotoAndPlay("attack5");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 35) && (this._currentframe < 44)) {
this.gotoAndPlay("attack5");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 106) && (this._currentframe < 132)) {
this.gotoAndPlay("attack6");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 185) && (this._currentframe < 191)) {
this.gotoAndPlay("attack3");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 187) && (this._currentframe < 203)) {
this.gotoAndPlay("attack5");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 240) && (this._currentframe < 247)) {
this.gotoAndPlay("attack4");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 209) && (this._currentframe < 219)) {
this.gotoAndPlay("attack4");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
}
if (Key.isDown(_parent.Punch) && (Key.isDown(_parent.Left) || (Key.isDown(_parent.Right)))) {
if ((this._currentframe > 185) && (this._currentframe < 191)) {
this.gotoAndPlay("attack8");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 187) && (this._currentframe < 203)) {
this.gotoAndPlay("attack9");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 77) && (this._currentframe < 87)) {
this.gotoAndPlay("attack10");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 209) && (this._currentframe < 219)) {
this.gotoAndPlay("attack105");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
}
if (Key.isDown(_parent.Punch)) {
if ((this._currentframe > 234) && (this._currentframe < 244)) {
this.gotoAndPlay("attack6");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 249) && (this._currentframe < 259)) {
this.gotoAndPlay("attack102");
}
if ((this._currentframe > 264) && (this._currentframe < 274)) {
this.gotoAndPlay("attack103");
}
if ((this._currentframe > 279) && (this._currentframe < 288)) {
this.gotoAndPlay("attack104");
}
if ((this._currentframe > 294) && (this._currentframe < 304)) {
this.gotoAndPlay("attack105");
}
if ((this._currentframe > 7) && (this._currentframe < 12)) {
this.gotoAndPlay("attack2");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
if ((this._currentframe > 30) && (this._currentframe < 38)) {
this.gotoAndPlay("attack3");
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
}
}
}
};
Symbol 173 MovieClip Frame 4
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed - 5;
}
Symbol 173 MovieClip Frame 10
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 11
if ((_parent._xscale == 100) && (Key.isDown(_parent.Left))) {
_parent._xscale = -100;
} else if ((_parent._xscale == -100) && (Key.isDown(_parent.Right))) {
_parent._xscale = 100;
}
Symbol 173 MovieClip Frame 14
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed - 5;
}
Symbol 173 MovieClip Frame 17
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 18
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 7;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed - 7;
}
Symbol 173 MovieClip Frame 27
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 28
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed - 5;
}
Symbol 173 MovieClip Frame 45
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 46
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 61
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 62
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed - 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 71
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 72
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 7;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed - 7;
}
Symbol 173 MovieClip Frame 97
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 98
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 113
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 114
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 123
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 124
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 133
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 134
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 140
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 141
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 150
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 151
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 160
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 161
if (_parent._xscale == 100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
if (_parent._xscale == -100) {
_parent.xSpeed = _parent.xSpeed + 5;
}
Symbol 173 MovieClip Frame 167
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 168
if (_parent.xSpeed < 0) {
_parent.xSpeed = _parent.xSpeed - 7;
}
if (xSpeed > 0) {
_parent.xSpeed = _parent.xSpeed + 7;
}
Symbol 173 MovieClip Frame 183
_parent.gotoAndStop(1);
Symbol 173 MovieClip Frame 208
_parent.gotoAndStop("jump");
Symbol 174 MovieClip Frame 2
_root.bar.hpbar.hp = _root.bar.hpbar.hp - 10;
Symbol 174 MovieClip Frame 11
_parent.gotoAndStop(1);
Symbol 174 MovieClip Frame 13
_root.bar.hpbar.hp = _root.bar.hpbar.hp - 15;
Symbol 174 MovieClip Frame 30
_parent.gotoAndStop(1);
Symbol 182 MovieClip Frame 1
_root.bar.xpbar.xp = _root.bar.xpbar.xp - 100;
Symbol 182 MovieClip Frame 31
_parent.gotoAndStop(1);
Symbol 183 MovieClip Frame 1
this.onEnterFrame = function () {
this.grav = this.grav - 0.5;
_y = (_y - grav);
if (_root.ground.hitTest(_x, _y + 2, true)) {
onGround = true;
} else {
onGround = false;
}
if (_root.ground.hitTest(_x - 22, _y - 20, true)) {
onLeftWall = true;
} else {
onLeftWall = false;
}
if (_root.ground.hitTest(_x + 22, _y - 20, true)) {
onRightWall = true;
} else {
onRightWall = false;
}
while (_root.ground.hitTest(_x, _y - 1, true)) {
grav = 0;
_y = (_y-1);
_y = (_y-1);
}
while (_root.ground.hitTest(_x - 20, _y - 20, true)) {
_x = (_x+1);
_x = (_x+1);
if (onGround) {
xSpeed = 0;
continue;
}
if (fighting) {
xSpeed = 0;
}
}
while (_root.ground.hitTest(_x + 20, _y - 20, true)) {
_x = (_x-1);
_x = (_x-1);
if (onGround) {
xSpeed = 0;
continue;
}
if (fighting) {
xSpeed = 0;
}
}
while (_root.ground.hitTest(_x, _y - 80, true)) {
grav = -2;
_y = (_y+1);
_y = (_y+1);
}
if (activated && (life > 0)) {
if (((!walling) && (!fighting)) && (!hurt)) {
if (Key.isDown(Left)) {
if (onGround) {
if (xSpeed > (-maxMoveSpeed)) {
xSpeed = xSpeed - 2;
_xscale = -100;
if (!skiding) {
if (xSpeed <= (-maxMoveSpeed)) {
this.gotoAndPlay("run");
} else {
this.gotoAndPlay("walk");
}
}
}
} else if (xSpeed > (-maxAirMoveSpeed)) {
xSpeed = xSpeed - 0.5;
}
}
if (Key.isDown(Right)) {
if (onGround) {
if (xSpeed < maxMoveSpeed) {
xSpeed = xSpeed + 2;
_xscale = 100;
if (!skiding) {
if (xSpeed >= maxMoveSpeed) {
this.gotoAndPlay("run");
} else {
this.gotoAndPlay("walk");
}
}
}
} else if (xSpeed < maxAirMoveSpeed) {
xSpeed = xSpeed + 0.2;
}
}
}
}
if (xSpeed > 0) {
if (onGround) {
xSpeed = xSpeed - 1;
} else {
xSpeed = xSpeed - 0.25;
}
_x = (_x + xSpeed);
}
if (xSpeed < 0) {
if (onGround) {
xSpeed = xSpeed + 1;
} else {
xSpeed = xSpeed + 0.25;
}
_x = (_x + xSpeed);
}
while ((this._x - 22) < _root.lScroll._x) {
this._x++;
xSpeed = 0;
}
while ((this._x + 22) > _root.rScroll._x) {
this._x--;
xSpeed = 0;
}
if (this._currentframe == 1) {
if (xSpeed != 0) {
if (stopSliding > 0) {
stopSliding--;
} else if (stopSliding == 0) {
this.xSpeed = 0;
}
}
} else {
stopSliding = 10;
}
if (activated) {
if ((Key.isDown(Jump) && (onGround)) && (!hurt)) {
grav = jump;
jumpAnimThres = 5;
if ((this._currentframe == 18) && (this.attack._currentframe >= 340)) {
this.gotoAndStop("jump");
}
shortHop = 5;
}
if (shortHop > 0) {
shortHop--;
}
if (((((shortHop > 0) && (shortHop < 5)) && (!onGround)) && (Key.isDown(Jump) == false)) && (!hurt)) {
grav = 7;
}
if (jumpAnimThres > 0) {
jumpAnimThres--;
}
if (onGround && (this._currentframe == 9)) {
if (jumpAnimThres == 0) {
this.gotoAndStop("idle");
}
}
if (((!onGround) && (!hurt)) && (!fighting)) {
if (!walling) {
this.gotoAndStop("jump");
}
}
}
if ((!onGround) && (!hurt)) {
if (onLeftWall) {
_x = (_x - 5);
}
if (onRightWall) {
_x = (_x + 5);
}
if ((xSpeed < -3) && (onLeftWall)) {
xSpeed = 0;
grav = 2;
walling = true;
this.gotoAndStop("wall");
_xscale = 100;
}
if ((xSpeed > 3) && (onRightWall)) {
xSpeed = 0;
grav = 2;
walling = true;
this.gotoAndStop("wall");
_xscale = -100;
}
if (walling) {
if ((!onLeftWall) && (!onRightWall)) {
gotoAndStop ("jump");
walling = false;
}
if (onLeftWall) {
grav = grav + 0.25;
_x = (_x-1);
_x = (_x-1);
}
if (onRightWall) {
grav = grav + 0.25;
_x = (_x+1);
_x = (_x+1);
}
if (Key.isDown(Jump)) {
grav = 10;
if (_xscale == 100) {
xSpeed = 10;
}
if (_xscale == -100) {
xSpeed = -10;
}
}
}
}
if (onGround && (walling)) {
gotoAndStop ("idle");
}
if (this._currentframe != 17) {
walling = false;
}
if (((onGround && (!fighting)) && (!hurt)) && (life > 0)) {
if ((xSpeed > 3) && (Key.isDown(Left))) {
skiding = true;
this.gotoAndStop("skid");
}
if ((xSpeed < -3) && (Key.isDown(Right))) {
skiding = true;
this.gotoAndStop("skid");
}
if (xSpeed == 0) {
if (skiding) {
skiding = false;
this.gotoAndStop(1);
}
}
if ((xSpeed > 0) && (Key.isDown(Right))) {
if (skiding) {
skiding = false;
this.gotoAndPlay("walk");
}
}
if ((xSpeed < 0) && (Key.isDown(Left))) {
if (skiding) {
skiding = false;
this.gotoAndPlay("walk");
}
}
}
if (activated) {
if (this._currentframe == 18) {
fighting = true;
} else {
fighting = false;
}
if (onGround && (!pressingAttack)) {
if (!hurt) {
if ((Key.isDown(Punch) && (Key.isDown(Left) == false)) && (Key.isDown(Right) == false)) {
if (this._currentframe == 1) {
this.gotoAndStop("attack");
}
}
if (!fighting) {
if (Key.isDown(Punch) && (Key.isDown(Right) || (Key.isDown(Left)))) {
this.gotoAndStop("attack");
this.attack.gotoAndPlay("attack7");
}
}
if (Key.isDown(Punch) && (Key.isDown(Down))) {
this.gotoAndStop("attack");
if (this.attack._currentframe < 340) {
this.attack.gotoAndPlay("attack11");
}
}
}
}
if (((!onGround) && (!pressingAttack)) && (this._currentframe == 9)) {
if (Key.isDown(Punch)) {
fighting = true;
this.gotoAndStop("attack");
this.attack.gotoAndPlay("attack12");
}
}
if (onGround && (this._currentframe == 18)) {
if ((this.attack._currentframe > 374) && (this.attack._currentframe < 410)) {
this.gotoAndStop(1);
}
}
if ((this.attack._currentframe > 374) && (this.attack._currentframe < 410)) {
if ((this._xscale == 100) && (Key.isDown(Right))) {
if (xSpeed < maxMoveSpeed) {
xSpeed = xSpeed + 0.5;
}
}
if ((this._xscale == -100) && (Key.isDown(Left))) {
if (xSpeed > (-maxMoveSpeed)) {
xSpeed = xSpeed - 0.5;
}
}
}
if (Key.isDown(Punch)) {
pressingAttack = true;
} else {
pressingAttack = false;
}
}
if ((!onGround) && (fighting)) {
if (onLeftWall || (onRightWall)) {
gotoAndStop ("jump");
xSpeed = 0;
}
if (_root.ground.hitTest(_x + 30, _y - 20, true) || (_root.ground.hitTest(_x - 30, _y - 20, true))) {
gotoAndStop ("jump");
xSpeed = 0;
}
}
if (this._currentframe == 19) {
hurt = true;
} else {
hurt = false;
}
if (this._y > _root.deadZone._y) {
this._x = _root.spawnPoint._x;
this._y = _root.spawnPoint._y;
grav = 2;
}
if (life <= 0) {
activated = false;
this.gotoAndStop("hurt");
if (onGround) {
this.hurt_mc.gotoAndStop("die2");
} else {
this.hurt_mc.gotoAndStop("die1");
}
}
};
Symbol 183 MovieClip Frame 2
Symbol 183 MovieClip Frame 7
gotoAndStop (1);
Symbol 183 MovieClip Frame 8
stop();
Symbol 183 MovieClip Frame 9
stop();
Symbol 183 MovieClip Frame 10
play();
Symbol 183 MovieClip Frame 16
gotoAndStop (1);
Symbol 183 MovieClip Frame 17
stop();
Symbol 183 MovieClip Frame 18
fighting = true;
stop();
Symbol 183 MovieClip Frame 19
stop();
Symbol 183 MovieClip Frame 20
stop();
Symbol 184 MovieClip Frame 1
stop();
Symbol 184 MovieClip Frame 39
_parent.gotoAndStop(1);
Symbol 195 MovieClip Frame 1
stop();
hp = 100;
Instance of Symbol 193 MovieClip "hp" in Symbol 195 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = _parent.hp;
if (_parent.hp < 0) {
_parent.hp = 0;
_root.hero.gotoAndPlay("die");
}
}
onClipEvent (enterFrame) {
if (_parent.hp > 100) {
_parent.hp = 100;
}
}
Symbol 199 MovieClip Frame 1
stop();
xp = 0;
Instance of Symbol 197 MovieClip "xp" in Symbol 199 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = _parent.xp;
if (_parent.xp > 100) {
_parent.xp = 100;
_root.hero.gotoAndPlay("levelup");
_root.leveluptext.play;
}
}
onClipEvent (enterFrame) {
if (_parent.xp < 0) {
_parent.xp = 0;
}
}
Symbol 202 MovieClip Frame 1
function camControl() {
rp.x = _x;
rp.y = _y;
var _local4 = camH * (_yscale * 0.01);
var _local3 = camW * (_xscale * 0.01);
var _local6 = sH / _local4;
var _local5 = sW / _local3;
_x2 = (_local3 / 2) * _local5;
_y2 = (_local4 / 2) * _local6;
_xscale2 = _local5 * 100;
_yscale2 = _local6 * 100;
_rotation2 = -_rotation;
_parent.filters = this.filters;
_parent.transform.colorTransform = this.transform.colorTransform;
}
function reset() {
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
_parent._rotation = 0;
_parent._visible = true;
}
function set_x2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._x = _parent._x + (value - _local2.x);
}
function get_x2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.x);
}
function set_y2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._y = _parent._y + (value - _local2.y);
}
function get_y2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.y);
}
function get_xscale2() {
return(_parent._xscale);
}
function set_xscale2(value) {
setProperty2("_xscale", value);
}
function get_yscale2() {
return(_parent._yscale);
}
function set_yscale2(value) {
setProperty2("_yscale", value);
}
function get_rotation2() {
return(parent.rotation);
}
function set_rotation2(value) {
setProperty2("_rotation", value);
}
function setProperty2(prop, n) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent[prop] = n;
var _local3 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local3);
_parent._x = _parent._x - (_local3.x - _local2.x);
_parent._y = _parent._y - (_local3.y - _local2.y);
}
_visible = false;
addProperty("_x2", get_x2, set_x2);
addProperty("_y2", get_y2, set_y2);
addProperty("_xscale2", get_xscale2, set_xscale2);
addProperty("_yscale2", get_yscale2, set_yscale2);
addProperty("_rotation2", get_rotation2, set_rotation2);
var oldScaleMode = stage.scaleMode;
stage.scaleMode = "exactFit";
var sW = Stage.width;
var sH = Stage.height;
stage.scaleMode = oldScaleMode;
var bounds_obj = this.getBounds(this);
var camH = Math.abs(bounds_obj.yMax - bounds_obj.yMin);
var camW = Math.abs(bounds_obj.xMax - bounds_obj.xMin);
var rp = {x:this._x, y:this._y};
onEnterFrame = function () {
camControl();
};
this.onUnload = reset;