views:

299

answers:

2
+1  Q: 

IE8 - Flash Issues

Has anyone ever encountered an issue like this with Flash[as3] in IE8?

I've noticed that when I first view my swf with IE8, that it all works and looks proper. However when I click refresh, a few items that use the stage.stageWidth and stage.stageHeight properties fail to function as they should.

This only happens on IE, been tested fine on Safari, Chrome, FF...

Is there any quick fix? I'd rather not have to rewrite large chunks of code...

A: 

How about passing the width and height from FlashVars instead of using stageWidth/stageHeight?

And have you set things like <param name="scale" value="noscale" /><param name="salign" value="tl" />?

Andy Li
A: 

Turns out this is a bug in IE.

If you refresh a flash project, at the moment its initialized, the stage.stageHeight and width will trace out as zero.

To fix this, I placed an event listener on the stage for a stage.RESIZE event, and once that happened I knew that IE would be able to report the correct dimensions and the rest of the swf would then load.

Conor