You must collect all of the coins and mushrooms floating around each level. Only then will you be able to leave. If you miss any of them, you will not be able to exit the level and will have to go back. Take your time and think carefully. Some of the coins and mushrooms will require a bit of problem solving to obtain. There are 10 levels.
Source
n1mariogames.com


I hate this game. This flash game sucks in the 2nd Mario Great Adventure because it has a missing coin or mushroom.