3 Replies Latest reply on Apr 20, 2007 2:42 AM by netsesame

    HOWTO show a popup window with ZOOM OUT effect?

    netsesame
      Hi,

      I want to implement such an effect in flex:
      Popup a modal window, which is showing as zooming out from the backgroud stage.

      I know how to implement in flash, but how in flex?

      please help.
      thanks.
        • 1. Re: HOWTO show a popup window with ZOOM OUT effect?
          peterent Level 2
          When you define the pop-up, set its scaleX and scaleY to zero. Then assign its showEffect to a <mx:Zoom> effect. If you don't set the initial scale to 0, you may briefly see the pop-up at full size before the Zoom effect re-scales it to zero.

          Note that your text may not scale: it depends on the font and if the Flash player can scale it; you can always embed the font and it will work correctly.

          You can make the Zoom effect either an MXML tag or create it with ActionScript when you make the pop-up.
          • 2. Re: HOWTO show a popup window with ZOOM OUT effect?
            netsesame Level 1
            Thanks any more.

            I followed your steps, and make a TitleWinodw like this:
            <!--myComp.mxml-->
            <mx:TitleWindow title="test" scaleX="0" scaleY="0" showEffect="Zoom">
            ...
            </mx>

            then in Ascript:
            var popup: MyComp = new MyComp();
            PopupManager.addPopup(popup, this, true);
            PopupManager.centerPopup(popup);

            then running, however, the dialog is not shown, it is still scaled by zero.
            Please help.
            • 3. Re: HOWTO show a popup window with ZOOM OUT effect?
              netsesame Level 1
              Now I try it in ActionScript code:

              popup = new MyComp();
              popup.scaleX = 0;
              popup.scaleY = 0;

              PopupManager.addPopup(popup);
              PopupManager.centerPopup(popup);

              var zoom: Zoom = new Zoom(popup);
              zoom.play();

              then the Zoom effect works, but, the dialog is out from the left top corner of the window. it can't be centred anyhow.