Stage.align - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

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
SWF file in Flash player or browser area, which is the default setting.
Value
"T"
"B"
"L"
"R"
"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.
property. Any value not listed here centers the
align
Vertical
top
bottom
center
center
top
top
bottom
bottom
stageAlign_cb
Horizontal
center
center
left
right
left
right
left
right
. Add the following
Stage.align
779

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents