scale the content of my swf without changing the proportions

Participant ,
Apr 10, 2021 Apr 10, 2021

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.

Views

83

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Apr 12, 2021 Apr 12, 2021
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

Likes

Translate

Translate
Adobe Community Professional ,
Apr 10, 2021 Apr 10, 2021

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.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 12, 2021 Apr 12, 2021

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

LATEST

Thank you very much for the answers. I'll investigate properly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines