Skip to main content
Inspiring
February 26, 2013
Question

Browser window resize distorts contents for a moment

  • February 26, 2013
  • 1 reply
  • 716 views

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.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 26, 2013

are you using a resize listener?

Inspiring
February 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();

}

Nabren
Inspiring
February 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.