Height (Stage.height Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example demonstrates different alignments of the SWF file. Add a ComboBox
instance to your document with the instance name
ActionScript to your FLA or AS file:
var stageAlign_cb:mx.controls.ComboBox;
stageAlign_cb.dataProvider = ['T', 'B', 'L', 'R', 'TL', 'TR', 'BL', 'BR'];
var cbListener:Object = new Object();
cbListener.change = function(evt:Object) {
var align:String = evt.target.selectedItem;
Stage.align = align;
};
stageAlign_cb.addEventListener("change", cbListener);
Stage.scaleMode = "noScale";
Select different alignment settings from the ComboBox.

height (Stage.height property)

public static height : Number
Property (read-only); indicates the current height, in pixels, of the Stage. When the value of
is noScale, the height property represents the height of Flash Player. When
Stage.scaleMode
the value of
Stage.scaleMode
Availability: ActionScript 1.0; Flash Player 6
Example
This example creates a new listener object called
call
and define a function that will be called when
onResize
the code adds the
myListener
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
align (Stage.align property)
(Stage.width property)
stageAlign_cb
is not noScale, height represents the height of the SWF file.
stageListener
object to the callback list of the Stage object. Listener objects
,
scaleMode (Stage.scaleMode property)
. Add the following
. It then uses
myListener
is triggered. Finally,
onResize
,
Stage
to
width
1121

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF