Copy link to clipboard
Copied
Good Morning. I want to scale all the content in my application to adapt to any mobile device so that the content objects grow or shrink adapting to any screen, but without distorting. I am investigating with stage.scaleMode, but all the options they give have some problem.
I have read with with StageScaleMode.NON_SCALE, combined with a RESIZE event, you can fit all the content to the window, while maintaining the size and proportions of the individual assets.
What I really want is for the objects to adapt to any window and grow, but not distorted and not cut ... perhaps this is not possible.
Any ideas?. This is my code.
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener (Event.RESIZE, resizeListener);
function resizeListener (e:Event):void{
}
I'm putting it in the first frame of the action panel. What I think I am missing is the content of resizeListener
Thank you very much for the help.
Hi.
If you want your content to be truly responsive, you will need to scale and position the instances individually, just as it is done in web development and virtually any other technology today.
Here is a sample:
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/as3/responsive_app_game_structure
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
correct, you can NOT resize, maintain aspect ratio and fill the screen (unless that screen has the matching aspect ratio.
Copy link to clipboard
Copied
Hi.
If you want your content to be truly responsive, you will need to scale and position the instances individually, just as it is done in web development and virtually any other technology today.
Here is a sample:
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/as3/responsive_app_game_structure
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
Thank you very much for the answers. I'll investigate properly.