Frame 1
stop();
Instance of Symbol 16 MovieClip "Shadow" in Frame 1
onClipEvent (load) {
gravity = 8;
scale = _xscale;
walkSpeed = 10;
maxjump = 10;
}
onClipEvent (enterFrame) {
if (air == true) {
_y = (_y + gravity);
state = 3;
}
if (Key.isDown(37) && (!_root.leftbound.hitTest(_x, _y, true))) {
_x = (_x - walkSpeed);
_xscale = (-scale);
}
if (Key.isDown(39) && (!_root.rightbound.hitTest(_x, _y, true))) {
_x = (_x + walkSpeed);
_xscale = scale;
}
if (_root.ground.hitTest(_x, _y, true)) {
air = false;
} else {
air = true;
}
if (Key.isDown(38) && (jump == true)) {
_y = (_y - jumpSpeed);
}
if (air == false) {
jump = true;
jumpcount = 0;
jumpSpeed = 22;
}
if (Key.isDown(38)) {
jumpcount = jumpcount + 1;
}
if ((jumpcount > maxjump) && (jumpSpeed > -2)) {
jumpSpeed = jumpSpeed - 2;
}
if (((((air == false) && (!Key.isDown(37))) && (!Key.isDown(65))) && (_currentframe < 4)) or ((((air == false) && (!Key.isDown(39))) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 1;
}
if ((((Key.isDown(37) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4)) or (((Key.isDown(39) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 2;
}
if (!Key.isDown(65)) {
gotoAndStop(state);
}
_root.statetxt = state;
}
onClipEvent (keyUp) {
if (Key.getCode() == 83) {
jump = false;
}
}
Instance of Symbol 26 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 26 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 28 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(3);
}
}
Frame 2
gotoAndStop (2);
Frame 3
stop();
Instance of Symbol 26 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 26 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 26 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 16 MovieClip "Shadow" in Frame 3
onClipEvent (load) {
gravity = 8;
scale = _xscale;
walkSpeed = 10;
maxjump = 10;
}
onClipEvent (enterFrame) {
if (air == true) {
_y = (_y + gravity);
state = 3;
}
if (Key.isDown(37) && (!_root.leftbound.hitTest(_x, _y, true))) {
_x = (_x - walkSpeed);
_xscale = (-scale);
}
if (Key.isDown(39) && (!_root.rightbound.hitTest(_x, _y, true))) {
_x = (_x + walkSpeed);
_xscale = scale;
}
if (_root.ground2.hitTest(_x, _y, true)) {
air = false;
} else {
air = true;
}
if (Key.isDown(38) && (jump == true)) {
_y = (_y - jumpSpeed);
}
if (air == false) {
jump = true;
jumpcount = 0;
jumpSpeed = 22;
}
if (Key.isDown(38)) {
jumpcount = jumpcount + 1;
}
if ((jumpcount > maxjump) && (jumpSpeed > -2)) {
jumpSpeed = jumpSpeed - 2;
}
if (((((air == false) && (!Key.isDown(37))) && (!Key.isDown(65))) && (_currentframe < 4)) or ((((air == false) && (!Key.isDown(39))) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 1;
}
if ((((Key.isDown(37) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4)) or (((Key.isDown(39) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 2;
}
if (!Key.isDown(65)) {
gotoAndStop(state);
}
_root.statetxt = state;
}
onClipEvent (keyUp) {
if (Key.getCode() == 83) {
jump = false;
}
}
Instance of Symbol 28 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(4);
}
}
Frame 4
stop();
Instance of Symbol 40 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(5);
}
}
Instance of Symbol 16 MovieClip "Shadow" in Frame 4
onClipEvent (load) {
gravity = 8;
scale = _xscale;
walkSpeed = 10;
maxjump = 10;
}
onClipEvent (enterFrame) {
if (air == true) {
_y = (_y + gravity);
state = 3;
}
if (Key.isDown(37) && (!_root.leftbound.hitTest(_x, _y, true))) {
_x = (_x - walkSpeed);
_xscale = (-scale);
}
if (Key.isDown(39) && (!_root.rightbound.hitTest(_x, _y, true))) {
_x = (_x + walkSpeed);
_xscale = scale;
}
if (_root.ground.hitTest(_x, _y, true)) {
air = false;
} else {
air = true;
}
if (Key.isDown(38) && (jump == true)) {
_y = (_y - jumpSpeed);
}
if (air == false) {
jump = true;
jumpcount = 0;
jumpSpeed = 22;
}
if (Key.isDown(38)) {
jumpcount = jumpcount + 1;
}
if ((jumpcount > maxjump) && (jumpSpeed > -2)) {
jumpSpeed = jumpSpeed - 2;
}
if (((((air == false) && (!Key.isDown(37))) && (!Key.isDown(65))) && (_currentframe < 4)) or ((((air == false) && (!Key.isDown(39))) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 1;
}
if ((((Key.isDown(37) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4)) or (((Key.isDown(39) && (air == false)) && (!Key.isDown(65))) && (_currentframe < 4))) {
state = 2;
}
if (!Key.isDown(65)) {
gotoAndStop(state);
}
_root.statetxt = state;
}
onClipEvent (keyUp) {
if (Key.getCode() == 83) {
jump = false;
}
}
Instance of Symbol 46 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.Shadow)) {
_root.gotoAndStop(6);
}
}
Frame 5
stop();
Frame 6
stop();
Symbol 16 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 2
stop();
Symbol 16 MovieClip Frame 3
stop();
Symbol 18 MovieClip Frame 1
stop();
Symbol 33 Button
on (release) {
stop();
play();
gotoAndPlay (1);
}