Maximum jump height for platformer

I am making my second game, and it’s going to be a platformer. :2c: Unfortunately, I have no idea how to make the character (named hero) jump only to a certain height, and then fall back down. someone, please post a way to do this!

Have a set variable for gravity, and one for falling speed, add the gravity to the falling speed, and add negative falling speed when you want to jump.

gravity = 1;
fallSpeed = 0;
jumpHeight = 10;

then, add the gravity to the fallspeed and add the fallspeed to the _y position of the movieclip.

fallSpeed += gravity;
_y -= fallSpeed

on the jumping action,

_y+=jumpHeight;

And it will look very smooth and good.