PrimaryFeather/Starling-Framework — Issue #53: Using StageScaleMode.NO_SCALE in IE will result in an exception (Error #3669 at flash.display3D::Context3D/configureBackBuffer())
Author: fnicollet
Created: 2011-12-04 23:53:50+00:00
State: open

Hi,
I have a bug which occur in IE (IE9 at least but it seems like a common IE problem). If I use this line:
stage.scaleMode = StageScaleMode.NO_SCALE;
Then I get an exception during Starling init:

Error: Error #3669: Taille d’entrée incorrecte.
at flash.display3D::Context3D/configureBackBuffer()
at starling.core::Starling/updateViewPort()[D:\workspaces\Flex\Flex_4.5_branch\StarlingLib\src\starling\core\Starling.as:233]
at starling.core::Starling/initializeGraphicsAPI()[D:\workspaces\Flex\Flex_4.5_branch\StarlingLib\src\starling\core\Starling.as:209]
at starling.core::Starling/onContextCreated()[D:\workspaces\Flex\Flex_4.5_branch\StarlingLib\src\starling\core\Starling.as:318]

When you get into the code, you can notice that the stageWidth and stageHeight are both at 0. It looks like a swfobject.js + IE problem, see this thread: http://www.actionscript.org/forums/showthread.php3?t=128143

Solution is to listen for the Event.RESIZE event on the stage passed to Starling and initialize the viewport once both dimensions are not zero. From my tests, it takes 2 resize events to get the correct dimensions.

Fabien