MovieClip +--mx.core.UIObject +--mx.core.UIComponent +--mx.controls.MediaController
MediaController contains the playback controls for controlling streaming media files.
_activePlayControl
, _animating
, _animationOpen
, _animationStart
, _backgroundStyle
, _buttons
, _chrome
, _closeId
, _controllerPolicy
, _deadPreview
, _enabled
, _horizontal
, _isOpen
, _isPlaying
, _lastProgressMediaType
, _listenForPlayheadMoveEvent
, _loadBar
, _loadPercent
, _miniPlayBar
, _notAnimating
, _openId
, _openUpOrLeft
, _playBar
, _playPercent
, _playTime
, _priorMouseOver
, _priorPolicy
, _screenAccommodator
, _secondChrome
, _secondChromeClosedHeight
, _secondChromeClosedWidth
, _secondChromeFixedEnd
, _secondChromeOpenHeight
, _secondChromeOpenWidth
, _strings
, _volume
, _volumeControl
, activePlayControl
, ANIMATION_TIME
, backgroundStyle
, className
, clipParameters
, CLOSE_DELAY
, CLOSED_HORIZONTAL_HEIGHT
, CLOSED_VERTICAL_WIDTH
, controllerPolicy
, enabled
, expanded
, H_BORDER
, horizontal
, lastProgressMediaType
, LOADBAR_HORIZONTAL_CLOSED_Y
, LOADBAR_HORIZONTAL_OPEN_Y
, LOADBAR_VERTICAL_CLOSED_X
, LOCALIZED_FILE
, MINIMUM_HORIZONTAL_OPEN_HEIGHT
, MINIMUM_HORIZONTAL_WIDTH
, MINIMUM_VERTICAL_HEIGHT
, MINIMUM_VERTICAL_OPEN_WIDTH
, MINIPLAYBAR_VERTICAL_CLOSED_X
, OPEN_DELAY
, playAtBeginning
, playing
, playPercent
, playTime
, symbolName
, symbolOwner
, V_BORDER
, volume
clipParameters
, drawFocus
, enabled
, focusEnabled
, focusManager
, focusTextField
, groupName
, height
, kStretch
, mergedClipParameters
, origBorderStyles
, origBorderValues
, popUp
, symbolName
, symbolOwner
, tabEnabled
, tabIndex
, width
__height
, __onUnload
, __width
, _color
, _endInit
, _id
, _maxHeight
, _maxWidth
, _minHeight
, _minWidth
, _preferredHeight
, _preferredWidth
, _tf
, _topmost
, addEventListener
, bottom
, buildDepthTable
, changeColorStyleInChildren
, changeTextStyleInChildren
, childrenCreated
, className
, clipParameters
, color
, createAccessibilityImplementation
, createChildAtDepth
, createClassChildAtDepth
, createEvent
, dispatchEvent
, embedFonts
, findNextAvailableDepth
, fontFamily
, fontSize
, fontStyle
, fontWeight
, handleEvent
, height
, idNames
, ignoreClassStyleDeclaration
, initProperties
, invalidateFlag
, left
, lineColor
, lineWidth
, marginLeft
, marginRight
, methodTable
, minHeight
, minWidth
, notifyStyleChangeInChildren
, removeEventListener
, right
, scaleX
, scaleY
, setStyle
, stylecache
, styleName
, symbolName
, symbolOwner
, tabEnabled
, textAlign
, textColorList
, textDecoration
, textIndent
, tfList
, top
, validateNow
, visible
, width
, x
, y
_alpha
, _currentframe
, _droptarget
, _focusrect
, _framesloaded
, _height
, _lockroot
, _name
, _parent
, _quality
, _rotation
, _soundbuftime
, _target
, _totalframes
, _url
, _visible
, _width
, _x
, _xmouse
, _xscale
, _y
, _ymouse
, _yscale
, enabled
, focusEnabled
, hitArea
, tabChildren
, tabEnabled
, tabIndex
, tooltipText
, trackAsMenu
, useHandCursor
static symbolName:String
static symbolOwner:Object
className:String
clipParameters:Object
static private MINIMUM_HORIZONTAL_WIDTH:Number
static private CLOSED_HORIZONTAL_HEIGHT:Number
static private MINIMUM_HORIZONTAL_OPEN_HEIGHT:Number
static private LOADBAR_HORIZONTAL_CLOSED_Y:Number
static private LOADBAR_HORIZONTAL_OPEN_Y:Number
static private MINIMUM_VERTICAL_HEIGHT:Number
static private CLOSED_VERTICAL_WIDTH:Number
static private MINIMUM_VERTICAL_OPEN_WIDTH:Number
static private LOADBAR_VERTICAL_CLOSED_X:Number
static private MINIPLAYBAR_VERTICAL_CLOSED_X:Number
static private ANIMATION_TIME:Number
static private CLOSE_DELAY:Number
static private OPEN_DELAY:Number
static private LOCALIZED_FILE:String
static private H_BORDER:Number
static private V_BORDER:Number
private _deadPreview:MovieClip
private _controllerPolicy:String
private _horizontal:Boolean
private _buttons:MovieClip
private _loadBar:LoadBar
private _playBar:PlayBar
private _miniPlayBar:MiniPlayBar
private _volumeControl:VolumeControl
private _chrome:Chrome
private _backgroundStyle:String
private _isOpen:Boolean
private _priorMouseOver:Boolean
private _animationStart:Number
private _animationOpen:Boolean
private _closeId:Number
private _openId:Number
private _notAnimating:Boolean
private _animating:Boolean
private _listenForPlayheadMoveEvent:Boolean
private _activePlayControl:String
private _isPlaying:Boolean
private _volume:Number
private _playPercent:Number
private _playTime:Number
private _loadPercent:Number
private _strings:Object
private _secondChrome:Chrome
private _secondChromeClosedHeight:Number
private _secondChromeOpenHeight:Number
private _secondChromeClosedWidth:Number
private _secondChromeOpenWidth:Number
private _secondChromeFixedEnd:Boolean
private _openUpOrLeft:Boolean
private _enabled:Boolean
private _priorPolicy:String
public playAtBeginning:Boolean
private _lastProgressMediaType:String
public lastProgressMediaType:String [Read Only]
private _screenAccommodator:ScreenAccommodator
public expanded:Boolean [Read Only]
public controllerPolicy:String
Indicates how the controller behaves wrt mouse interaction. 3 allowable settings: on: always expanded off: always contracted (must be expanded programmatically) auto: initially contracted. expands when mouse rolls over, contracts when mouse rolls off.
public horizontal:Boolean
public volume:Number
public backgroundStyle:String
Should the component draw chrome?
public activePlayControl:String
The active play control must be either play or pause. It must be writable so it can be set by the properties inspector. It only pertains to the starting state of the component and should *not* be written under normal circumstances.
public playing:Boolean
public playTime:Number
public playPercent:Number
public enabled:Boolean
private function initializeParameters():Void
Create default values for absent parameters
private function drawChrome(wi:Number, he:Number):Void
Draw the chrome for the controller.
- Parameters
public function addSecondChrome(theChrome:Chrome, closedHeight:Number, openHeight:Number, closedWidth:Number, openWidth:Number, fixedEnd:Boolean):Void
Add a second chrome to the control. This is used to allow the controller to animate the chrome of the player in auto mode.
public function removeSecondChrome():Void
Remove the second chrome instance from the controller.
public function onMouseMove():Void
Manually monitor mouse movement. It would be nice to use the onRollOver and onRollOut functions but those will prevent mouse events from reaching the contained clips. No good. Instead we manually track mouse movement.
public function expand(force:Boolean):Void
If policy is auto for this clip, expand the controller. Otherwise, do nothing. Unless forced.
public function contract(force:Boolean):Void
If policy is auto for this clip, contract it. Otherwise, do nothing. Unless forced.
private function animate():Void
Animate the transition. This is called as an onEnterFrame function.
private function sizeMainChrome(portion:Number):Void
Size the main chrome according to the portion parameter.
- Parameters
portion
A number between 0 and 1 (inclusive) indicating how far along the animation has progressed.
private function animateBars(portion:Number):Void
Move and size the load and play bars during the opening and closing animations.
public function getLoadPercent():Number
This function is only for the internal use of the the controller. It is public so that subclips can access it.
public function broadcastEvent(eventType:String, detailArg):Void
Broadcast an event.
- Parameters
eventType
The type of event (play, stop, pause, etc) detailArg
An additional parameter for the specific event type
public function handleEvent(ev:Object):Void
Handle events for which the controller listens
public function isListeningForPlayheadMoveEvent():Boolean
- Return
- True if the controller is listening for playhead move events. False if not.
public function setListeningForPlayheadMoveEvent(listen:Boolean):Void
- Return
- True if the controller is listening for playhead move events. False if not.
private function handleChangeEvent(ev:Object):Void
Handle a change event. Position the playbar to show the the current play position. Save the data in the controller so the playbar can subsequently be initialized properly.
private function handleProgressEvent(ev:Object):Void
Handle a progress event. Position the load bar to show the percentage of the media that has loaded.
public function evaluateToEnd():Void
Enable or disable the toEnd button, as appropriate.
private function handleUnrecognizedEvent(ev:Object):Void
Handle an unrecognized event
private function createDefaultStrings():Void
Create default localized strings to use (a) while loading occurs or (b) if loading fails.
public function getLocalizedString(id:String):String
- Parameters
- Return
- The value of the string
public function associateDisplay(d:MediaDisplay):Void
Associated this controller with a display. Set up the event listeners between the two.