User Guide

Stage.align 779
Stage.align
Availability
Flash Player 6.
Usage
Stage.align:String
Description
Property; indicates the current alignment of the SWF file in the player or browser.
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.
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.
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