0 Replies Latest reply: Feb 13, 2013 3:26 PM by paulhart83 RSS

    Flash Builder 4.7: Preloader, stageWidth is 1200 but FlexGlobals.topLevelApplication.width is 800

    paulhart83

      Hello

       

      I am writting code to center my preloader. Using Flash Builder 4.7 when I request this.stage.stageWidth on my Asus tablet I get 1200, then when FlexGlobals.topLevelApplicaiton becomes available I use FlexGlobals.topLevelApplication.width and it gives me the value I am looking for which is 800. I have it working where the display is delayed until the FlexGlobals.topLevelApplication is not null but it would be nice if the loader could start showing from the very start.

       

      One thing I really liked about FB 4.7 was that it resized the main view to fit the screen better vs having it too big. How do I access the "scale" that's being applied so I can just calculate the stageWidth before topLevelApplication is ready.

       

      Thanks!