User Guide
Stage 1119
Method summary
Methods inherited from class Object
addListener (Stage.addListener method)
public static addListener(listener:Object) : Void
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 u s e
addListener(), you must first create a listener object. Stage listener objects receive
notification from
Stage.onResize.
Availability: ActionScript 1.0; Flash Player 6
Parameters
listener:Object - An object that listens for a callback notification from the
Stage.onResize event.
Example
This example creates a new listener object called
stageListener. It then uses
stageListener to call onResize and define a function that will be called when onResize is
triggered. Finally, the code adds the
stageListener 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();
Modifiers Signature Description
static addListener(listener
:Object) : Void
Detects when a SWF file is resized (but only if
Stage.scaleMode = "noScale").
static removeListener(liste
ner:Object) :
Boolean
Removes a listener object created with addListener().
addProperty (Object.addProperty method), hasOwnProperty
(Object.hasOwnProperty method), isPropertyEnumerable
(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf
method), registerClass (Object.registerClass method), toString
(Object.toString method), unwatch (Object.unwatch method), valueOf
(Object.valueOf method), watch (Object.watch method)