var window :WindowClass = new WindowClass(); this.addChild(window); window.x = (this.stage.stageWidth - window.width) / 2; window.y = (this.stage.stageHeight - window.height) / 2;