MovieClip +--mx.core.UIObject +--mx.core.UIComponent +--mx.controls.MediaDisplay
ICuePointHolder
MediaDisplay plays FLV and MP3 files.
_aspectRatio
, _autoPlay
, _autoSize
, _contentPath
, _cuePoints
, _deadPreview
, _enabled
, _fireCuePoints
, _fullyLoaded
, _mediaType
, _mostRecentCuePoint
, _playerImpl
, _playingBeforeDisabled
, _pollId
, _priorBytesLoaded
, _priorTime
, _processor
, _screenAccommodator
, _scrubbing
, _sendCompleteEvent
, _soundHolder
, _started
, _startingTime
, _toggleControl
, _totalTime
, _videoHolder
, aspectRatio
, autoPlay
, autoSize
, bytesLoaded
, bytesTotal
, className
, clipParameters
, contentPath
, cuePoints
, enabled
, fps
, initCuePointNames
, initCuePointTimes
, makeVideoVisible
, mediaType
, mostRecentCuePoint
, mostRecentCuePointName
, mostRecentCuePointTime
, playheadTime
, playing
, preferredHeight
, preferredWidth
, symbolName
, symbolOwner
, totalTime
, videoHeight
, videoWidth
, 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
new MediaDisplay()
static symbolName:String
static symbolOwner:Object
className:String
clipParameters:Object
public fps:Number
public initCuePointNames:Array
public initCuePointTimes:Array
private _contentPath:String
private _mediaType:String
private _autoSize:Boolean
private _aspectRatio:Boolean
private _autoPlay:Boolean
private _deadPreview:MovieClip
private _toggleControl:FullScreenToggle
private _playerImpl:IPlayer
private _videoHolder:MovieClip
private _soundHolder:MovieClip
private _processor:MovieClip
private _priorTime:Number
private _priorBytesLoaded:Number
private _cuePoints:Array
private _mostRecentCuePoint
private _scrubbing:Boolean
private _fireCuePoints:Boolean
private _startingTime:Number
private _totalTime:Number
private _started:Boolean
private _sendCompleteEvent:Boolean
private _fullyLoaded:Boolean
private _enabled:Boolean
private _playingBeforeDisabled:Boolean
private _pollId:Number
public makeVideoVisible:Boolean
private _screenAccommodator:ScreenAccommodator
public videoWidth:Number [Read Only]
public videoHeight:Number [Read Only]
public preferredWidth:Number [Read Only]
public preferredHeight:Number [Read Only]
public autoSize:Boolean
public aspectRatio:Boolean
public autoPlay:Boolean
Autoplay is strictly an initialization parameter.
public playheadTime:Number
public contentPath:String
Create a contentPath property.
public volume:Number
public playing:Boolean [Read Only]
public bytesLoaded:Number [Read Only]
public bytesTotal:Number [Read Only]
public mediaType:String
public totalTime:Number
public cuePoints:Array
public mostRecentCuePoint:CuePoint [Read Only]
Retrieve the most recently fired cue point. Unbindable since binding cannot handle structures.
public mostRecentCuePointName:String [Read Only]
public mostRecentCuePointTime:Number [Read Only]
Retrieve the most recently fired cue point time.
public enabled:Boolean
private function initializeParameters():Void
Create default values for absent parameters
private function initCuePoints():Void
Initialize the cue points from the init parameters. The data from the initCuePointNames and initCuePointTimes arrays will be consolidated into the single _cuePoints array.
public function initMedia(switchType:Boolean):Void
Prepare the component for the media and load it.
- Parameters
switchType
Switch to a new media type. OPTIONAL
public function draw():Void
Update the display -- size the video object. Don't do anything for mp3 media.
private function setVideoDisplaySize(w:Number, h:Number):Void
- Parameters
w
The new width of the component h
The new height of the component
public function handlePlayer(player:IPlayer, status:String)
Handle events broadcast by the player implementation.
public function play(startingPoint:Number):Void
Play the media starting at the specified starting point. If the media hasn't yet been loaded, load it.
- Parameters
startingPoint
The number of seconds into the media to start at. This is an optional parameter. If omitted, playing will occur at the current playhead position. @tiptext Plays the media from the given starting point @helpid 3476
public function setMedia(aUrl:String, aType:String)
Set both the content path and the media type together.
private function releaseVideo():Void
Completely release the video from the display. This is trickier than it might seem. Incompletely releasing the video leads to problems. If the same FLV is subsequently reloaded and its video or audio is already attached to the movie, the NetStream.play() call will fail.
private function isLivePreview():Boolean
- Return
- True if we are in live preview; false if not.
public function getCuePoints():Array
- Return
- An array of CuePoint objects. All the CuePoints associated with this object. @tiptext Returns the cuePoint object @helpid 3474
public function getCuePoint(pointName:String):CuePoint
- Parameters
pointName
The name of the cue point to find. - Return
- The CuePoint associated with this object that has the given name.
public function addCuePoint(aName:String, aTime:Number):Void
Add the given cue point.
- Parameters
public function addCuePointObject(aCuePoint:CuePoint):Void
Add the given cue point.
- Parameters
aCuePoint
The CuePoint to add.
public function removeCuePoint(aCuePoint:CuePoint):Void
Remove the given cue point.
- Parameters
aCuePoint
The CuePoint to remove. @tiptext Delete a specific cuepoint associated with this instance @helpid 3479
public function handleEvent(ev:Object):Void
Listen to events from the controller. The following events are actually propogated: click, playheadChange, volume. The others included below were available during development but are not now.
private function handlePauseEvent(ev:Object):Void
Handle a click on the pause button
private function handleRewindEvent(ev:Object):Void
Handle a click on the rewind button
private function handleFastForwardEvent(ev:Object):Void
Handle a click on the fast forward button
private function handlePlayheadChangeEvent(ev:Object):Void
Handle a new playhead position event
private function handleUnrecognizedEvent(ev:Object):Void
Handle an unrecognized event
private function getCuePointIndex(pointName:String):Number
- Return
- The index of the cue point with given name, or -1 if not found.
private function poll(first:Boolean):Void
Monitor the current status of the component.
- Parameters
first
True if this is the first time poll is being called.
public function associateController(c:MediaController):Void
Associated this display with a controller. Set up the event listeners between the two.