• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

scale the content of my swf without changing the proportions

Contributor ,
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

216

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

Community Expert , 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

Votes

Translate

Translate
Community Expert ,
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.

 

 

Votes

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
Community Expert ,
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

Votes

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
Contributor ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

LATEST

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

Votes

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