BytesLoad

Kind of class:class
Inherits from:RetryableLoad < Load < EventDispatcher < CoreObject
Implements:
Known subclasses:
Version:12/22/06
Author:Aaron Clinger
Classpath:org.casaframework.load.base.BytesLoad
File last modified:Friday, 16 March 2007, 12:06:07
Base bytes load class for items where methods getBytesLoaded and getBytesTotal are available. Class needs to be extended further to function properly.
Since:
Flash Player 7
Events broadcast to listeners:
onLoadProgress = function (sender:BytesLoad, bytesLoaded:Number, bytesTotal:Number) {}
onInstantiate = function (sender:BytesLoad) {}

Class properties

EVENT_INSTANTIATE

static EVENT_INSTANTIATE:String = 'onInstantiate'
(read,write)

EVENT_LOAD_PROGRESS

static EVENT_LOAD_PROGRESS:String = 'onLoadProgress'
(read,write)

loadTimeout

static loadTimeout:Number = 8000
(read,write)

Instance methods

destroy

function destroy (
) : Void
Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.

Always call destroy() before deleting last object pointer.
#

getBytesLoaded

function getBytesLoaded (
) : Number
Returns the number of bytes that have loaded (streamed).
#
Returns:
An integer that indicates the number of bytes loaded.
#

getBytesTotal

function getBytesTotal (
) : Number
Returns the size, in bytes, of the file currently or completed loading.
#
Returns:
An integer that indicates the total size, in bytes, of the movie clip.
#

setLoadTimeout

function setLoadTimeout (
loadTimeout:Number) : Void
Sets the amount of time a load will wait without receiving further progress before retrying.
#
Parameters:
loadTimeout:
Time in milliseconds.
#
Usage note:
Class defaults to 8000 milliseconds.