User Guide
510 Chapter 6: Components Dictionary
Media class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > Media
ActionScript Class Names mx.controls.MediaController, mx.controls.MediaDisplay,
mx.controls.MediaPlayback
Each component class has a
version property, which is a class property. Class properties are
available only for the class itself. The
version property returns a string that indicates the version
of the component. To access this property, use the following code:
trace(mx.controls.MediaPlayback.version);
Note: The code
trace(myMediaInstance.version); returns undefined.
Method summary for the Media class
The following table lists methods of the Media class.
Method Components Description
Media.addCuePoint() MediaDisplay,
MediaPlayback
Adds a cue point object to the
component instance.
Media.associateController() MediaDisplay Associates a MediaDisplay instance with a
MediaController instance.
Media.associateDisplay() MediaController Associates a MediaController instance with a
MediaDisplay instance.
Media.displayFull() MediaPlayback Converts the component instance to full-screen
playback mode.
Media.displayNormal() MediaPlayback Converts the component instance back to its
original screen size.
Media.getCuePoint() MediaDisplay,
MediaPlayback
Returns a cue point object.
Media.pause() MediaDisplay,
MediaPlayback
Pauses the playhead at its current location in the
media Timeline.
Media.play() MediaDisplay,
MediaPlayback
Plays the media associated with the component
instance at a given starting point.
Media.removeAllCuePoints() MediaDisplay,
MediaPlayback
Deletes all cue point objects associated with a
given component instance.
Media.removeCuePoint() MediaDisplay,
MediaPlayback
Deletes a specified cue point associated with a
given component instance.
Media.setMedia() MediaDisplay,
MediaPlayback
Sets the media type and path to the specified
media type.
Media.stop() MediaDisplay,
MediaPlayback
Stops the playhead and moves it to position 0,
which is the beginning of the media.