How to make landscape create a Flash builder mobile app

I am creating a mobile application using Flash Builder. I am testing Motorola Xoom. When the application opens in the attached Xoom, it opens with the correct orientation (landscape), but when it opens on the computer in the emulator, it is the opposite (portrait).

I specified the attitude and orientation in * -app.xml:

<aspectRatio>landscape</aspectRatio> <autoOrients>false</autoOrients> 

I suppose this is a mistake, but it is possible that I missed something or that there might be a fix.

+6
source share
1 answer

In my case, none of them worked. So, for the desktop version, I did an ugly thing: duplicated the aspectRatio property over the others, after the title property. I don’t know if a property matters, but it was.

There is only one problem with this approach: when creating a debug version of your application, everything works fine (including on a mobile phone), but when creating a release version, an error occurs indicating that the aspectRation property is unexpected. Just delete one of them and the assembly will work.

Just to register, to make it work on a mobile phone, I also had to set the aspectRatio property in the code:

 stage.setAspectRatio(StageAspectRatio.LANDSCAPE); 
+1
source

Source: https://habr.com/ru/post/908931/


All Articles