title: How to prevent Event.Resize to trigger twice on displayState change to FULL_SCREEN?
body: <p>I have an application with an fullscreen button, when that button is clicked I change the displayState of stage to <code>StageDisplayState.FULL_SCREEN_INTERACTIVE</code>. </p>
  
  <p>That makes <code>Event.RESIZE</code> fire twice if <code>stage.scaleMode = StageScaleMode.NO_SCALE</code>. </p>
  
  <p>The event is only fireing once if i change back to <code>stage.displayState = StageDisplayState.NORMAL</code>.</p>
  
  <p>Anyone know a good way to prevent the Event.RESIZE from fireing twice except calling the onResize function directly or implementing a custom event?</p>
  
  <p>Sample code that reproduces the issue:</p>
  
  <pre><code>package test
  {
      import flash.display.Sprite;
      import flash.display.StageDisplayState;
      import flash.display.StageScaleMode;
      import flash.events.Event;
      import flash.events.MouseEvent;
  
      public class Main extends Sprite 
      {
  
          public function Main():void 
          {
              if (stage) 
                  this.init();                
              else 
                  this.addEventListener(Event.ADDED_TO_STAGE, init);
          }
  
          private function init(e:Event = null):void 
          {
              this.removeEventListener(Event.ADDED_TO_STAGE, init);
              stage.addEventListener(Event.RESIZE, onResize);
              stage.scaleMode = StageScaleMode.NO_SCALE;
  
              var button:Sprite = new Sprite();
              button.mouseEnabled = true;
              button.addEventListener(MouseEvent.CLICK, doResize);
              button.graphics.lineStyle(3,0x00ff00);
              button.graphics.beginFill(0x0000FF);
              button.graphics.drawRect(10, 10, 100, 100);
              button.graphics.endFill();
  
              this.addChild(button);
          }
  
          private function doResize(e:MouseEvent) : void {
              if (stage.displayState == StageDisplayState.NORMAL) {
                  stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;                
              }
              else {
                  stage.displayState = StageDisplayState.NORMAL;
              }           
          }
  
          private function onResize(e:Event) : void {
              trace("onResize", stage.displayState);
          }       
      }   
  }
  </code></pre>
  
  <p>Further investigation shows that it seems like switching to fullscreen is two steps, first one resize to a <code>StageDisplayState.NORMAL</code> and then to <code>StageDisplayState.FULL_SCREEN_INTERACTIVE</code>.</p>