onClipEvent(enterFrame){
if(this.hitTest(_root.bg.platform)==false){
this._y+=_root.gravity}

if(this.hitTest(_root.CharacterBoundary.Wall1)==tr ue){
this._x+=_root.gravity}

if(this.hitTest(_root.CharacterBoundary.Wall2)==tr ue){
this._x-=_root.gravity}
}

onClipEvent(enterFrame){

if(Key.isDown(Key.RIGHT)){
this.gotoAndStop(2);
_root.CharacterBoundary.Character1._x+=_root.speed }

else if(Key.isDown(Key.LEFT)){
this.gotoAndStop(3);
_root.CharacterBoundary.Character1._x-=_root.speed}
else if(Key.isDown(Key.UP)){
this.gotoAndStop(4);
this._y-=_root.speed}
else if(Key.isDown(Key.DOWN)){
this.gotoAndStop(5)}
else(gotoAndStop(1))
}




That is the code i have so far...... (and don't judge any of it because im nowhere near done with the code but i need help :P) Ive got it to where if the UP button is pressed it [WILL] go up, YET i have another code in there that says if this object (Character1) is not touching the ground NO MATTER WHAT goto the ground, so when you click the up button you can tell it wants to go up but it can't..... I want to make this code to where the character will JUMP,, So he'll go up for about 2 seconds then fall back down... Ive got gravity and speed set so you can use those variables as you see