Class mx.controls.streamingmedia.LoadBar

MovieClip
   +--mx.controls.streamingmedia.LoadBar

Description

The load bar that indicates how much of the streaming media has been loaded.

Field Index

_background, _border, _controller, _fill
Inherited from 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

Method Index

new LoadBar()

draw(), getActualHeight(), getActualWidth(), getClosedHeight(), getCompletionPercentage(), getHeight(), getOpenHeight(), getWidth(), init(), isVertical(), percentToX(), percentToY(), setCompletionPercentage(), xToPercent(), yToPercent()
Inherited from 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()

Constructor Detail

LoadBar

public function LoadBar()

Field Detail

_controller

private _controller:MediaController

_background

private _background:MovieClip

_border

private _border:MovieClip

_fill

private _fill:MovieClip

Method Detail

init

private function init():Void

isVertical

private function isVertical():
Boolean
Is the load bar vertical? (vs horizontal)

getCompletionPercentage

public function getCompletionPercentage():
Number
Get the completion percentage.

setCompletionPercentage

public function setCompletionPercentage(aPercentage:
Number):Void
Set the completion percentage.

draw

public function draw(size:
Number):Void
Draw the load bar.
Parameters
size The height or width at which to draw the load bar. OPTIONAL. If omitted, the load bar will be drawn at its standard height or width.

getWidth

public function getWidth():
Number
Return
The width of the play bar

getHeight

public function getHeight():
Number
Return
The height of the load bar

getActualHeight

private function getActualHeight():
Number
This "actual" functions are necessary because the bar height animates when the controller expands and contracts in vertical position. We need the fill to animate accurately also.

getActualWidth

private function getActualWidth():
Number

getOpenHeight

public function getOpenHeight():
Number

getClosedHeight

public function getClosedHeight():
Number

xToPercent

public function xToPercent(x:
Number):Number
Parameters
x The x coordinate of the thumb. Between 0 and (width - 2).
Return
The percent complete. Between 0 and 100.

percentToX

public function percentToX(percent:
Number):Number
Parameters
percent The percent complete. Between 0 and 100.
Return
The x coordinate of the thumb. Between 0 and (width - 2).

yToPercent

public function yToPercent(y:
Number):Number
Parameters
y The y coordinate of the fill bar. Between 0 and (height - 2).
Return
The percent complete. Between 0 and 100.

percentToY

public function percentToY(percent:
Number):Number
Parameters
percent The percent complete. Between 0 and 100.
Return
The y coordinate of the fill bar. Between 0 and (height - 2).