Help with platform game

I have put together this code with help from a tutorial, it is an .as file for a platform game.

i was wondering if anyone could add in how to jump, how to jump on objects, and help with a scrolling terran when he runs.

would be a big help thankyou.

this is the code:

class Character extends
MovieClip {
var speed:Number = 0;
var maxSpeed:Number = 12;
var accel:Number = 0.5;
var moving:Boolean = false;
var dir:String;
var fr:Number = 0;
var frmem:Number = 0;
var feetClip:MovieClip;
public function
Character() {
this.onKeyDown = charKeyDown;
this.onKeyUp = charKeyUp;
Key.addListener(this);
}
function charKeyDown():
Void {
switch (Key.getCode()) {
case Key.LEFT :
this._xscale = 100;
if (!(moving)) {
if (this.speed>0) {
charKeyUp(true,“left”);
}
else {
this.dir = “left”;
this.move();
}
}
break;
case Key.RIGHT :
this._xscale = -100;
if (!(moving)) {
if (this.speed>0){
charKeyUp(true,“right”);
}
else {
this.dir = “right”;
this.move();
}
}
break;
}
}
function charKeyUp(reverse:
Boolean, newDir:String):Void {
this.moving = false;
this.onEnterFrame =
function() {
if (this.speed>0) {
this.speed -=
this.accel;
}
else {
if (reverse == true) {
this.dir = newDir;
this.move();
}
else {
trace(“done”);
this.feetClip.gotoAndPlay(1);
delete this.onEnterFrame;
}
}
if (dir == “left”){
this._x -= this.speed;
}
else if (dir ==“right”) {
this._x += this.speed;
}
this.fr -= .05;
if (Math.floor(this.fr)== this.frmem) {
this.frmem–;
}
if (this.feetClip._currentframe == 40) {
this.feetClip.gotoAndStop(1);
}
this.feetClip.gotoAndStop(this.feetClip._currentframe+this.frmem);
};
}
public function
move(dir:String):Void {
this.moving = true;
this.speed = 0;
this.fr = 1;
this.frmem = 1;
this.feetClip = eval(this).feet;
this.onEnterFrame = function() {
if (this.speed<this.maxSpeed) {
this.speed += this.accel;
}
if (dir == “left”){
this._x -= this.speed;
}
else if (dir == “right”) {
this._x += this.speed;
}
this.fr += .05;
if (Math.floor(this.fr) == this.frmem) {
this.frmem++;
}
if (this.feetClip._currentframe == 40) {
this.feetClip.gotoAndStop(1);
}
this.feetClip.gotoAndStop(this.feetClip._currentframe+this.frmem);
};
}
}