
Stage.align
705
Returns
Nothing.
Description
Method; detects when a SWF file is resized (but only if
Stage.scaleMode = "noScale"
). The
addListener()
method doesn’t work with the default movie clip scaling setting (
showAll
) or
other scaling settings (
exactFit
and
noBorder
).
To use
addListener()
, you must first create a
listener object
. Stage listener objects receive
notification from
Stage.onResize
.
Example
This example creates a new listener object called
stageListener
. It then uses
myListener
to call
onResize
and define a function that will be called when
onResize
is triggered. Finally, the code
adds the
myListener
object to the callback list of the Stage object. Listener objects 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
Stage.onResize
,
Stage.removeListener()
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.
Value
Vertical
Horizontal
"T"
top
center
"B"
bottom
center
"L"
center
left
"R"
center
right
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...