2 Replies Latest reply on Mar 19, 2008 4:57 PM by jkash78

    Minimize issue

    Jamie_Kashetta
      I have an air app created ( see the SWF here);
      http://www.xeroproject.com/clients/UMG/

      The problem i am having is that when i resize the app using the min/max button ( on the upper right of the player) The App still sees the bounds as the top of the original file. Is there any way to reset the bounds once the animation occurs. I tried the resize for the stage.nativewindow but that allowed the user to drag and size. I just need the app to know the new bounds once the animation takes place.

      I have slowly been plotting though AS3 since i am a designer who just happened to program decently in AS3 any help would be appreciated.

      thanks in advance.
      Jamie
        • 1. Re: Minimize issue
          Joe ... Ward Level 4
          You can set the window size and position with the native window bounds property (or the x, y, width, and height separately).

          If the problem is how to "grow" the window upward, I think you will have to make the window taller, move it up on the desktop, and simultaneously move the content in the window down (so that it appears to stay in the same place).

          You could also avoid the issue by making your transparent window tall enough to contain the entire animation from the beginning and leave the extra space as padding above the minimized version of your player.
          • 2. Re: Minimize issue
            jkash78
            i figured it out,with code. Making the stage bigger wouldnt solve the problem at all since the app was expanding downward if anything that would cause a bigger problem since the app was seeing the size of the stage and the window was already transparent.

            Also animating the content would just sort of feel like bad usability to me since the application was moving on its own and i cant think of any app that just moves from where you left it unless it has a snap to a dock or corner function.

            So what i ended up doing is defining the size of the native window in the code for the expand and contrac also i had to define the start of the stage height and width since what was left in the contracted state was pretty much the middle portion of the app:
            function setState() {
            if (expand==true) {
            stage.nativeWindow.bounds = new Rectangle(stage.nativeWindow.x+19,(stage.nativeWindow.y+234),572,236);
            } else {
            stage.nativeWindow.bounds = new Rectangle(stage.nativeWindow.x- 19,(stage.nativeWindow.y-234),610,703);
            }
            }
            you can view the app here on my site and the app will be live on the clients site as soon as they supply me with all the mp3s to put up on the server.
            http://www.xeroproject.com/audioPlayer/

            -j