Stage.width - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Stage.width

Availability
Flash Player 6.
Usage
Stage.width:Number
Description
Property (read-only); indicates the current width, in pixels, of the Stage. When the value of
Stage.scaleMode
means that
Stage.width
Stage.scaleMode
time in the Document Properties dialog box. This means that the value of
constant as you resize the player window.
Example
This example creates a new listener object called
and define a function that will be called when
onResize
adds the
myListener
objects to listen for resize notifications.
this.createTextField("stageSize_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
var stageListener:Object = new Object();
stageListener.onResize = function() {
stageSize_txt.text = "w:"+Stage.width+", h:"+Stage.height;
};
Stage.scaleMode = "noScale";
Stage.addListener(stageListener);
See also
Stage.align, Stage.height,
is
, the
"noScale"
width
will vary as you resize the player window. When the value of
is not
,
"noScale"
width
object to the callback list of the Stage object. Listener objects allow multiple
Stage.scaleMode
property represents the width of Flash Player. This
represents the width of the SWF file as set at author-
. It then uses
stageListener
onResize
will stay
width
myListener
is triggered. Finally, the code
Stage.width
to call
785

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents