onClipEvent(enterFrame){
speed = 8;
jump = 20;
gravity = 10;
// gravity
this._y+=gravity;
_root.cam._y = this._y;
// movement
if(Key.isDown(68)){
play();
_root.cam._x += speed;
this._x += speed;
_xscale=90
}
if(Key.isDown(65)){
play();
_root.cam._x -= speed;
this._x -= speed;
_xscale=-90
}
if(Key.isDown(Key.SPACE)){
this._y -= jump;
jump--;
}
if(this, hitTest(_root.wall)){
this._y-=(gravity);
}
} //END
So I'm trying to make an movie clip that I have "jump" whenever i hit space. It should decrement the jump speed when i hit space, but it doesnt seem to do that. Can anyone tell me why? (the code here is directly on my mc)