Value
"TL"
"TR"
"BL"
"BR"
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.
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
the value of
Stage.scaleMode
Example
This example creates a new listener object called
and define a function that will be called when
onResize
adds the
myListener
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;
};
706
Chapter 7: ActionScript for Flash
Vertical
top
top
bottom
bottom
is
, the
noScale
height
is not
noScale
object to the callback list of the Stage object. Listener objects allow multiple
stageAlign_cb
property represents the height of Flash Player. When
,
represents the height of the SWF file.
height
. It then uses
stageListener
onResize
Horizontal
left
right
left
right
. Add the following
myListener
is triggered. Finally, the code
to call
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?