Well shahzeb, this has happaned to me lots of time and i work on IIS as well, the problem is, as Ron said that it is not gauranteed that every thing is on one maachine, or may be, the hosting provider has blocked direct access using the localhost keywords because it makes it available certain things that are not to be shown to clients.
Also, in your problem, it is not cleared that this problem happens to you when you upload the files after changing localhost to myproject.com or it happens on your own machine when you replace all the occurances of localhost to myproject.com If it happens due to later method then it is deffinately because of flash player's security and/or also because the hosting provider's firewall doesnt allows the outsiders to connect (as yo are in this case.
However, if it is happening to you when you upload your site on the hosting server and test them live(surely after replacing localhost to myproject.com) and this problem happens, then this is what often happens to me, so what i do for this situations, instead of calling server side scripts as http://localhost/gateway.aspx
i call the things as myVars.Load(_root.website + "/gateway.aspx");
where _root.website is a varaible on main movie's timeline and i place my swfs in html as src="mymovie.swf?website=http://localhost
" and when i upload the files to server, then instead of re-editing and publishing all the swfs, i just change src="mymovie.swf?website=http://localhost
" to src="mymovie.swf?website=http://myproject.com
" and it does the work for me.
Now you must be thinking that although i dont have to republish all the swfs again, but i still had to change the html wherever i have embeded a movie, so you know there are many builtin server variables in ASP (as i think you are using ASP/ASP.Net) that can give you your host's url so just get that URL in a variable and change src="mymovie.swf?website=http://localhost
Hope you have got the idea.