Example
The following example opens a pop-up window when the user clicks Play:
var myMediaListener = new Object()
myMediaListener.click = function(){
PopUpManager.createPopup(_root, mx.containers.Window, false, {contentPath:
movieSale});
}
myMedia.addEventListener("click", myMediaListener);
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
event object has the following properties:
A reference to the MediaDisplay or MediaPlayback instance.
target
The string
type
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);
.
"complete"
Media components (Flash Professional only)
Media.complete
521
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?