Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
The VideoScaleMode class provides constant values to use for the
FLVPlayback.scaleMode
and
VideoPlayer.scaleMode
properties.
public static const EXACT_FIT:String = "exactFit"
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Specifies that the video be displayed at the
height and width specified by the registrationHeight
or height
and registrationWidth
or width
properties.
For example, if registrationWidth = width = 100
and
registrationHeight = height = 100
, if registrationX = 200
and
registrationY = 200
, and if an FLV file is loaded with a width
of 648 and
a height
of 480 (for an approximate aspect ratio of 4:3), and if
align = VideoAlign.CENTER
and scaleMode = EXACT_FIT
,
you end up with width = 100
, height = 100
, x = 200
,
and y = 200
.
public static const MAINTAIN_ASPECT_RATIO:String = "maintainAspectRatio"
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Specifies that the video be constrained within the
rectangle determined by the registrationX
, registrationY
,
registrationWidth
, and registrationHeight
properties but that its
original aspect ratio be preserved.
For example, if registrationWidth = 100
and
registrationHeight = 100
, if registrationX = 200
and
registrationY = 200
, and if an FLV file is loaded with a width
of 648 and
a height
of 480 (for an approximate aspect ratio of 4:3), and if
align = VideoAlign.CENTER
and scaleMode =
MAINTAIN_ASPECT_RATIO
, you end up with width =
100
, and height = (100 * 480 / 648) = 74
, x = 10
, and
y = (10 + ((100 - 74) / 2)) = 23
.
public static const NO_SCALE:String = "noScale"
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Specifies that the video be displayed at exactly the
height and width of the source video.
For example, if registrationWidth = 100
and
registrationHeight = 100
, if registrationX = 200
and
registrationY = 200
, and if an FLV file is loaded with a width
of 648 and
a height
of 480 (for an approximate aspect ratio of 4:3), and if
align = VideoAlign.CENTER
and scaleMode = NO_SCALE
,
you end up with width = 648
, height = 480
, x = (200 +
((100 - 648) / 2)) = -74
, and y = (200 + ((100 - 480) / 2)) =
10
.
© 2004-2007 Adobe Systems Incorporated. All rights reserved.
Tue Mar 18 2008, 12:59 PM GMT-07:00