User Guide
780 Chapter 2: ActionScript Language Reference
Stage.height
Availability
Flash Player 6.
Usage
Stage.height:Number
Description
Property (read-only); indicates the current height, in pixels, of the Stage. When the value of
Stage.scaleMode is noScale, the height property represents the height of Flash Player. When
the value of
Stage.scaleMode is not noScale, height represents the height of the SWF file.
Example
This example creates a new listener object called stageListener. It then uses myListener to call
onResize and define a function that will be called when onResize is triggered. Finally, the code
adds the
myListener object to the callback list of the Stage object. Listener objects allow multiple
objects to listen for resize notifications.
this.createTextField("stageSize_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
var stageListener:Object = new Object();
stageListener.onResize = function() {
stageSize_txt.text = "w:"+Stage.width+", h:"+Stage.height;
};
Stage.scaleMode = "noScale";
Stage.addListener(stageListener);
See also
Stage.align, Stage.scaleMode, Stage.width