Responding to Event.RESIZE. : Event : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Event »

 

Responding to Event.RESIZE.


 

package {
  import flash.display.*;
  import flash.net.*;
  import flash.events.*;

  public class Main extends Sprite {
    public function Main (  ) {
      stage.scaleMode = StageScaleMode.NO_SCALE;

      stage.addEventListener(Event.RESIZE, resizeListener);
    }

    private function resizeListener (e:Event):void {
      trace("The application window changed size!");
      trace("New width:  " + stage.stageWidth);
      trace("New height: " + stage.stageHeight);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Event