1 Reply Latest reply on May 11, 2009 4:26 AM by robdillon

    Fit Browser to Flash, without fitting Flash to Browser

    redsand209

      I've figured out how to tell my flash website not to scale itself (which degrades the quality of the buttons i've created as .gifs).

      And then how to keep it centered within the browser. But this leads to unwanted white, negative space on all sides, since i'm keeping my site small enough for everyone to view (at 800 x 600).

       

      So what code can I add that will scale the browser to the set dimensions of the site? Rather than vice versa.

        • 1. Re: Fit Browser to Flash, without fitting Flash to Browser
          robdillon Most Valuable Participant

          You can use the window.resizeTo() Javascript method to reshape the browser window to the size that you want. You can call this from an onLoad Javascript method either in the head of the document or from the <body> tag. Be aware that every browser interprets its window size property differently. Additionally, users can customize the chrome on their browser window to include more than normal or remove some normally seen parts of the browser window space.

           

          You may want to give your window resizing a little breathing space on each side. If you set the background color or image to something that complements your movie then the border will be less obvious.