Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > Media components > Media.click | |||
MediaController, MediaPlayback.
Flash Player 7.
Flash MX Professional 2004.
var listenerObject:Object= new Object();listenerObject.click = function(eventObj:Object) {// ...};myMedia.addEventListener("click",listenerObject);
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".
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