Stage
621
The following table lists the values for the
align
property. Any value not listed here centers
the SWF file in Flash player or browser area, which is the default setting.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
The following example demonstrates different alignments of the SWF file. Add a ComboBox
instance to your document with the instance name
stageAlign_cb
. Add the following
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
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.
Availability:
ActionScript 1.0; Flash Lite 2.0
Value
Vertical
Horizontal
"T"
top
center
"B"
bottom
center
"L"
center
left
"R"
center
right
"TL"
top
left
"TR"
top
right
"BL"
bottom
left
"BR"
bottom
right
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...