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




Reply With Quote