First u will need a large map, lets say 640x5000. You can put something on it , like a landscape that will fly under the hero.
Then you will need to large bars, at the top and bottom of the screen.
Now u will have to put your hero object between those bars.

Every 1/10 of a second Y of bars object = y of barsobject+1

if the hero schould colide with those bars he should bounce.

IMPORTANT
every 1/10 of a second Y of hero = Y of hero +1

sinc u don't want ur hero to slowly move to the bottom of the screen.

You can change the speed by adding more to the Ypositions.

I know my neglish sucks, but I think you might be able, to get the thought