Posted By

n8gk on 11/25/09


Tagged

ie actionscript flash internet explorer 3 as3 adobe actionscript3 stagewidth


Versions (?)

stage.stageWidth workaround IE


 / Published in: ActionScript 3
 

  1. stop();
  2.  
  3. // this extra step is a needed workaround, for the " stage.stageWidth not reported correctly in IE7 " bug.
  4.  
  5. addEventListener(Event.ENTER_FRAME, added);
  6.  
  7. function added(e:Event):void
  8. {
  9. if (stage.stageWidth != 0)
  10. {
  11. gotoAndStop(2);
  12.  
  13. removeEventListener(Event.ENTER_FRAME, added);
  14. }
  15. }

Report this snippet  

You need to login to post a comment.