Techblog

Tech Blog

Our latest geek adventures!

Posts Tagged ‘Internet Explorer’

13 March SWF and Internet Explorer

After some diggin’ I finally figured out why Internet Explorer didn’t display my SWF movie. The width and the height of my movie are related to the width and height of the Stage. It seems that in IE the Stage isn’t available in the first frame. Therefore the movie has to wait a frame before it can acces the Stage properties.

public function Application() {
  addEventListener( Event.ENTER_FRAME, onEnterFrame );
}
private function onEnterFrame( pEvent:Event ) : void {
  removeEventListener( Event.ENTER_FRAME, onEnterFrame );
  setWidth( stage.stageWidth );
  setHeight( stage.stageHeight );
}

3 Comments - Tags: ,