| Methods | Properties | Effects | Events | Styles | Frames | No Frames |
The MediaController control complements the MediaDisplay control by providing a user interface that controls media playback using standard controls such as play and pause. The MediaController never loads or plays back media itself, instead it controls playback in a MediaPlayback or MediaDisplay control. The MediaController control features a "drawer" which exposes the contents of the playback controls when the user positions the mouse over it.
MXML Syntax
The <mx:MediacController> tag inherits all the properties of its parent classes, and the following properties:
<mx:MediaController>
activePlayControl = "true|false"
associatedDisplay = "No default."
backgroundStyle = "default|none"
controllerPolicy = "auto|on|off"
enabled="true|false"
horizontal = "true|false"
playPercent = "No default."
volume="75"
click = "Event handler. No default."
playheadChange = "Event handler. No default."
volumeChange = "Event handler. No default."
scrubbing = "Event handler. No default.
/>
See Also
MediaDisplay
MediaPlayback
| Constructors | |
MediaController
(
)
Constructor. |
|
| Methods | |
| associateDisplay(
d:
mx.controls.MediaDisplay)
:
Void Associates this MediaController control with a MediaDisplay control and sets up the event listeners between the two. |
| contract(
force:
Boolean)
:
Void If the controllerPolicy is set to auto, contract, or collapse, the controller. |
| expand(
force:
Boolean)
:
Void If the controllerPolicy property is set to auto, expand the controller. |
| isScrubbing(
)
:
Boolean Determines whether the user is moving the thumb on the playback bar. |
| Methods inherited from class mx.core.UIComponent |
drawFocus
getFocus
getFocusManager
setEnabled
setFocus
|
| Properties | |
| activePlayControl:
String Specifies the play state of the associated MediaDisplay control when loaded at runtime. |
| associatedDisplay:
var
[Write-Only]
The string name of the MediaDisplay control associated with the MediaController control. |
| backgroundStyle:
String If set to default, the component draws the chrome background. |
| controllerPolicy:
String Indicates how the controller behaves upon mouse interaction. |
| expanded:
Boolean
[Read-Only]
Returns true if the controller has been expanded. |
| horizontal:
Boolean If true, displays the control with a horizontal setting, and tracks the media from left to right. |
| playing:
Boolean Determines whether the controller is currently playing media. |
| playPercent:
Number The percentage amount of the media that has already been played |
| playTime:
Number The current playhead position in milliseconds |
static | version:
StringMediaComponentVersion is for internal use only. |
| volume:
Number The volume level, specified by an integer from 0 to 100. |
| Properties inherited from class mx.core.UIComponent |
enabled
errorString
tabEnabled
tabIndex
version
|
| Effects |
| Effects inherited from class mx.core.UIComponent |
focusInEffect
focusOutEffect
|
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
hideEffect
mouseDownEffect
mouseOutEffect
mouseOverEffect
mouseUpEffect
moveEffect
resizeEffect
showEffect
|
| Events | |
click | Broadcasts when the user clicks the Play/Pause button. The event object contains the properties: - detail contains the string pause or play.- target contains a reference to the control.- type contains the event name, click. |
playheadChange | Broadcasts when a user moves the playback slider or clicks the Go to Beginning or Go to End button. the event object contains the following properties: - detail contains a number with the percent completed.- target contains a reference to the control.- type contains the event name, playheadChange. |
scrubbing | Broadcasts when the user moves the thumb on the playback bar back and forth. The target property of the event object contains a reference to the component that triggered the event. The type property contains the name of the event, scrubbing. |
volumeChange | Broadcasts when the user adjusts the volume. In MXML, use volumeChange as the property name. In ActionScript, use volume. The event object contains the following properties: - detail contains an integer between 0 (minimum) and 100 (maximum) to indicate volume.- target contains a reference to the control.- type contains the event name, volumeChange. |
| Events inherited from class: mx.core.UIComponent |
focusIn focusOut invalid keyDown keyUp valid valueCommitted |
| Styles |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
horizontalGap
leading
marginLeft
marginRight
textAlign
textDecoration
textIndent
verticalGap
|
| Constructor Detail |
MediaController(
)
| Method Detail |
associateDisplay(
d:
mx.controls.MediaDisplay)
:
Void
Parameters
d:
mx.controls.MediaDisplay - MediaDisplay instance.
contract(
force:
Boolean)
:
Void
controllerPolicy is set to auto, contract, or collapse, the controller. Otherwise, do nothing, unless force is true.
Parameters
force:
Boolean - If true, contract the controller.
expand(
force:
Boolean)
:
Void
controllerPolicy property is set to auto, expand the controller. Otherwise, do nothing, unless force is true.
Parameters
force:
Boolean - If true, expand the controller.
isScrubbing(
)
:
Boolean
| Property Detail |
activePlayControl:
String
play, which plays the media file on load. Set this property to the same value as the autoPlay property of the associated MediaDisplay control.
associatedDisplay:
var
[Write-Only]
backgroundStyle:
String
default, the component draws the chrome background. If set to none, the component does not draw the chrome background. The default value is default.
controllerPolicy:
String
on, off, and auto.on The controller is always expanded.off The controller is always contracted (collapsed) and can only be expanded programmatically.auto The controller is initially contracted. It expands when the mouse rolls over, and then contracts when the mouse rolls off.
expanded:
Boolean
[Read-Only]
true if the controller has been expanded. Useful when the controllerPolicy property is set to auto.
horizontal:
Boolean
true, displays the control with a horizontal setting, and tracks the media from left to right. If false, displays with a vertical orientation, and tracks the media from bottom to top. The default value is true.
playing:
Boolean
playPercent:
Number
playTime:
Number
static
version:
String
volume:
Number
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/15/asdocs_en/mx/controls/MediaController.html