Combo system but for a sidescroller

[font=verdana, arial, helvetica][size=2]NOTE:basically what i want is different animations with the same key press depending if there is hittest or not.[/size][/font]
[font=verdana, arial, helvetica][size=2]ok i tried to do a combo system for my sidescroller game but i couldnt do it. I DID DO A SEARCH IN THE FORUM, the thing is that everyone is doing combo systems for fighting game and that is not my case. my combo is by only pressing the space bar. i tried doing it but i couldnt get it done my hero mc just kept tracing only the first move. this is what i want to accomplish in english.

[/size][/font][indent]

[font=verdana,arial,helvetica][size=1]code:[/size][/font]<HR>
//or something like that i think
var hit=_root.hero(hitTest._root.enemy)
combo function
if you press space
//variable checking to see if hittest is true or false//
//play low punch if hittest is false//
hit=false;
hero goes to and stop low punch
//dont dont matter how many times you press space//
//if there is no hittest he will always play low punch//
//but//else if you press space
//and if the hittest is true on the low punch//
//hero go to and stop medium punch//
else if space is pressed//and the low punch hittest with enemy//
if hit=true;
hero goest to and stop low punch
enemy health -=5;
if you press space //after the low punch hittest with enemy//
if hit=true;// if hittest is true with the low punch//
hero go to and stop medium punch
enemy health -=10;
else if you press space//once again after hittest with medium punch//
if hit=true
hero go to and stop high punch
enemy health -=15;
else if you press space//one last time and the high punch hittest with enemy//
hit=true;
hero go to and stop last hit
enemy health -=20;
<HR></PRE>[/indent][font=verdana, arial, helvetica][size=2]
guys trust me i tried to see if i can do it but i couldnt i search all over and i just couldnt do it with the help from the other threads i was able to kinda figure out the way the coding goes…
THANKS A MILLION EVERYONE[/size][/font]