EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 641

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Stage.align 641
Stage.addListener()
Availability
Flash Player 6.
Usage
Stage.addListener(myListener)
Parameters
myListener
An object that listens for a callback notification from the Stage.onResize event.
Returns
Nothing.
Description
Method; detects when a SWF file is resized (but only if Stage.scaleMode = "noScale"). The
addListener() method doesnt work with the default movie scaling setting ("showAll") or
other scaling settings (
"exactFit" and "noBorder").
To u se
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 myListener. 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.
myListener = new Object();
myListener.onResize = function () { ... }
Stage.scaleMode = "noScale"
Stage.addListener(myListener);
See also
Stage.onResize
, Stage.removeListener()
Stage.align
Availability
Flash Player 6.
Usage
Stage.align
Description
Property; indicates the current alignment of the SWF file in the player or browser.

Table of Contents

Related product manuals