I am kinda new to flash/AS3. I have written some stuff and now I now the basics of AS. I want to develop a game in which my character moves. exactly like the way Super Mario moves(the background changes and new obstacles come in the way like and animation with which you can interact by climbing and shooting etc.) There is one big thing that I don't understand is that how to make my background moving and introduce new obstacles when my character moves forward. Currently my scene is static which means the background is the same and obstacles are also stationary. Can some point me to a tutorial or give me an answer that solves my confusion? thanks
You want your game-world to consist of several "chunks", so that you can add/remove elements to your scene when necessary. Some games use chunks the size of one screen, so you'll always see 4 of these chunks at the max.
For the scrolling, you'll need some sort of "2D camera" that moves around with your character and defines the visible portion of your screen. You can also apply some drag to the camera, so that it follows the character with a delay.
To add the illusion of depth, you can create one or multiple background layers that move with a fraction of the camera speed (parallax scrolling).
All this stuff is already present in game engines like flixel or flashpunk so it might be worthwhile to check these out if you want to start create the game right away. If you want to implement that stuff all by yourself for learning purposes, that's fine too.
You are looking for a basic side scrolling tile engine.. In the case of later Mario games it has multiple layers for the parallax scrolling background (which just makes what is really far away scrolls slower than what is close by). A quick google search should give you quite a few ways to accomplish this task.
In later Mario games, as far as screen scrolling goes, using two bounding boxes is also a good idea. One central box that mario can move around in that does not require the screen to scroll. As soon as mario gets outside that box the game should move slowly to keep him in it.. A secondary box thats a bit larger would be used as a 'mario cant get out of this box' sort of deal. This would be when the game Has to scroll at the speed mario is moving at.
Hope this helps, those were the major things I had to accomplish when I made a mario clone for school all those years ago.