Use the screen resolution values to center a pop-up browser window
package{ import flash.display.Sprite; import flash.system.Capabilities; import flash.net.*; public class Main extends Sprite{ public function Main(){ var resX:int = flash.system.Capabilities.screenResolutionX; var resY:int = flash.system.Capabilities.screenResolutionY;
var winW:int = 200; var winH:int = 200;
var winX:int = (resX / 2) - (winW / 2); var winY:int = (resY / 2) - (winH / 2);