
Stage.addListener() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
793
showMenu Boolean; determines the items displayed in the Flash Player’s contextual
menu.
width Pixel width of the available Flash Player display area or the author-time docu-
ment width, depending on the value of
scaleMode.
Methods
addListener()
Registers an object to receive onResize() events.
removeListener()
Cancels event notices for the specified listener.
Listener Events
onResize() Occurs when movie is resized.
Description
The Stage object represents the characteristics of the Flash Player’s runtime display area. It
tells us the current dimensions of the movie, notifies us when the movie changes size, and
provides control over global movie settings, such as which options appear in the Player’s
contextual menu (brought up via right-click on Windows or Ctrl-click on Macintosh).
Mostly, the Stage object is used to adjust the visual layout of a movie when the browser or
Standalone Player is resized.
Note that Stage is a predefined object, not a class. Its properties and methods are accessed
directly, as in:
trace(Stage.width); // Displays the width of the movie
See Also
MovieClip._height, MovieClip._width
Stage.addListener() Method
registers an object to receive onResize() events
Flash 6
Stage.addListener(listener)
Arguments
listener