2 Replies Latest reply on Nov 14, 2007 3:19 AM by rot-maus

    How to center PopUp-Window with image?

      I'll try to build a simple photo gallery with Flex 2. If the user clicks on the image, a popup-window with a larger image should be opened. With creationComplete-Event the image should be loaded and the popup-window should be centered:

      <mx:TitleWindow … creationComplete="creationHandler(); PopUpManager.centerPopUp(this)”…>

      public function creationHandler():void{
      var image:Image = new Image;


      The problem is, that the popup-window is initially centered and only then the image is loaded. Since the image size and the size of pop-up window are not known at the moment of centering, the result is not correct centering. Does anybody know, how to fix this problem?