Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > FLVPlayback Component > FLVPlayback class > FLVPlayback.setScale() | |||
Flash Player 8.
Flash Professional 8.
my_FLVplybk.setScale(xs:Number,ys:Number)
xs A number representing the horizontal scale.
ys A number representing the vertical scale.
Nothing.
Method; sets the scaleX and scaleY properties simultaneously. Because setting either one, individually, can cause automatic resizing, setting them simultaneously can be more efficient than setting the scaleX and scaleY properties, individually.
If autoSize is true, this method has no effect because the player sets its own dimensions. If the maintainAspectRatio property is true and autoSize is false, then changing scaleX or scaleY causes automatic resizing.
The following example calls the setScale() method to scale the horizontal (x) and vertical (y) dimensions of the FLVPlayback instance. The example sets the maintainAspectRatio property to false to prevent automatic resizing and allow the scaling to appear as specified.
Drag an FLVPlayback component to the Stage, and give it an instance name of my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the Timeline:
/** Requires: - FLVPlayback component on the Stage with an instance name of my_FLVPlybk */ import mx.video.*; my_FLVPlybk.maintainAspectRatio = false; my_FLVPlybk.setScale(200, 175); my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.scaleX, FLVPlayback.scaleY, FLVPlayback.setSize()
Flash CS3