LoadBar
| Kind of class: | class |
|---|---|
| Inherits from: | MovieClip |
| Author: | Andrew Guldman |
| Classpath: | mx.controls.streamingmedia.LoadBar |
| File last modified: | Tuesday, 18 December 2007, 15:44:38 |
The load bar that indicates how much of the streaming media has
been loaded.
been loaded.
Summary
Constructor
Instance properties
- _controller : MediaController
- The controller with which this load bar is associated
- _background : MovieClip
- _border : MovieClip
- _fill : MovieClip
Instance methods
- init : Void
- isVertical : Boolean
- Is the load bar vertical? (vs horizontal)
- getCompletionPercentage : Number
- Get the completion percentage.
- setCompletionPercentage (aPercentage:Number) : Void
- Set the completion percentage.
- draw (size:Number) : Void
- Draw the load bar.
- getWidth : Number
- getHeight : Number
- getActualHeight : Number
- This "actual" functions are necessary because the bar height animates
- getActualWidth : Number
- getOpenHeight : Number
- getClosedHeight : Number
- xToPercent (x:Number) : Number
- percentToX (percent:Number) : Number
- yToPercent (y:Number) : Number
- percentToY (percent:Number) : Number
Constructor
LoadBar
function LoadBar (
)
Instance properties
_background
private _background:MovieClip
(read)
_border
private _border:MovieClip
(read)
_controller
The controller with which this load bar is associated
_fill
private _fill:MovieClip
(read)
Instance methods
draw
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.
If omitted, the load bar will be drawn at its standard height or width.
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.
when the controller expands and contracts in vertical position.
We need the fill to animate accurately also.
getActualWidth
private function getActualWidth (
) : Number
getClosedHeight
function getClosedHeight (
) : Number
getCompletionPercentage
function getCompletionPercentage (
) : Number
Get the completion percentage.
getHeight
function getHeight (
) : Number
Returns:
- The height of the load bar
getOpenHeight
function getOpenHeight (
) : Number
getWidth
function getWidth (
) : Number
Returns:
- The width of the play bar
init
private function init (
) : Void
isVertical
private function isVertical (
) : Boolean
Is the load bar vertical? (vs horizontal)
percentToX
function percentToX (
percent:Number) : Number
Parameters:
percent:
The percent complete. Between 0 and 100.
Returns:
- The x coordinate of the thumb. Between 0 and (width - 2).
percentToY
function percentToY (
percent:Number) : Number
Parameters:
percent:
The percent complete. Between 0 and 100.
Returns:
- The y coordinate of the fill bar. Between 0 and (height - 2).
setCompletionPercentage
function setCompletionPercentage (
aPercentage:Number) : Void
Set the completion percentage.
xToPercent
function xToPercent (
x:Number) : Number
Parameters:
x:
The x coordinate of the thumb. Between 0 and (width - 2).
Returns:
- The percent complete. Between 0 and 100.
yToPercent
function yToPercent (
y:Number) : Number
Parameters:
y:
The y coordinate of the fill bar. Between 0 and (height - 2).
Returns:
- The percent complete. Between 0 and 100.