Fix Internet Explorer Stage Dimensions


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. stage.addEventListener(Event.RESIZE, resizeHandler);
  2. stage.dispatchEvent(new Event(Event.RESIZE)); // force stage resize event for normal cases
  3.  
  4. function resizeHandler(event:Event):void {
  5. if (stage.stageHeight > 0 && stage.stageWidth > 0) {
  6. stage.removeEventListener(Event.RESIZE, resizeHandler); // only execute once
  7. // your initialization code here
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.