Table of Contents

Stage Object Flash 6

access to a movie's size, scale settings, and alignment

Properties

align

Placement of the movie in the Flash Player.

height

Pixel height of the available Flash Player display area or the author-time document height, depending on the value of scaleMode.

scaleMode

Dictates how the movie is sized, relative to the Player.

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 document 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


Table of Contents