Main Page | Packages | Class Tree | Index | Help

mx.controls

class MediaPlayback

Object
  |
  +--MovieClip
        |
        +--mx.core.UIObject
              |
              +--mx.core.UIComponent
                    |
                    +--mx.controls.MediaPlayback

Implemented Interfaces: ICuePointHolder

class MediaPlayback
extends UIComponent

MediaPlayback is a full-featured displayer and controller of streaming media.

It plays FLV and MP3 files.


Author:
Andrew Guldman


Field Summary


clipParameters: Object


public
fps: Number
The frames per second is only used for video, and is only used in the configuration UI.

public
initCuePointNames: Array


public
initCuePointTimes: Array


static
symbolName: String
This set of properties is for FUIComponent

static
symbolOwner: Object


static
version: String
Copyright (C) 2003 Macromedia, Inc.

Fields inherited from class mx.core.UIComponent

clipParameters, drawFocus, enabled, focusEnabled, focusManager, focusTextField, groupName, kStretch, mergedClipParameters, origBorderStyles, origBorderValues, popUp, symbolName, symbolOwner, tabEnabled, tabIndex, version

Fields inherited from class mx.core.UIObject

__height, __width, _color, _topmost, addEventListener, buildDepthTable, changeColorStyleInChildren, changeTextStyleInChildren, childrenCreated, className, clipParameters, color, createAccessibilityImplementation, createChildAtDepth, createEvent, ction, dispatchEvent, embedFonts, findNextAvailableDepth, fontFamily, fontSize, fontStyle, fontWeight, handleEvent, idNames, ignoreClassStyleDeclaration, initProperties, marginLeft, marginRight, methodTable, notifyStyleChangeInChildren, removeEventListener, setStyle, stylecache, styleName, symbolName, symbolOwner, textAlign, textColorList, textDecoration, textIndent, validateNow, version

Fields inherited from class MovieClip

_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

Fields inherited from class Object

__proto__, constructor, prototype

Property Summary

public
aspectRatio: Boolean (read, write)


public
autoPlay: Boolean (read, write)


public
autoSize: Boolean (read, write)


public
bytesLoaded: Number (read-only)


public
bytesTotal: Number (read-only)


public
contentPath: String (read, write)


public
controllerPolicy: String (read, write)


public
controlPlacement: String (read, write)
The position of the controls relative to the display component.

public
cuePoints: Array (read, write)


public
enabled: Boolean (read, write)


public
mediaType: String (read, write)
This should only be called to configure the component initially.

public
mostRecentCuePoint: CuePoint (read-only)
Retrieve the most recently fired cue point.

public
mostRecentCuePointName: String (read-only)
Retrieve the most recently fired cue point name.

public
mostRecentCuePointTime: Number (read-only)
Retrieve the most recently fired cue point time.

public
playheadTime: Number (read, write)


public
playing: Boolean (read-only)


public
preferredHeight: Number (read-only)


public
preferredWidth: Number (read-only)


public
totalTime: Number (read, write)


public
volume: Number (read, write)


Properties inherited from class mx.core.UIComponent

height, width

Properties inherited from class mx.core.UIObject

bottom, height, left, minHeight, minWidth, right, scaleX, scaleY, top, visible, width, x, y

Constructor

public
MediaPlayback ( )
Constructor

Method Summary

public
addCuePoint ( aName: String, aTime: Number ): Void
Add the given cue point.

public
addCuePointObject ( aCuePoint: CuePoint ): Void
Add the given cue point.

public
addSecondChrome ( theChrome: Chrome, closedHeight: Number, openHeight: Number, closedWidth: Number, openWidth: Number, fixedEnd: Boolean ): Void


public
contract ( force: Boolean ): Void


public
displayFull ( ): Void
Display the player in full-screen mode.

public
displayNormal ( ): Void
Display the player in normal mode (as opposed to full screen).


draw ( Void ): Void
Draw the component.

public
expand ( force: Boolean ): Void


public
getController ( ): MediaController


public
getCuePoint ( pointName: String ): CuePoint


public
getCuePoints ( ): Array


public
getMinimumClosedHeight ( ): Number


public
getMinimumClosedWidth ( ): Number


public
getMinimumOpenHeight ( ): Number


public
getMinimumOpenWidth ( ): Number


public
handleEvent ( ev ): Void
Handle all the events broadcast by the display and controller components.


init ( Void ): Void
Initialize the player.

public
isRtmp ( mediaUrl: String ): Boolean


public
load ( ): Void
Load the media without playing it.

public
pause ( ): Void
Stop playback of the media without moving the playhead.

public
play ( startingPoint: Number ): Void
Play the media starting at the specified starting point.

public
removeAllCuePoints ( ): Void
Remove all the CuePoints.

public
removeCuePoint ( aCuePoint: CuePoint ): Void
Remove the given cue point.

public
removeSecondChrome ( ): Void


public
setCuePoints ( cp: Array ): Void


public
setMedia ( aUrl: String, aType: String ): Void
Set both the url and the type in a single call.

public
setSize ( w: Number, h: Number, noEvent: Boolean ): Void
size the object

public
stop ( ): Void
Stop playback of the media and reset the playhead to zero.

public
toString ( ): String


Methods inherited from class mx.core.UIComponent

dispatchValueChangedEvent, enabledChanged, findFocusFromObject, findFocusInChildren, getFocus, getFocusManager, init, isParent, onKillFocus, onSetFocus, pressFocus, releaseFocus, setEnabled, setFocus, setVisible, size

Methods inherited from class mx.core.UIObject

__getTextFormat, _createChildren, _getTextFormat, cancelAllDoLaters, constructObject, createChildren, createClassObject, createEmptyObject, createLabel, createObject, createSkin, destroyObject, doLater, doLaterDispatcher, draw, drawRect, getClassStyleDeclaration, getMinHeight, getMinWidth, getSkinIDName, getStyle, getStyleName, init, initFromClipParameters, invalidate, invalidateStyle, mergeClipParameters, move, redraw, setColor, setMinHeight, setMinWidth, setSize, setSkin, setVisible, size

Methods inherited from class MovieClip

attachAudio, attachMovie, beginFill, beginGradientFill, clear, createEmptyMovieClip, createTextField, curveTo, duplicateMovieClip, endFill, getBounds, getBytesLoaded, getBytesTotal, getDepth, getInstanceAtDepth, getNextHighestDepth, getSWFVersion, getTextSnapshot, getURL, globalToLocal, gotoAndPlay, gotoAndStop, hitTest, lineStyle, lineTo, loadMovie, loadVariables, localToGlobal, moveTo, nextFrame, onData, onDragOut, onDragOver, onEnterFrame, onKeyDown, onKeyUp, onKillFocus, onLoad, onMouseDown, onMouseMove, onMouseUp, onPress, onRelease, onReleaseOutside, onRollOut, onRollOver, onSetFocus, onUnload, play, prevFrame, removeMovieClip, setMask, startDrag, stop, stopDrag, swapDepths, unloadMovie, valueOf

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toLocaleString, toString, unwatch, valueOf, watch



Field Documentation

clipParameters

var clipParameters: Object

fps

public var fps: Number
The frames per second is only used for video, and is only used in the configuration UI.

The config UI uses it to calculate milliseconds based on frame number.

initCuePointNames

public var initCuePointNames: Array

initCuePointTimes

public var initCuePointTimes: Array

symbolName

static var symbolName: String
This set of properties is for FUIComponent

symbolOwner

static var symbolOwner: Object

version

static var version: String
Copyright (C) 2003 Macromedia, Inc.

All Rights Reserved. The following is Sample Code and is subject to all restrictions on such code as contained in the End User License Agreement accompanying this product.


Property Documentation

aspectRatio

public aspectRatio: Boolean (read, write)

autoPlay

public autoPlay: Boolean (read, write)

autoSize

public autoSize: Boolean (read, write)

bytesLoaded

public bytesLoaded: Number (read-only)

bytesTotal

public bytesTotal: Number (read-only)

contentPath

public contentPath: String (read, write)

controllerPolicy

public controllerPolicy: String (read, write)
Value:
doHide True to hide the controller when the mouse is not over it; false to not hide it.

controlPlacement

public controlPlacement: String (read, write)
The position of the controls relative to the display component.

cuePoints

public cuePoints: Array (read, write)
Value:
An array of CuePoint objects. All the CuePoints associated with this object.

enabled

public enabled: Boolean (read, write)

mediaType

public mediaType: String (read, write)
This should only be called to configure the component initially.

It does not work at runtime.

mostRecentCuePoint

public mostRecentCuePoint: CuePoint (read-only)
Retrieve the most recently fired cue point.

Unbindable since binding cannot handle structures.

mostRecentCuePointName

public mostRecentCuePointName: String (read-only)
Retrieve the most recently fired cue point name.

mostRecentCuePointTime

public mostRecentCuePointTime: Number (read-only)
Retrieve the most recently fired cue point time.

playheadTime

public playheadTime: Number (read, write)
Value:
The playhead position, measued in seconds since the start.

playing

public playing: Boolean (read-only)

preferredHeight

public preferredHeight: Number (read-only)

preferredWidth

public preferredWidth: Number (read-only)

totalTime

public totalTime: Number (read, write)
Value:
The total time of the media. For mp3 files, this is a property of the Sound object. For video, it is be a property that is manually set by the author.

volume

public volume: Number (read, write)
Value:
The most recent volume setting


Constructor Documentation

MediaPlayback

public function MediaPlayback()
Constructor


Method Documentation

addCuePoint

public function addCuePoint(aName: String,
 aTime: Number): Void
Add the given cue point.

Specified by:

Parameters:
aName
aCuePoint The CuePoint to add.
aTime

addCuePointObject

public function addCuePointObject(aCuePoint: CuePoint): Void
Add the given cue point.

Specified by:

Parameters:
aCuePoint
The CuePoint to add.

addSecondChrome

public function addSecondChrome(theChrome: Chrome,
 closedHeight: Number,
 openHeight: Number,
 closedWidth: Number,
 openWidth: Number,
 fixedEnd: Boolean): Void

contract

public function contract(force: Boolean): Void

displayFull

public function displayFull(): Void
Display the player in full-screen mode.

This makes the player occupy the entire Flash stage. It does *not* change the size of the Flash stage.

displayNormal

public function displayNormal(): Void
Display the player in normal mode (as opposed to full screen).

The original size and position of the player are retained when it toggles between full screen and normal mode.

draw

function draw(Void): Void
Draw the component.

This is called upon initialization and when the component is invalidated.

Overrides:

expand

public function expand(force: Boolean): Void

getController

public function getController(): MediaController

getCuePoint

public function getCuePoint(pointName: String): CuePoint
Specified by:

Parameters:
pointName
The name of the cue point to find.
Returns:
The CuePoint associated with this object that has the given name.

getCuePoints

public function getCuePoints(): Array
Specified by:

Returns:
An array of CuePoint objects. All the CuePoints associated with this object.

getMinimumClosedHeight

public function getMinimumClosedHeight(): Number

getMinimumClosedWidth

public function getMinimumClosedWidth(): Number

getMinimumOpenHeight

public function getMinimumOpenHeight(): Number

getMinimumOpenWidth

public function getMinimumOpenWidth(): Number

handleEvent

public function handleEvent(ev): Void
Handle all the events broadcast by the display and controller components.

Rebroadcast them. Special attention is paid to a "start" event from the display component. This component will listen to see when playback of the media starts. It will resize the video at that time.

Overrides:

init

function init(Void): Void
Initialize the player.

Overrides:

isRtmp

public function isRtmp(mediaUrl: String): Boolean

load

public function load(): Void
Load the media without playing it.

pause

public function pause(): Void
Stop playback of the media without moving the playhead.

play

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.

Overrides:

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.

removeAllCuePoints

public function removeAllCuePoints(): Void
Remove all the CuePoints.

Specified by:

removeCuePoint

public function removeCuePoint(aCuePoint: CuePoint): Void
Remove the given cue point.

Specified by:

Parameters:
aCuePoint
The CuePoint to remove.

removeSecondChrome

public function removeSecondChrome(): Void

setCuePoints

public function setCuePoints(cp: Array): Void
Specified by:

setMedia

public function setMedia(aUrl: String,
 aType: String): Void
Set both the url and the type in a single call.

setSize

public function setSize(w: Number,
 h: Number,
 noEvent: Boolean): Void
size the object

Overrides:

Parameters:
w
width of the object
h
height of the object
noEvent
if true, doesn't broadcast "resize" event

stop

public function stop(): Void
Stop playback of the media and reset the playhead to zero.

Overrides:

toString

public function toString(): String
Overrides:

Returns:
A string representation of this object


The documentation was generated from the following file:


Copyright © 1997-2005 Macromedia, Inc. All rights reserved. Generated with AS2Doc