ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.video 

VideoScaleMode  - AS3 Flash

Packagefl.video
Classpublic final class VideoScaleMode
InheritanceVideoScaleMode Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The VideoScaleMode class provides constant values to use for the FLVPlayback.scaleMode and VideoPlayer.scaleMode properties.

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
Public Methods
 MethodDefined By
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined By
  EXACT_FIT : String = "exactFit"
[static] Specifies that the video be displayed at the height and width specified by the registrationHeight or height and registrationWidth or width properties.
VideoScaleMode
  MAINTAIN_ASPECT_RATIO : String = "maintainAspectRatio"
[static] 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.
VideoScaleMode
  NO_SCALE : String = "noScale"
[static] Specifies that the video be displayed at exactly the height and width of the source video.
VideoScaleMode
Constant Detail

EXACT_FIT

Constant
public static const EXACT_FIT:String = "exactFit"

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.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.

MAINTAIN_ASPECT_RATIO

Constant 
public static const MAINTAIN_ASPECT_RATIO:String = "maintainAspectRatio"

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.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.

NO_SCALE

Constant 
public static const NO_SCALE:String = "noScale"

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.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.