Main Page | Packages | Class Tree | Index | Help

mx.controls

class MediaDisplay

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

Implemented Interfaces: ICuePointHolder

class MediaDisplay
extends UIComponent

MediaDisplay 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
An array of cue point names.

public
initCuePointTimes: Array
An array of cue point times.

public
makeVideoVisible: Boolean
A flag that tells the draw() function to make the video object visible.

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)
Autoplay is strictly an initialization parameter.

public
autoSize: Boolean (read, write)


public
contentPath: String (read, write)
Set the content path.Create a contentPath property.

public
playheadTime: Number (read, write)


public
playing: Boolean (read-only)


public
preferredHeight: Number (read-only)


public
preferredWidth: Number (read-only)


public
videoHeight: Number (read-only)


public
videoWidth: Number (read-only)


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
MediaDisplay ( )
Constructor

Method Summary

public
assignPreferredSize ( ): Void


public
draw ( ): Void
Update the display -- size the video object.

public
handlePlayer ( player: IPlayer, status: String )
Handle events broadcast by the player implementation.


init ( Void ): Void
Initialize the player.

public
initMedia ( switchType: Boolean ): Void
Prepare the component for the media and load it.

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
setMedia ( aUrl: String, aType: String )
Set both the content path and the media type together.

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
An array of cue point names.

One for each cue point. Each entry is a string. This is only used at startup to initialize the cue point array.

initCuePointTimes

public var initCuePointTimes: Array
An array of cue point times.

One for each cue point. There must be the same number as there are names. Each element is the number of seconds, with decimals allowed. This is only used at startup to initialize the cue point array.

makeVideoVisible

public var makeVideoVisible: Boolean
A flag that tells the draw() function to make the video object visible.

This is public because the MediaPlayback class needs to be able to set it.

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)
Autoplay is strictly an initialization parameter.

autoSize

public autoSize: Boolean (read, write)

contentPath

public contentPath: String (read, write)
Set the content path.Create a contentPath property.

This should only be called during configuration. It does not work at runtime.

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)
Value:
The preferred height of the display. This is the height of the video object.

preferredWidth

public preferredWidth: Number (read-only)
Value:
The preferred width of the display. This is the width of the video object.

videoHeight

public videoHeight: Number (read-only)
Value:
The actual height of the display.

videoWidth

public videoWidth: Number (read-only)
Value:
The actual width of the video display.

volume

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


Constructor Documentation

MediaDisplay

public function MediaDisplay()
Constructor


Method Documentation

assignPreferredSize

public function assignPreferredSize(): Void

draw

public function draw(): Void
Update the display -- size the video object.

Don't do anything for mp3 media.

Overrides:

handlePlayer

public function handlePlayer(player: IPlayer,
 status: String)
Handle events broadcast by the player implementation.

init

function init(Void): Void
Initialize the player.

Overrides:

initMedia

public function initMedia(switchType: Boolean): Void
Prepare the component for the media and load it.

Parameters:
switchType
Switch to a new media type. OPTIONAL

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.

setMedia

public function setMedia(aUrl: String,
 aType: String)
Set both the content path and the media type together.

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