User Guide

FLVPlayback class 641
FLVPlayback.resize
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
var listenerObject:Object = new Object();
listenerObject.resize = function(eventObject:Object):Void {
// insert event-handling code here
};
my_FLVplybk.addEventListener("resize", listenerObject);
Description
Event; dispatched when video is resized. This occurs when you set the
visibleVideoPlayerIndex property and switch to a video player with different dimensions.
The event object has the properties
auto, x, y, width, height and vp, which is the index
number of the video player to which the event applies. For more information on the
vp
property, see
FLVPlayback.activeVideoPlayerIndex on page 549 and
FLVPlayback.visibleVideoPlayerIndex on page 688.
The
auto property is true when the resizing is automatic because the autoSize or
maintainAspectRatio property is true. In this case, the event might be dispatched for a
video player other than the visible video player. The event might be dispatched even if the
dimensions do not actually change after an attempt to automatically resize the component
occurs.
When the
auto property is false, the event always applies to the visible video player. The vp
property still appears but will always be equal to the
visibleVideoPlayerIndex property.
The component dispatches the event (with
auto set to false) when you set the
visibleVideoPlayerIndex property if you are switching to a video player with different
dimensions than the currently visible player.
Example
The following example plays two FLV files. It adds an ActionScript cue point to the first FLV
file and, when the
cuePoint event occurs, it switches to a second, smaller video player to play
the second FLV file. When it sets the
visibleVideoPlayerIndex property for the video
player, it triggers the
resize event, which displays the size and location of the current
video player.