Thank you for the reply.
I know that MAMP is installed in Application folder by default and I have to put a copy of website in htdocs folder in order to make it work with localhost.
But I want to keep my localrootfolder as document root because all my client’s website are organized in this folder.
According to MAMP FAQ we can change the path for the Document Root in the MAMP program under Preferences and then I changed it to the path /Websites/localrootfolder.
Now when I type http://localhost in the browser it shows the website, so it’s working but the only problem is that I have a Flash animation (swf) in the header that does not work. What could be the problem?