AS3 collision and level moving

I’m really new to action script coding, and my teachers aren’t very good at helping me understand what is going on (I’m not the only student having problems). It would be great if someone could give me steps for not just the codes I need, but where the images should be at.

The first thing I need help with is getting the level to move. The player will be in one spot going up and down to dodge things while the screen moves forward. how do I do that?

The second thing is what code I need to make it so that when the player hits the blocks, ground, ceiling it goes to the game over screen adn they can try again.