MiniPlayBar

Kind of class:class
Inherits from:MovieClip
Author:Andrew Guldman
Classpath:mx.controls.streamingmedia.MiniPlayBar
File last modified:Tuesday, 18 December 2007, 15:44:38
The load bar that indicates how much of the streaming media has
been loaded.

Summary


Constructor
Instance properties
Instance methods

Constructor

MiniPlayBar

function MiniPlayBar (
)

Constructor.

Instance properties

_controller

private _controller:MediaController
(read)

The controller with which this load bar is associated

_hilite

private _hilite:MovieClip
(read)

_thumb

private _thumb:MovieClip
(read)

The thumb

_tray

private _tray
(read)

The tray. Different classes for vertical and horizontal orientation so leave it untyped.

Instance methods

draw

function draw (
h:Number) : Void

Draw the play bar.
Parameters:
h:
The height at which to draw the bar. OPTIONAL.
If omitted, the bar will be drawn at its standard height.
This is only used if the load bar is in vertical orientation.
It is ignored for horizontal bars.

getActualHeight

function getActualHeight (
) : Number

getCompletionPercentage

function getCompletionPercentage (
) : Number

Set the completion percentage.

getController

function getController (

Returns:
  • The controller associated with the play bar.

getHeight

function getHeight (
) : Number

Returns:
  • The height of the play bar

getWidth

function getWidth (
) : Number

Returns:
  • The width of the play bar

init

private function init (
) : Void

Initialize the component.

isVertical

function isVertical (
) : Boolean

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 thumb. Between 1 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 thumb. Between 1 and (Height - 2).
Returns:
  • The percent complete. Between 0 and 100.