MovieClip +--mx.controls.streamingmedia.LoadBar
The load bar that indicates how much of the streaming media has been loaded.
_background
, _border
, _controller
, _fill
_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 LoadBar()
private _controller:MediaController
private _background:MovieClip
private _border:MovieClip
private _fill:MovieClip
public function getCompletionPercentage():Number
Get the completion percentage.
public function setCompletionPercentage(aPercentage:Number):Void
Set the completion percentage.
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.
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.
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.
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).