Access keys

Load

Kind of class: class
Inherits from: EventDispatcher < CoreObject
Implements:
Known subclasses:
Version: 12/22/06
Author: Aaron Clinger
Classpath: org.casaframework.load.base.Load
File last modified: Wednesday, 24 January 2007, 21:45:39
Base load class.
Class needs to be extended further to function properly.
Since:
Flash Player 7
Events broadcast to listeners:
onLoadStart = function (sender:Load) {}
onLoadComplete = function (sender:Load) {}
onLoadError = function (sender:Load) {}
onLoadInit = function (sender:Load) {}

Class properties

EVENT_LOAD_COMPLETE

static EVENT_LOAD_COMPLETE:String = 'onLoadComplete'
(read,write)

EVENT_LOAD_ERROR

static EVENT_LOAD_ERROR:String = 'onLoadError'
(read,write)

EVENT_LOAD_INIT

static EVENT_LOAD_INIT:String = 'onLoadInit'
(read,write)

EVENT_LOAD_START

static EVENT_LOAD_START:String = 'onLoadStart'
(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.
#

getFilePath

function getFilePath (
) : String
Retrieves the path to the file that is to be loaded.
#
Returns:
String containing the path to the file.
#

hasLoaded

function hasLoaded (
) : Boolean
Determines whether the requested file has finished loading.
#
Returns:
Returns true if file has completely loaded; otherwise false.
#

isLoading

function isLoading (
) : Boolean
Determines whether the requested file is in the process of loading.
#
Returns:
Returns true if the file is currently loading; otherwise false.
#

start

function start (
) : Void
Begins the loading process and broadcasts events to observers.
Usage note:
Use org.casaframework.event.EventDispatcher.addEventObserver to listen for broadcasted events.
Events broadcast to listeners:
onLoadStart = function (sender:Load) {}

stop

function stop (
) : Void
Unloads a file that has previously loaded, or cancels a currently loading file from completing.
Usage note:
If you issue this command while a file is loading, event onLoadError is also invoked.