I am building a mobile application using Flash Builder. I am testing on a Motorola Xoom. When the app opens on the attached Xoom it opens with the correct orientation (landscape), but when it opens on the computer in the emulator it is backwards (Portrait).
I have specified the ratio and orientation in the *-app.xml:
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
I'm assuming it is a bug but it is possible that I am missing something or that there may be a fix.
In my case, neither was working. So, for the desktop version, I've made an ugly thing: duplicated the aspectRatio
property above the others, after title
property. I don't know if the position of the property matters, but that way it worked.
There is just one problem with this approach: when building the debug version of your application all works fine (including in mobile), but when you build the release version, an error occurs saying that the aspectRation
property is unexpected. Just remove one of them and the build will work.
Just for the register, to make it work in mobile, I had to set the property aspectRatio
in the code too, like this:
stage.setAspectRatio(StageAspectRatio.LANDSCAPE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With