How can I determine when the end of an FLV is reached to unload it? Thank you.
Printable View
How can I determine when the end of an FLV is reached to unload it? Thank you.
Media.complete
Applies to
MediaDisplay, MediaPlayback
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.complete = function(eventObject){
// insert your code here
}
myMedia.addEventListener("complete", listenerObject)
Description
Event; notification that the playhead has reached the end of the media. The Media.complete event object has the following properties:
target A reference to the MediaDisplay or MediaPlayback instance.
type The string "complete".
Example
The following example uses an object listener to determine when the media has finished playing:
var myListener = new Object();
myListener.complete = function(eventObject) {
trace("media is Finished");
};
myMedia.addEventListener("complete", myListener);
Thank You!