User Guide
Stage.width 709
Description
Property; specifies whether to show or hide the default items in the Flash Player context menu. If
showMenu is set to true (the default), all context menu items appear. If showMenu is set to false,
only Settings and About Macromedia Flash Player items appear.
Example
The following example creates a clickable text link that lets the user enable and disable the Flash
Player context menu.
this.createTextField("showMenu_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
showMenu_txt.html = true;
showMenu_txt.autoSize = true;
showMenu_txt.htmlText = "<a href=\"asfunction:toggleMenu\"><u>Stage.showMenu =
"+Stage.showMenu+"</u></a>";
function toggleMenu() {
Stage.showMenu = !Stage.showMenu;
showMenu_txt.htmlText = "<a href=\"asfunction:toggleMenu\"><u>Stage.showMenu
= "+Stage.showMenu+"</u></a>";
}
See also
ContextMenu class, ContextMenuItem class
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 is "noScale", the width property represents the width of Flash Player. This
means that
Stage.width will vary as you resize the player window. When the value of
Stage.scaleMode is not "noScale", width represents the width of the SWF file as set at author-
time in the Document Properties dialog box. This means that the value of
width will stay
constant as you resize the player window.
Example
This example creates a new listener object called stageListener. It then uses myListener to call
onResize and define a function that will be called when onResize is triggered. Finally, the code
adds the
myListener object to the callback list of the Stage 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();