Here is a very short tutorial on centering a Flash movie in a browser from Flash. No JS or HTML needed.
function openCenteredWin(url,wid,hei) {
getURL("java'" + url + "','popupName','width=" + wid + ",height=" + hei + "');cntPop.moveTo((screen.width-" + wid + ")/2,(screen.height-" + hei + ")/2);void(0);");
and when you want to open a popup from your flash, just use:
// where first parameter is URL to open, second is width and third is height
and that's it... no HTML/JS needed at all. Even if you open directly your .swf in the browser, it will still work.