Changing size of window when testing Adobe AIR mobile applications

Im making a mobile phone Android application in Flash CS 5.5. I set the width/height of the stage to 480/800 px.

When I hit CTRL+ENTER to test run the application I get a window that is 480/800 px. It cannot be resized. I want to change the size of that window WITHOUT changing the stage width/height.

For example if I run the APK on a mobile phone with a 1000×1000 display the flash will scale automatically to fit the 480/800 stage to the 1000×1000 screen.

So it should be possible to change the window size to 1000×1000 without having to change the stage width/height.

But how?

Answer

I’m not sure I fully understand your question (or your issue) but I will try to answer that which I think you’re asking.

Try setting the [stage.scaleMode][1] to NO_SCALE. Then, at run-time check the stageWidth and stageHeight and build your scene based on those values. As a suggestion, when setting the stage.scaleMode try setting the align as well to TOP_LEFT. Unless the scaleMode is set to no_scale Flash automatically scales the declared stage dimensions to the dimensions of the container. If the scaleMode is set to no_scale then the declared dimensions are ignored and the dimensions of the container are used for the stage.

Attribution
Source : Link , Question Author : Peter , Answer Author : pjmorse

Leave a Comment