MovieClip
+--mx.core.UIObject
+--mx.core.UIComponent
+--mx.controls.MediaDisplayICuePointHolder 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, volumeclipParameters, 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, useHandCursornew MediaDisplay()
static symbolName:Stringstatic symbolOwner:ObjectclassName:StringclipParameters:Objectpublic fps:Numberpublic initCuePointNames:Arraypublic initCuePointTimes:Arrayprivate _contentPath:Stringprivate _mediaType:Stringprivate _autoSize:Booleanprivate _aspectRatio:Booleanprivate _autoPlay:Booleanprivate _deadPreview:MovieClipprivate _toggleControl:FullScreenToggleprivate _playerImpl:IPlayerprivate _videoHolder:MovieClipprivate _soundHolder:MovieClipprivate _processor:MovieClipprivate _priorTime:Numberprivate _priorBytesLoaded:Numberprivate _cuePoints:Arrayprivate _mostRecentCuePointprivate _scrubbing:Booleanprivate _fireCuePoints:Booleanprivate _startingTime:Numberprivate _totalTime:Numberprivate _started:Booleanprivate _sendCompleteEvent:Booleanprivate _fullyLoaded:Booleanprivate _enabled:Booleanprivate _playingBeforeDisabled:Booleanprivate _pollId:Numberpublic makeVideoVisible:Booleanprivate _screenAccommodator:ScreenAccommodatorpublic videoWidth:Number [Read Only]public videoHeight:Number [Read Only]public preferredWidth:Number [Read Only]public preferredHeight:Number [Read Only]public autoSize:Booleanpublic aspectRatio:Booleanpublic autoPlay:BooleanAutoplay is strictly an initialization parameter.
public playheadTime:Numberpublic contentPath:StringCreate a contentPath property.
public volume:Numberpublic playing:Boolean [Read Only]public bytesLoaded:Number [Read Only]public bytesTotal:Number [Read Only]public mediaType:Stringpublic totalTime:Numberpublic cuePoints:Arraypublic 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:Booleanprivate function initializeParameters():VoidCreate default values for absent parameters
private function initCuePoints():VoidInitialize 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):VoidPrepare the component for the media and load it.
- Parameters
switchTypeSwitch to a new media type. OPTIONAL
public function draw():VoidUpdate the display -- size the video object. Don't do anything for mp3 media.
private function setVideoDisplaySize(w:Number, h:Number):Void
- Parameters
wThe new width of the component hThe new height of the component
public function handlePlayer(player:IPlayer, status:String)Handle events broadcast by the player implementation.
public function play(startingPoint:Number):VoidPlay the media starting at the specified starting point. If the media hasn't yet been loaded, load it.
- Parameters
startingPointThe 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():VoidCompletely 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
pointNameThe 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):VoidAdd the given cue point.
- Parameters
public function addCuePointObject(aCuePoint:CuePoint):VoidAdd the given cue point.
- Parameters
aCuePointThe CuePoint to add.
public function removeCuePoint(aCuePoint:CuePoint):VoidRemove the given cue point.
- Parameters
aCuePointThe CuePoint to remove. @tiptext Delete a specific cuepoint associated with this instance @helpid 3479
public function handleEvent(ev:Object):VoidListen 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):VoidHandle a click on the pause button
private function handleRewindEvent(ev:Object):VoidHandle a click on the rewind button
private function handleFastForwardEvent(ev:Object):VoidHandle a click on the fast forward button
private function handlePlayheadChangeEvent(ev:Object):VoidHandle a new playhead position event
private function handleUnrecognizedEvent(ev:Object):VoidHandle 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):VoidMonitor the current status of the component.
- Parameters
firstTrue if this is the first time poll is being called.
public function associateController(c:MediaController):VoidAssociated this display with a controller. Set up the event listeners between the two.