Skip navigation
Currently Being Moderated

FullScreen Scale Amount?

Jan 28, 2013 5:01 PM

I am looking for a way to determine the scale amount when entering fullScreen. It seems like this should be a n easy one but after a lot of searching I am just not seeing anything.


To explain. I have a button that when clicked enters fullscreen mode and scales everything accordingly. My starting stage width is 1024 and after scaling is 1024. All of my content still reads the original widths and heights because obviously a highter parent was the one scaled. I can read the fullScreenWidth wich is obviously the new width. But I can't simply go stage.fullScreenWidth/stage.width because I don't know if the content fit the monitor first by width or height (ok I could by checking the fullScreenWidth against the fullScreenHeight but there should be an easier way). It seems like there should be a really easy window.scale or something to find the how much the content had to scale to fit the screen.


Any help?

  • Currently Being Moderated
    Feb 14, 2013 6:42 AM   in reply to JasonInfuse

    You can get the actual resolution of the users Display via system.capabilities

    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 2:59 AM   in reply to JasonInfuse

    My original app had 1024x768 (desired UI Size at 100%, publish settings), insert your apps values.



    // Math.max/min only for mobile forced landscape-mode

    dimHorizontal = Math.max(stage.fullScreenWidth, stage.fullScreenHeight);

    dimVertical = Math.min(stage.fullScreenWidth, stage.fullScreenHeight);


                                  // depending on ratio, one value will change (width in most cases).

                                  appScreenWidth = 1024;

                                  appScreenHeight = 768;


                                  if ((dimHorizontal/dimVertical) > (1024/768)) {

                                                 stageScale = dimVertical / 768;

                                                 appScreenWidth = dimHorizontal / stageScale;

                                                 borderStripe = (appScreenWidth - 1024) * 0.5;


                                  else {

                                                 stageScale = dimHorizontal / 1024;

                                                 appScreenHeight = dimVertical / stageScale;

                                                 borderStripe = 0;



                                  borderleft = -borderStripe;

                                  borderright= 1024 + borderStripe;

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points