Attacking and Jumping Issue

I am having an issue with attacking and jumping. When standing still, they work fine and the animations play fine, but while I’m walking, he’ll jump, but it won’t play the animation, and while I’m walking, he won’t do his attack. I’m guessing this leads to the all aspiring question of multiple keypress’. I’ve searched the forums, online tutorials as well as other forums at other sites and cannot find a resolution.

Hopefully someone can help me this time, last time I had a question I don’t think anyone helped. PLEASE HELP!

Here’s all the code on my main character


onClipEvent (load) {
	vel_y = 0;
	started = true;
	jumping = false;
	xspeed = 5;
	this.stop();
}
onClipEvent (enterFrame) {
	if (started) {
		if (move) {
			if (Key.isDown(Key.LEFT)) {
				this.gotoAndStop("walk");
				this._xscale = -100;
			}
			if (Key.isDown(Key.RIGHT)) {
				this.gotoAndStop("walk");
				this._xscale = 100;
			}
			if (Key.isDown(Key.DOWN)) {
				this.gotoAndStop("duck");
				xspeed = 0;
			}
		}
	}
}
onClipEvent (enterFrame) {
	if (started) {
		if (Key.isDown(Key.LEFT)) {
			this._x -= xspeed;

		}
		if (Key.isDown(Key.RIGHT)) {
			this._x += xspeed;

		}
		if (Key.isDown(83)) {
			this.gotoAndStop("attack");
			this.attack.play()
		}
		if (Key.isDown(65) && !jumping) {
			this.jump.gotoAndStop(2);
			move = false;
			vel_y = 17;
			jumping = true;
		}
		if (jumping == true) {
			vel_y -= 1;
			if (vel_y<=-17) {
				vel_y = -17;
			}
			this._y -= vel_y;
		}
		if (!_root.ground.hitTest(this._x, this._y+15, true) && !jumping) {
			fall += 1;
			move = false;
			if (fall>17) {
				fall = 17;
				this.jump.play();
			}
			this._y += fall;
		}
		if (_root.ground.hitTest(this._x, this._y+15, true)) {
			if (vel_y<=1) {
				fall = 0;
				vel_y = 0;
				jumping = false;
				this.jump.gotoAndStop(1);
				move = true;
			}
		}
	}
}
onClipEvent (keyUp) {
	if (move) {
		if (Key.getCode() == Key.RIGHT) {
			this.gotoAndStop("stand");
		}
		if (Key.getCode() == Key.LEFT) {
			this.gotoAndStop("stand");
		}
		if (Key.getCode() == Key.DOWN) {
			this.gotoAndStop("stand");
			xspeed = 5;
		}
	}
}

I would include my .fla, but it’s to large apparently.

Thanks in advance!