Addlistener (Stage.addlistener Method); Align (Stage.align Property) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

addListener (Stage.addListener method)

public static addListener(listener:Object) : Void
Detects when a SWF file is resized (but only if
method doesn't work with the default movie clip scaling setting (
addListener()
or other scaling settings (
To use
addListener()
notification from
Stage.onResize
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- An object that listens for a callback notification from the
listener:Object
event.
Stage.onResize
Example
This example creates a new listener object called
to call
stageListener
triggered. Finally, the code adds the
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
onResize (Stage.onResize event listener)
(Stage.removeListener method)

align (Stage.align property)

public static align :
Indicates the current alignment of the SWF file in the player or browser.
620
ActionScript classes
and
exactFit
noBorder
, you must first create a listener object. Stage listener objects receive
.
and define a function that will be called when
onResize
stageListener
String
Stage.scaleMode = "noScale"
).
. It then uses
stageListener
object to the callback list of the Stage
,
removeListener
). The
)
showAll
is
onResize

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash lite 2

Table of Contents