User Guide
Playing multiple FLV files 523
my_FLVPlybk.visibleVideoPlayerIndex = 0; // make the 1st player
visible
my_FLVPlybk.play(); // begin playing the 1st player
}
}
// add listener for a cuePoint event
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
listenerObject.complete = function(eventObject:Object):Void {
trace("Hit complete event for player: " + eventObject.vp);
if (eventObject.vp == 0) {
my_FLVPlybk.activeVideoPlayerIndex = 1;
my_FLVPlybk.visibleVideoPlayerIndex = 1;
my_FLVPlybk.play();
} else {
my_FLVPlybk.closeVideoPlayer(1);
}
}
my_FLVPlybk.addEventListener("complete", listenerObject);
When you create a new video player, the FLVPlayback instance sets its properties to the value
of the default video player, except for the
contentPath, totalTime, and isLive properties,
which the FLVPlayback instance always sets to the default values: empty string, 0, and
false,
respectively. It sets the
autoPlay property, which defaults to true for the default video player,
to
false. The cuePoints property has no effect, and it has no effect on a subsequent load
into the default video player.
The methods and properties that control volume, positioning, dimensions, visibility, and user
interface controls are always global and their behavior is not affected by setting the
activeVideoPlayerIndex property. For more information on these methods and properties
and the effect of setting the
activeVideoPlayerIndex property, see
FLVPlayback.activeVideoPlayerIndex on page 549. The remaining properties and
methods target the video player identified by the value of the
activeVideoPlayerIndex
property.
Properties and methods that control dimensions do interact with the
visibleVideoPlayerIndex property, however. For more information, see
“FLVPlayback.visibleVideoPlayerIndex” on page 688.