HELP! I did this to myself...

can anyone with some experience in AS help me
clean my script? (platform game)



code:

onClipEvent(load) {
vel_y = 0;
jumpstrength = 35;
speed = 15;
jumping = false;
left = false;
crouch = false;
running = false;
spacedown = false;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x = _x-speed;
left = true;
running = true;
this.gotoAndStop(crouch ? 10 : 4);
}
else if(Key.isDown(Key.RIGHT)){
this._x = _x+speed;
left = false;
running = true;
this.gotoAndStop(crouch ? 9 : 3);
}
else if(Key.isDown(Key.DOWN)){
this.gotoAndStop(left ? 10 : 9);
speed = 0;
crouch = true;
}
else if(Key.isDown(Key.ENTER)){
this.gotoAndStop(left ? 6 : 5);
}
else {
if (left == true) {
this.gotoAndStop(2);
running = false;
}
else if (left == false) {
this.gotoAndStop(1);
running = false;
}
else if(crouch == true && !Key.isDown(Key.DOWN))
this.gotoAndStop(left ? 2 : 1);
speed = 15;
crouch = false;
}
if (Key.isDown(Key.SPACE) && spacedown == false && !jumping) {
vel_y = jumpstrength;
jumping = true;
spacedown = true;
}
if (jumping == true) {
vel_y -= 5;
//8 = jumping anim left, 7 = jumping anim right
this.gotoAndStop(left ? 8 : 7);
if (vel_y <=- jumpstrength) {
vel_y =- jumpstrength;
}
this._y -= vel_y;
}
//so that it doesnt jump continuously when holding space bar
if(spacedown == true && jumping == false){
jumpstrength = 0;
}
else{
jumpstrength = 35;
}
if(!Key.isDown(Key.SPACE)){
spacedown = false;
}
}




or is it impossible?

cause i think its messed up thats why i cant put any other commands

like attacking while jumping, attacking while crouching

anyway...if its not too much to ask, can anyone help me?

THNX A BUNCH!