User Guide
632 FLVPlayback Component (Flash Professional Only)
FLVPlayback.preferredHeight
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
my_FLVPlybk.preferredHeight
Description
Property; a number that specifies the height of the source FLV file. This information is not
valid immediately upon calling the
play() or load() methods. It is valid when the ready
event starts. If the value of the
autoSize property or maintainAspectRatio property is
true, it is best to read the value when the resize event starts. Read-only.
Example
The following example sets the size of the FLVPlayback instance when the ready event
occurs. When the
cuePoint event occurs, it resets the size to the size specified by
preferredHeight and preferredWidth properties.
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.*;
var listenerObject:Object = new Object();
listenerObject.resize = function(eventObject:Object):Void {
trace("width is: " + my_FLVPlybk.width);
trace("height is: " + my_FLVPlybk.height);
};
my_FLVPlybk.addEventListener("resize", listenerObject);
listenerObject.ready = function(eventObject:Object):Void {
my_FLVPlybk.setSize(250, 350);
};