View comments | RSS feed

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

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, __proto__, prototype, __resolve


Event summary

Event

Description

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, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

Comments


No screen name said on Sep 12, 2006 at 10:09 AM :
hi
how can i make the stage transparent?
thank's a lot
mijlee28 said on Jul 17, 2007 at 3:33 AM :
You make the flash file transparent in the emed tag as a paramater. If you use the SWFObject javascript embed technique there is an example of how to do this within the downloaded files.
No screen name said on May 25, 2008 at 4:15 AM :
Hi,

I see that Stage.height and .width are read-only. How do I set them in AS?
I wish to start with certain dimensions, and change them on the run.

Thanks,

TZ

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002688.html