I have an swf file which behaves strangely on IE. The thing is that a certain rectangle doesn’t get drawn when viewing the page after the first load. It only appears in IE and a quick fix is to make the path to the swf unique on every request so it doesn’t get cached. The rest of my objects gets drawn every time.
The code is very simple
public function drawStage() { var bgRect:Shape = new Shape(); bgRect.graphics.beginFill(0x5F5F5F); bgRect.graphics.drawRect(0,84, stage.stageWidth, 115); bgRect.graphics.endFill(); bgRect.alpha = 0; addChild(bgRect); Tweener.addTween(bgRect, { alpha: 1, time: 1 }); }
which is called in my constructor. The whole class can be seen here: http://katuaq.wwwdev.punktum.gl/flash/bioteaser.txt, and the swf live here: http://katuaq.wwwdev.punktum.gl/.
As you probably figured out by now, it’s the gray background behind the images that doesn’t get drawn on refresh in IE.
Don’t call drawStage from the constructor. Set up a listener for the ADDED_TO_STAGE event in the constructor, and call drawStage from the handler for this event. Additionally, you might find that your Stage dimensions change when the user uses the browser zoom function, so listen out for the RESIZE event and act accordingly.