Access keys

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: Wednesday, 24 January 2007, 21:45:39
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) {}

Summary

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 internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.

Always call destroy() before deleting/removing object instance.
#

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.