1 Reply Latest reply on Jul 4, 2008 5:20 AM by anirudhs

    fullScreenWidth and fullScreenHeight returning 0

    Gabriel.Mariani Level 1
      i'm trying to get the size of the ful screen but it just returns zero. I checked the documentation and there is this cryptic line: "Returns the width of the monitor that will be used when going to full screen size, if that state is entered immediately." IF that state is entered immediately? What does that mean? I'm not sure if that has an effect on why it returns zero but if you guys have any idea, i'd greatly appreciate it.
        • 1. Re: fullScreenWidth and fullScreenHeight returning 0
          anirudhs Level 2
          Hi,

          Have you tried using the Capabilities API?

          trace("screenResolutionX: " + Capabilities.screenResolutionX);
          trace("screenResolutionY: " + Capabilities.screenResolutionY);

          This will give you your full screen resolution.

          Regarding the documentation for stage.fullScreenWidth / height:

          I'm not an expert on this matter, but here is my assumption:

          The Flash player has a rendering cycle where it will render, execute code, execute event handlers, wait to maintain frame rate, render, etc. In the doc, by "state is entered immediately", I'm assuming it means that you're going to change stage.displayState and there's not going to be any other code execution. So if you access fullScreenHeight in the event handler you are going to change displayState, the value will be correct.