User Guide
862 Media components (Flash Professional only)
Example
The following example uses an object listener to determine when the media has
finished playing:
var myListener:Object = new Object();
myListener.complete = function(eventObj:Object) {
trace("media is Finished");
};
myMedia.addEventListener("complete", myListener);
Media.contentPath
Applies to
MediaDisplay, MediaPlayback.
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
myMedia.contentPath
Description
Property; a string that holds the relative path and filename of the media to be streamed and/or
played. Setting the
contentPath property is equivalent to calling the Media.setMedia()
method without specifying a
mediaType parameter. When no mediaType parameter is set
with
Media.setMedia(), the default type is FLV. The default value of the contentPath
property is
undefined.
Example
The following example displays the name of the media playing in a text box:
myTextField.text = myMedia.contentPath;
See also
Media.setMedia()