mWindow.setSize()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 1.0;

Usage

mWindow.setSize(width:Number, height:Number) : Void

Parameters

width - New width of the CONTENT region of the window. If the window is created as a"Standard" type window, meaning it includes a OS supplied title bar (and window frame on Windows), the actual window width will be larger. The actual height is equal to the content width (height of the Flash content) plus the width of the window frame.

height - New height of the CONTENT region of the window. If the window is created as a"Standard" type window, meaning it includes a OS supplied title bar (and window frame on Windows), the actual window height will be larger. The actual height is equal to the content height (height of the Flash content) plus the height of the drag bar and window frame.

Returns

Nothing.

Description

Method; Changes the size of the window. The Stage.onResize event might be fired, depending on the scaling mode. For optimal performance, window size should always be as small as possible.

Example

The following example sets a new window size.

mWindow.setSize(300,100);

See Also

mWindow.getPosition(), mWindow.getSize(), mWindow.setPosition()

Code Examples

mProjector Class Basics