Flash CS4 Professional ActionScript 2.0

Playing multiple FLV files

You can play FLV files sequentially in an FLVPlayback instance simply by loading a new URL in the contentPath property when the previous FLV file finishes playing. For example, the following ActionScript code listens for the complete event, which occurs when an FLV file finishes playing. When this event occurs, the code sets the name and location of a new FLV file in the contentPath property and calls the play() method to play the new video.

import mx.video.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/clouds.flv";
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
    if (my_FLVPlybk.contentPath == "http://www.helpexamples.com/flash/video/clouds.flv") {
        my_FLVPlybk.play("http://www.helpexamples.com/flash/video/water.flv");
    }
};
my_FLVPlybk.addEventListener("complete", listenerObject);