Scalemode (Stage.scalemode Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

scaleMode (Stage.scaleMode property)

public static scaleMode :
Indicates the current scaling of the SWF file within Flash Player. The
forces the SWF file into a specific scaling mode. By default, the SWF file uses the HTML
parameters set in the Publish Settings dialog box.
The
property can use the values
scaleMode
. Any other value sets the
"noScale"
(Default) makes the entire Flash content visible in the specified area without
showAll
distortion while maintaining the original aspect ratio. Borders can appear on two sides of
the application.
scales the Flash content to fill the specified area, without distortion but possibly
noBorder
with some cropping, while maintaining the original aspect ratio of the application.
makes the entire Flash content visible in the specified area without trying to
exactFit
preserve the original aspect ratio. Distortion can occur.
makes the size of the Flash content fixed, so that it remains unchanged even as
noScale
the size of the player window changes. Cropping may occur if the player window is
smaller than the Flash content.
Note: the default setting is showAll, except when in test movie mode, where the default
setting is noScale
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example demonstrates various scale settings for the SWF file. Add a
ComboBox instance to your document with the instance name
following ActionScript to your FLA or AS file:
var scaleMode_cb:mx.controls.ComboBox;
scaleMode_cb.dataProvider = ["showAll", "exactFit", "noBorder", "noScale"];
var cbListener:Object = new Object();
cbListener.change = function(evt:Object) {
var scaleMode_str:String = evt.target.selectedItem;
Stage.scaleMode = scaleMode_str;
};
scaleMode_cb.addEventListener("change", cbListener);
624
ActionScript classes
String
"exactFit"
property to the default
scaleMode
scaleMode
,
,
"showAll"
"noBorder"
"showAll"
scaleMode_cb
property
, and
.
. Add the

Advertisement

Table of Contents
loading

Table of Contents