Width Problem with Firefox

Recently I ran into a problem that I had to build a Flash movie which should fit the browser window meaning the Flash movie is embedded with 100%x100%.
The problem I had is that even if I resized the browser window to something like 400×400 the stage.width property still showed 662. This caused that the content layout was wrong because it should take a width of 400 but used 662.

I investigated a bit more and it came out that this is caused by my Firefox browser where I tested the content. When I tested with Safari the minimal width my stage could get was 392 pixel. So WTF is happening here?

Then I tried to disable all Firefox toolbars and voilá, it worked like expected. Without any toolbar my flash content resized correctly to the actual size of the browser window.

Conclusion: Firefox with toolbars enabled prevents that the Flashplayer stage gets below a specific width depending on the stuff you have in your toolbar.
If you want to test small width Flash content which is embedded with 100%x100% be sure to disable all Firefox toolbars.

You can easily test it with this code for Flex:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
			private function resizeHandler(e:Event):void
				if(stage != null)
					trace("stage width " + stage.width);

1 comment to Width Problem with Firefox

  • Sam Spycher

    Hi Sönke

    I can confirm your issue:

    With the Firefox address bar onscreen, Firefox starts returning wrong window widths under about 550px. This is exactly when the address bar elements start reaching their minimal widths and are beginning to move off screen to the right. Removing the address bar causes this issue to disappear.

    The bug seems to have been reported here already: