ProgressIndicator
| Kind of class: | class |
|---|---|
| Inherits from: | EventMovieClip < MovieClip |
| Known subclasses: | |
| Version: | 12 Feb 2006 |
| Author: | Arthur Clemens |
| Classpath: | playground.classes.ui.ProgressIndicator |
| File last modified: | Tuesday, 03 October 2006, 09:43:57 |
Generic progress controller UI class that optionally may be given a 'progress delay' for smoothing.
ProgressIndicator may be used for progress bars and preloaders.
To do:
Implement indeterminate progress indicator.
Events broadcast to listeners:
ProgressIndicatorEvent with type:
FINISHED When the amount drawn is equal to the max amountSummary
Instance methods
Event handlers
Instance methods
finish
function finish (
) : Void
Forces the progress indicator to finish drawing. Will send a ProgressIndicatorEvent.FINISHED message.
incrementToValue
function incrementToValue (
inValue:Number) : Void
Tells the indicator to update.
Parameters:
inValue:
the value to update to
Implementation note:
Calls update.
Events broadcast to listeners:
ProgressIndicatorEvent with type:
FINISHED When the amount drawn is equal to the max amountinit
function init (
) : Void
Subclasses will set the indicator property (_x, _y, _xscale, _yscale or _alpha) to its initial value here.
Example:
function init () : Void { _yscale = 0; }
setDone
function setDone (
) : Void
Updates with the maximum value.
setEffect
function setEffect (
inEffect:Function) : Void
Effect function when drawing, for instance one of the mx.transitions.easing methods.
setMaxValue
function setMaxValue (
inValue:Number) : Void
Sets the maximum value. This is related to the amount passed in incrementToValue. For instance, if incrementToValue gets values between 0.0 and 1.0, the max amount is 1.0. The default is 100.
Parameters:
inMaxValue:
the maximum amount that will be passed to incrementToValue
setMinValue
function setMinValue (
inValue:Number) : Void
Sets the minimum value. This is related to the amount passed in incrementToValue. For instance, if incrementToValue gets values between 0.0 and 1.0, the max amount is 1.0. The default is 100.
Parameters:
inMaxValue:
the maximum amount that will be passed to incrementToValue
setProgressDelay
function setProgressDelay (
inDelay:Number) : Void
Sets the delay of the draw animation after each call of incrementToValue. The default is 0 (no delay).
Parameters:
inDelay:
the delay in seconds
startAnimation
function startAnimation (
) : Void
To be used by indeterminate progress indicator (not implemented).
stop
function stop (
) : Void
Stops the progress indicator, without sending a ProgressIndicatorEvent.FINISHED message.
stopAnimation
function stopAnimation (
) : Void
To be used by indeterminate progress indicator (not implemented).
toString
function toString (
) : String