Stage

Object
    |
    +-Stage

public class Stage
extends Object

The Stage class is a top-level class whose methods, properties, and handlers you can access without using a constructor. Use the methods and properties of this class to access and manipulate information about the boundaries of a SWF file.

Availability: ActionScript 1.0; Flash Player 5 - (became a native object in Flash Player 6, which improved performance significantly).

Property summary

Modifiers

Property

Description

static

align:String

Indicates the current alignment of the SWF file in the player or browser.

static

displayState:String

Sets Flash Player to play the movie in full-screen mode or to take Flash Player out of full-screen mode.

static

height:Number

Property (read-only); indicates the current height, in pixels, of the Stage.

static

scaleMode:String

Indicates the current scaling of the SWF file within Flash Player.

static

showMenu:Boolean

Specifies whether to show or hide the default items in the Flash Player context menu.

static

width:Number

Property (read-only); indicates the current width, in pixels, of the Stage.

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


Event summary

Event

Description

onFullScreen = function(bFull:Boolean) {}

Invoked when the movie enters, or leaves, fullscreen mode.

onResize = function() {}

Invoked when Stage.scaleMode is set to noScale and the SWF file is resized.

Method summary

Modifiers

Signature

Description

static

addListener(listener:Object) : Void

Detects when a SWF file is resized (but only if Stage.scaleMode = "noScale").

static

removeListener(listener:Object) : Boolean

Removes a listener object created with addListener().

Methods inherited from class Object

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)