Believe it or not it's an implementation of a physics engine. Though it is the most simplest and commonly used. In order to program it though once must at least have an understanding of gravity. Which is what jumping scripts emulate.
onClipEvent(load){
var jumping:Boolean = false;
var yvel:Number = -16;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.SPACE) && !jumping){
jumping = true;
}
if(jumping){
this._y += yvel;
yvel++;
}
}
Looking at the script, the first thing we did was initialize two variables, one containing the flag variable jumping (which tells when jumping should be activated), and another that contains the intial y velocity (or verticle velocity) and will track the velocity through the action.
The next code will iterate (or happen) every frame. What it does is it checks if the spacebar is pressed and if the character is not jumping (what the explamation point is for). From there it'll flag the jumping variable as true which will initiate the jumping action. The gravity engine will then add the initial y velocity to the characters _y position moving it up. The next line down increments the variable by 1.
Notice that the yvel variable starts negative, so that the range of numbers will be -16, -15, -14... to 1, 2, 3 and onwards. This is because the y plane on the stage is actual what you would consider Quadrant 4 on the cartesian plane, meaning the origin point is at the upper left of the stage (or main area).
The ending effect is what you described though, it goes up slows to a stop then speeds up back towards the ground. Like I said though it's very basic as it doesn't include a hit detection system so the character will continue falling off the screen.
And that's all there is to it for the physics engine. Nice huh?