Media.click

Applies to

MediaController, MediaPlayback.

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

var listenerObject:Object = new Object();
listenerObject.click = function(eventObj:Object) {
    // ...
};
myMedia.addEventListener("click", listenerObject);

Description

Event; broadcast when the user clicks the Play/Pause button. The detail field can be used to determine which button was clicked. The Media.click event object has the following properties:

detail The string "pause" or "play".

target A reference to the MediaController or MediaPlayback instance.

type The string "click".

Example

For a MediaController component instance named myMedia (and with a Window component in the library), the following example opens a pop-up window when the user clicks the Play/Pause button:

var myMediaListener:Object = new Object();
myMediaListener.click = function(eventObj:Object) {
    mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true);
};
myMedia.addEventListener("click", myMediaListener);

Flash CS3