Width (Stage.width Property) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

To view another example, see the stagesize.fla file in the ActionScript samples Folder. The
following list provides typical paths to the ActionScript samples Folder:
Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript

width (Stage.width property)

public static width :
Property (read-only); indicates the current width, in pixels, of the Stage. When the value of
is
Stage.scaleMode
This means that
Stage.width
is not
Stage.scaleMode
author-time in the Document Properties dialog box. This means that the value of
stay constant as you resize the player window.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
This example creates a new listener object called
to call
stageListener
triggered. Finally, the code adds the
object. Listener objects allow multiple 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
align (Stage.align property)
(Stage.scaleMode property)
Number
, the
"noScale"
width
will vary as you resize the player window. When the value of
,
"noScale"
width
and define a function that will be called when
onResize
stageListener
,
height (Stage.height property)
property represents the width of Flash Player.
represents the width of the SWF file as set at
. It then uses
stageListener
object to the callback list of the Stage
will
width
is
onResize
,
scaleMode
Stage
625

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash lite 2

Table of Contents