624
ActionScript classes
scaleMode (Stage.scaleMode property)
public static scaleMode :
String
Indicates the current scaling of the SWF file within Flash Player. The
scaleMode
property
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
scaleMode
property can use the values
"exactFit"
,
"showAll"
,
"noBorder"
, and
"noScale"
. Any other value sets the
scaleMode
property to the default
"showAll"
.
■
showAll
(Default) makes the entire Flash content visible in the specified area without
distortion while maintaining the original aspect ratio. Borders can appear on two sides of
the application.
■
noBorder
scales the Flash content to fill the specified area, without distortion but possibly
with some cropping, while maintaining the original aspect ratio of the application.
■
exactFit
makes the entire Flash content visible in the specified area without trying to
preserve the original aspect ratio. Distortion can occur.
■
noScale
makes the size of the Flash content fixed, so that it remains unchanged even as
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
scaleMode_cb
. Add the
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);
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...