iPad: Centering the application (StageAlign.TOP_LEFT isn't)
So I have an application that I want to be full screen and centered.
Most of the codebase is done via Flash Pro and then exported as a swc that's imported into a Mobile Actionscript Project in Flash Builder.
So far, so good.
Here's the constructor for main class of that project:
public function myApp()
{
super();
stage.align = StageAlign.TOP;
stage.scaleMode = StageScaleMode.NO_SCALE;
var t:MovieClip = new Game(stage) as MovieClip;
addChild(t);
}
Here's the issue:
Despite the fact that the original stage size is 1024 x 750, I cannot get that object to line up with the borders of the emulated ipad without moving it (e.g. when using left I have to offset it on y by -185 or so pixels).
StageAlign.TOP_LEFT is the closest, but it's about 20 pixels too far "up." Wherever the application decides that 0,0 is is entirely dependent on what alignment I use.
I can't simply offset the myApp object, nor the Game object, as it completely screws with the X and Y values of some objects (i.e. mouse events as well as localToGlobal).
(Also, I have to set StageScaleMode.NO_SCALE or the application ends up far too LARGE for the ipad's screen, by almost double).
I've also tried some of the settings in the *-app.xml file, to no avail. In fact, attempting to force a min size equal to the application's actual size causes it to vanish completely and setting an X and Y position appears meaningless.
What gives?
