QueueLoader
Kind of class: | public class |
---|---|
Package: | com.hydrotik.queueloader |
Inherits from: | none |
Implements: |
|
Classpath: | com.hydrotik.queueloader.QueueLoader |
File last modified: | Sunday, 30 November 2008, 22:55:36 |
Summary
Constructor
Constants
Class properties
Instance properties
Constructor
QueueLoader
public function QueueLoader (
ignoreErrors:Boolean = false,
loaderContext:LoaderContext = null,
bandwidthMonitoring:Boolean = false,
id:String = "")
QueueLoader AS 3
QueueLoader is an open source linear asset loading tool with progress monitoring. Please contact me if you make additions, updates, or enhancements to the package. If you use QueueLoader, I'd love to hear about it. Please contact me if you find any errors or bugs in the class or documentation or if you would like to contribute.
QueueLoader is an open source linear asset loading tool with progress monitoring. Please contact me if you make additions, updates, or enhancements to the package. If you use QueueLoader, I'd love to hear about it. Please contact me if you find any errors or bugs in the class or documentation or if you would like to contribute.
Author:
Donovan Adams, E-Mail: donovan[(replace at)]hydrotik.com, url: http://blog.hydrotik.com/
Project home: QueueLoader on Google Code
Project home: QueueLoader on Google Code
Version:
3.1.3
Version history:
Example:
Go to QueueLoader Guide on Google Code for more usage info. This example shows how to use QueueLoader in a basic application:
Constants
AUTHOR
public static const AUTHOR:String = "Donovan Adams - donovan[(replace at)]hydrotik.com"
(read,write)
FILE_CSS
public static const FILE_CSS:int = 4
(read,write)
FILE_FLV
public static const FILE_FLV:int = 8
(read,write)
FILE_GENERIC
public static const FILE_GENERIC:int = 9
(read,write)
FILE_IMAGE
public static const FILE_IMAGE:int = 1
(read,write)
LOADABLE ITEM LIST **********
FILE_MP3
public static const FILE_MP3:int = 5
(read,write)
FILE_SWF
public static const FILE_SWF:int = 2
(read,write)
FILE_WAV
public static const FILE_WAV:int = 7
(read,write)
FILE_XML
public static const FILE_XML:int = 3
(read,write)
FILE_ZIP
public static const FILE_ZIP:int = 6
(read,write)
VERSION
public static const VERSION:String = "QueueLoader 3.1.3"
(read,write)
Class properties
VERBOSE
public static VERBOSE:Boolean = false
(read,write)
VERBOSE_BANDWITH
public static VERBOSE_BANDWITH:Boolean = false
(read,write)
Instance properties
loading
public loading:Boolean
(read)
Returns loading status
Returns:
Boolean
Instance methods
addEventListener
public function addEventListener (
type:String,
listener:Function,
useCapture:Boolean = false,
priority:int = 0,
useWeakReference:Boolean = true) : void
addItem
public function addItem (
src:String,
container = *=null,
info:Object = null) : void
Adds an item to the loading queue
Parameters:
src :
String - asset file path
container:
- container location
info :
Object - data
Returns:
void
addItemAt
public function addItemAt (
index:Number,
src:String,
container = *,
info:Object) : void
Adds an item to the loading queue at a specific position
Parameters:
index :
Number - insertion index
src :
String - asset file path
container:
- container location
info :
Object - data to be stored and retrieved later
Returns:
void
completeHandler
public function completeHandler (
event:Event) : void
dispatchEvent
public function dispatchEvent (
evt:Event) : Boolean
dispose
public function dispose (
) : void
Removes Items Loaded from memory for Garbage Collection
Returns:
void
execute
public function execute (
) : void
Executes the loading sequence
Returns:
void
getItemAt
public function getItemAt (
index:Number) : Object
Returns an item in the loading queue at a specific index
Parameters:
index:
Number - index of returned item
Returns:
Object
getItemByTitle
public function getItemByTitle (
title:String) : Object
Returns an item in the loading queue by searching the title.
Parameters:
title:
String - title of returned item
Returns:
Object
getLoadedItems
public function getLoadedItems (
) : Array
Returns an array of items that have been succesfully loaded.
Returns:
Array - Array of items that have been succesfully loaded
getQueuedItems
public function getQueuedItems (
) : Array
Returns an array of items that have NOT been loaded yet and are still in the queue.
Returns:
Array - Array of items that have NOT been loaded yet
hasEventListener
public function hasEventListener (
type:String) : Boolean
httpStatusHandler
public function httpStatusHandler (
event:HTTPStatusEvent) : void
ioErrorHandler
public function ioErrorHandler (
event:IOErrorEvent) : void
isLoading
public function isLoading (
) : Boolean
Removes Items Loaded from memory for Garbage Collection
Returns:
void
loadXML
public function loadXML (
xml:XML,
scope = *=null) : void
Adds a group of items to the loading queue at a specific position
Parameters:
index :
Number - removal index
...rest:
Array - Items to be added
Returns:
void
openHandler
public function openHandler (
event:Event) : void
progressHandler
public function progressHandler (
event:ProgressEvent) : void
removeEventListener
public function removeEventListener (
type:String,
listener:Function,
useCapture:Boolean = false) : void
removeItemAt
public function removeItemAt (
index:Number) : Array
Removes an item to the loading queue at a specific position
Parameters:
index:
Number - removal index
Returns:
Array
resume
public function resume (
) : void
Resumes Loading
Returns:
void
shuffle
public function shuffle (
index:int,
len:int,
insertAt:int) : void
This method simply pulls any number of items from a specific index and inserts them into another place in the queue. Provides on the fly prioritization of items before and during load.
Parameters:
index :
int - Beginning index point where items are pulled from
len :
int - Length of items to be pulled
insertAt:
int - Insertion index of where items are placed back in the queue
Returns:
void
sortOn
public function sortOn (
) : void
allows input of a sort function for sorting the array see Array.sortOn(); sortOn() will provide sorting accessing the public methods of the Item's class.
Parameters:
...:
args: sortOn() Arguments
Returns:
void
stop
public function stop (
) : void
Stops Loading
Returns:
void
willTrigger
public function willTrigger (
type:String) : Boolean