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

Browser window resize distorts contents for a moment

Participant ,
Feb 26, 2013 Feb 26, 2013

Hi.

I'm working on a project for a website and I've so far created some menus. You can see it here: http://ecstweb.comuv.com/temp/f1/site_fc.html

I'm using Flash CS6 on OSX and I tested this in Firefox and Safari.

The menus are movie clips containing the menu items, which are sprites with classic text fields and shapes for the backgrounds. The fonts are embedded and the animations are tweens. All of this is generated at runtime.

When I resize the browser window, the whole content distorts during the resizing and then goes back to the correct proportions when I stop. Is there a way to prevent this distortion?

Thank you.

TOPICS
ActionScript
687
Translate
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 ,
Feb 26, 2013 Feb 26, 2013

are you using a resize listener?

Translate
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 ,
Feb 27, 2013 Feb 27, 2013

Yes. I have this in my document class:

public function Main() {

            addEventListener(Event.ADDED_TO_STAGE, iniciate);

            stage.addEventListener(Event.RESIZE, resizeAdjust);

}

private function iniciate(e:Event):void {

            removeEventListener(Event.ADDED_TO_STAGE, iniciate);

            stage.align = StageAlign.TOP_LEFT;

            stage.scaleMode = StageScaleMode.NO_SCALE;

}

private function resizeAdjust(e:Event):void {

            //Menu alignment.

            _mMainMenu.x = (stage.stageWidth - _mMainMenu.width)/2;

            _mTopMenu.x = (stage.stageWidth - _mTopMenu.width)/2;

            //Background image scaling

            _mBackground.scaleBg();

}

Translate
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
Engaged ,
Feb 27, 2013 Feb 27, 2013

This may not do anything but one thing you could try is adding this to the end of your resizeAdjust function:

new MouseEvent("").updateAfterEvent();

EDIT: However, it is working fine in Chrome on Windows so it might just be a browser/OS issue.

Translate
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 ,
Feb 27, 2013 Feb 27, 2013
LATEST

Thanks. Tried your addition but it remains the same. Also tried just adding a text field to the stage and not adding the background and menus, and I got the same problem, so maybe it's just the way it's supposed to be and I think the whole jerky scaling is weird.

I'll try to see it in windows to see if I can spot any differences.

Translate
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