Combo-jump problem

Hey guys, ive got a little problem, again…

Ive set it up so my hero can duck jump right. And it works 50%.

If you are ducking and walking right and you jump, you can duckjump right. But if you do it to the left. You dont jump at all.

This is whats on the duckwalk MC, on this mc you can duck and walk.


onClipEvent (load) {
	h = _root.hero;
	xSpeed = 2.8;
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.UP)) {
		**_root.hero.gotoAndStop("duckJump");**
	} else if (Key.isDown(Key.DOWN) && Key.isDown(Key.RIGHT)) {
		this.play();
		h._x += xSpeed;
		h._xscale = 100;
		_root.cAction = "duckRolling";
	} else if (Key.isDown(Key.DOWN) && Key.isDown(Key.LEFT)) {
		this.play();
		h._x -= xSpeed;
		h._xscale = -100;
		_root.cAction = "duckRolling";
	} else if (Key.isDown(Key.DOWN)) {
		this.stop();
	} else {
		h.gotoAndStop("stand");
	}
}

the part I bolded, is what links to the duckjump mc which contains this code…


onClipEvent (load) {
	h = _root.hero;
	xSpeed = 3;
	vel_y = 0;
	jumping = false;
	ground = _root.backGround.platform;
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.RIGHT)) {
		h._x += xSpeed;
		h._xscale = 100;
		_root.cAction = "duckJump-left";
	} else if (Key.isDown(Key.LEFT)) {
		h._x -= xSpeed;
		h._xscale = 100;
		_root.cAction = "duckJump-right";
	} if (!jumping) {
		vel_y = 15;
		jumping = true;
	}
	if (jumping == true) {
		_root.cAction = "duck-jumping";
		vel_y -= 1;
		if (vel_y<=-20) {
			vel_y = -20;
		}
		h._y -= vel_y;
	}
	if (ground.hitTest(h._x, h._y, true)) {
		vel_y = 0;
		jumping = false;
		h.gotoAndStop("duckRoll");
	}
}

Any ideas??