Media.playheadChange

Applies to

MediaController, MediaPlayback.

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

listenerObject = new Object();
listenerObject.playheadChange = function(eventObject){
    // Insert your code here.
}
myMedia.addEventListener("playheadChange", listenerObject)

Description

Event; broadcast by the MediaController or MediaPlayback component when the user moves the playback slider or clicks the Go to Beginning or Go to End button. The Media.playheadChange event object has the following properties:

detail A number that indicates the percentage of the media that has played.

type The string "playheadChange".

Example

The following example sends the percentage played to the Output panel when the user stops dragging the playhead:

var controlListen:Object = new Object();
controlListen.playheadChange = function(eventObj:Object) {
    trace(eventObject.detail);
};
myMedia.addEventListener("playheadChange", controlListen);

Flash CS3