Skip navigation
Currently Being Moderated

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

Feb 13, 2013 3:26 PM

Tags: #4.7 #stagewidth #flexglobals #ipreloaderdisplay

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!

 

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