Functions problem

I have a problem with functions. I want to make a function that moves the character and let him do a different thing like kicking or going down and jumping. Here is the code i have:

function enableKeyMovement(clip) {
 clip.onKeyDown = function() {
  this.onEnterFrame = this["key"+Key.getCode()];
 };
 clip.onKeyUp = function() {
  this.onEnterFrame = null;
 };
 clip.spd = 10;
 Key.addListener(clip);
 trace(clip);
}
//left - hold
MovieClip.prototype.key37 = function() {
 this._x -= 10;
 this.gotoAndStop(3);
};
//right - hold
MovieClip.prototype.key39 = function() {
 this._x += 10;
 this.gotoAndStop(2);
};
//jump - press or hold
MovieClip.prototype.key38 = function() {
 this.gotoAndstop(4);
 enableKeyMovement(ryu);
};
//down - hold
MovieClip.prototype.key40 = function() {
 this.gotoAndstop(5);
};
enableKeyMovement(ryu);

and i want the up key to be pressed once, the down key to be hold on to and when released it goes back, and the right and left to be hold on to and when released goes back to 1.

please help me,

thanks in advance,
Nico

no one ? :frowning: