title: Stage.RESIZE : Is it possible to run this example in a browser?
body: <p>Is it possible to run this simple code in a browser?
  In the .swf all seems to work fine, but I'm unable to resize the .swf in a browser...
  The stage is not resizing in an HTML page.
  Through the .swf flile it works like a charm.
  Do somebody have an idea about this issue?</p>
  
  <pre><code>package com{
      import flash.display.Graphics;
      import flash.display.MovieClip;
      import flash.display.Stage;
      import flash.display.StageAlign;
      import flash.display.StageQuality;
      import flash.display.StageScaleMode;
      import flash.events.Event;
      import flash.text.TextField;
  
  public class Main extends MovieClip{
      private static const ORANGE:int = 0xff9900;
      var bg:MovieClip;
      var bg_mask:MovieClip;
      var marginx:int = 10;
      var marginy:int = 10;
      var display:MovieClip;
      var displayTextField:TextField;
      var ellipseWidth:int = 90;
      var ellipseHeight:int = 90;
      public function Main(){
          super();
          bg = new MovieClip();
          bg_mask = new MovieClip();
          display = new MovieClip();
          displayTextField = new TextField();
          this.addChild(bg);
          this.addChild(bg_mask);
          this.addChild(display);
          this.display.addChild(displayTextField);
          displayTextField.text = "";
          displayTextField.x = ellipseWidth/Math.PI;
          displayTextField.y = ellipseHeight/Math.PI;
          stage.align = StageAlign.TOP_LEFT;  // or StageAlign.TOP
          stage.scaleMode = StageScaleMode.NO_SCALE;
          drawBackground();
          display.mask = bg_mask;
          addListeners();
      }
      private function drawBackground(thickness:int=1,lineColor:int=0x000000,lineAlpha:Number=0.5,fillColor:int=ORANGE,fillAlpha:Number=0.5):void{
          var g:Graphics = bg.graphics;
          g.clear();
          g.lineStyle(thickness,lineColor,lineAlpha);
          g.beginFill(fillColor,fillAlpha);
          g.drawRoundRect(marginx,marginy,this.stage.stageWidth-marginx*2,this.stage.stageHeight-marginy*2,ellipseWidth,ellipseHeight);
          g.endFill();
      }
      private function drawMask():void{
          var g:Graphics = bg_mask.graphics;
          g.clear();
          g.lineStyle(1,0x000000,0.3);
          g.beginFill(0xcccccc,0.1);
          g.drawRoundRect(marginx,marginy,this.stage.stageWidth-marginx*2,this.stage.stageHeight-marginy*2,90,90);
          g.endFill();
      }
      private function addListeners():void{
          stage.addEventListener(Event.ADDED,updateLabel);
          stage.addEventListener(Event.RESIZE,updateLabel);
      }
      private function updateLabel(e:Event):void{
          updateDisplay();
          drawBackground();
          drawMask();
      }
      private function updateDisplay():void{
          var tf:TextField = displayTextField;
          tf.text = ("{" + this.stage.stageWidth + ";" + this.stage.stageHeight + "}");
      }
  }
  </code></pre>
  
  <p>}</p>