Language Version: | ActionScript 3.0 |
Product Version: | OSMF 4.0 |
Runtime Versions: | Flash Player 10, AIR 1.0 |
ScaleMode
controls the layout of out a single piece of content within a container.
There are four enumeration values,
NONE
,
STRETCH
,
LETTERBOX
, and
ZOOM
.
ScalableSprite
uses
ScaleMode
to calculate the layout.
public static const LETTERBOX:String = "letterbox"
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 4.0 |
Runtime Versions: | Flash Player 10, AIR 1.0 |
LETTERBOX
sets the width and height of the content as close to the container width and height
as possible while maintaining aspect ratio. The content is stretched to a maximum of the container bounds,
with spacing added inside the container to maintain the aspect ratio if necessary.
public static const NONE:String = "none"
NONE
implies that the media size is set to match its intrinsic size.
public static const STRETCH:String = "stretch"
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 4.0 |
Runtime Versions: | Flash Player 10, AIR 1.0 |
STRETCH
sets the width and the height of the content to the
container width and height, possibly changing the content aspect ratio.
public static const ZOOM:String = "zoom"
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 4.0 |
Runtime Versions: | Flash Player 10, AIR 1.0 |
ZOOM
is similar to LETTERBOX
, except that ZOOM
stretches the
content past the bounds of the container, to remove the spacing required to maintain aspect ratio.
This has the effect of using the entire bounds of the container, but also possibly cropping some content.