Packagecom.soma.loader
Classpublic class SomaLoader
InheritanceSomaLoader Inheritance flash.events.EventDispatcher

Author: Romuald Quantin - www.soundstep.com
Project host: http://code.google.com/p/somaloader/
Class version: 1.0.2
Actionscript version: 3.0

Copyright:

The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied.
See the License for the specific language governing rights and
limitations under the License.

The Original Code is SomaLoader.
The Initial Developer of the Original Code is Romuald Quantin.
Initial Developer are Copyright (C) 2008-2009 Soundstep. All Rights Reserved.

Date: 20 Feb 2009

Usage:
SomaLoader is a lightweight loading manager written in AS3. You can load many types such as images, swf, xml, text, xml, css, fonts in a swf, mp3, variables and binary data. Items can be added, removed and changed in position from the queue even while loading. SomaLoader provides a simple and unique interface for massive loading, to listen to events and access to data. SomaLoader has some specific features such as targeting before loading, easy loading progress display, caching system and binary loading for "silent loading".


Example
  var loader:SomaLoader = new SomaLoader();
  loader.addEventListener(SomaLoaderEvent.COMPLETE, itemComplete);
  loader.add("photo1.jpg");
  loader.add("photo2.jpg");
  loader.add("photo3.jpg");
  function itemComplete(event:SomaLoaderEvent):void {
      var bitmap:Bitmap = event.item.file as Bitmap;
      addChild(bitmap);
  }
  



Public Properties
 PropertyDefined by
  currentItem : SomaLoaderItem
[read-only] get the item that is currently loading.
SomaLoader
  currentLoader : *
[read-only] get the current built-in loader instance used in SomaLoader, can be Loader, URLLoader or Sound.
SomaLoader
  DEFAULT_BITMAP_SMOOTHING : Boolean = true
[static] Default value for the smoothing property.
SomaLoader
  DEFAULT_CACHE_ENABLED : Boolean = true
[static] Default value for the cache system, whether the cache is enable or not.
SomaLoader
  failOnError : Boolean
indicates if the loading of the items in the queue should stop or continue if an error is found, the default is false.
SomaLoader
  items : Array
[read-only] get a copy of the list of items in the queue.
SomaLoader
  length : int
[read-only] get the length of the queue (number of items in the queue).
SomaLoader
  lengthCache : int
[read-only] get the length of the cache (number of items cached).
SomaLoader
  loaderContext : LoaderContext
LoaderContext used in the SomaLoader instance.
SomaLoader
  loading : ILoading
ILoading instance used to display a loading progress.
SomaLoader
  LOG_ERRORS : Boolean = true
[static] Show or hide trace of internal errors.
SomaLoader
  playerVersion : int
[read-only] get the major version of the user's Flash Player.
SomaLoader
  showLoading : Boolean
indicates if the ILoading instance should be used to display the progress.
SomaLoader
  soundLoaderContext : SoundLoaderContext
SoundLoaderContext used in the SomaLoader instance.
SomaLoader
  status : String
[read-only] get the loading status of the SomaLoader instance, can be SomaLoader.STATUS_LOADING, SomaLoader.STATUS_PAUSED or SomaLoader.STATUS_STOPPED.
SomaLoader
Public Methods
 MethodDefined by
  
Instantiates a SomaLoader
SomaLoader
  
add(url:String, container:DisplayObjectContainer = null, type:String = null, data:String = null, dataFormat:* = null):SomaLoaderItem
add an item at the end of the queue.
SomaLoader
  
addAt(url:String, index:int, container:DisplayObjectContainer = null, type:String = null, data:String = null, dataFormat:* = null):SomaLoaderItem
add an item to a specific index in the queue.
SomaLoader
  
addBinary(item:SomaLoaderItem, container:DisplayObjectContainer = null, data:* = null):SomaLoaderItem
add a SomaLoaderItem instance in the queue that contains Binary data (item.fileBinary), to create an instance of Bitmap or MovieClip.
SomaLoader
  
addBinaryAt(item:SomaLoaderItem, index:int, container:DisplayObjectContainer = null, data:* = null):SomaLoaderItem
add a SomaLoaderItem instance that contains Binary data (item.fileBinary) to a specific index, to create an instance of Bitmap or MovieClip.
SomaLoader
  
clearCache():void
clear the cache (remove all the SomaLoaderItem instance loaded).
SomaLoader
  
contains(url:String):Boolean
Indicates if the queue contains an item with a URL.
SomaLoader
  
dispose(cacheIncluded:Boolean = false):void
stop and dispose the SomaLoader instance to remove listeners and delete built-in loaders.
SomaLoader
  
get a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.
SomaLoader
  
get a SomaLoaderItem instance stored in the cache containing a ByteArray set to the fileBinary property of the SomaLoaderItem instance with the URL.
SomaLoader
  
getBinaryLoadedItems(type:String = null):Array
get the list of the SomaLoaderItem instances stored in the cache containing a ByteArray set to the fileBinary property of the SomaLoaderItem instance.
SomaLoader
  
getIndex(url:String):int
get the item position in the queue with the url of this item.
SomaLoader
  
getItem(url:String):SomaLoaderItem
get an item in the queue with the URL
SomaLoader
  
get an item in the queue at the specified index
SomaLoader
  
get the last item added in the queue.
SomaLoader
  
getLoadedItemByOwnKey(key:String, value:*):SomaLoaderItem
get a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.
SomaLoader
  
get a SomaLoaderItem instance stored in the cache with the URL.
SomaLoader
  
getLoadedItems():Dictionary
get the list of the SomaLoaderItem instances stored in the cache.
SomaLoader
  
info():String
Returns a String describing the SomaLoader instance.
SomaLoader
  
pause():void
stops the loading and keep the items not loaded in the queue, the loading can be resumed.
SomaLoader
  
remove(url:String):Boolean
find an item with the URL and remove it from the queue.
SomaLoader
  
removeAll():Boolean
remove all the item from the queue.
SomaLoader
  
removeAt(index:int):Boolean
find an item with the index and remove it from the queue.
SomaLoader
  
remove a SomaLoaderItem instance stored in the cache.
SomaLoader
  
removeItemLoadedByOwnKey(key:String, value:*):Boolean
remove a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.
SomaLoader
  
removeItemLoadedByURL(url:String):Boolean
remove a SomaLoaderItem instance stored in the cache with the URL.
SomaLoader
  
resume():void
resume a loading that has been paused.
SomaLoader
  
setIndex(url:String, index:int):Boolean
set the item position in the queue with the url of this item.
SomaLoader
  
start():void
starts the loading of the items in the queue.
SomaLoader
  
stop():void
stops the loading and reset the queue.
SomaLoader
Events
 EventSummaryDefined by
   Indicates a change in the cache.SomaLoader
   Dispatched when a loading of an item is complete.SomaLoader
   Dispatched when an error has been found in the SomaLoader instance.SomaLoader
   Indicates an ID3 information is available when a mp3 starts to load.SomaLoader
   Dispatched when a loading of an item progresses.SomaLoader
   Indicates a change in the queue.SomaLoader
   Dispatched when the loading of a list of items is complete.SomaLoader
   Dispatched when the loading of a list of items progresses.SomaLoader
   Dispatched when the loading of a list of items starts.SomaLoader
   Dispatched when a loading of an item starts.SomaLoader
   Indicates a status change in the SomaLoader instance (loading, paused, stopped).SomaLoader
Public Constants
 ConstantDefined by
  STATUS_LOADING : String = "loading"
[static] Constant value used to defined the status property of the SomaLoader instance when it is loading.
SomaLoader
  STATUS_PAUSED : String = "paused"
[static] Constant value used to defined the status property of the SomaLoader instance when it is paused.
SomaLoader
  STATUS_STOPPED : String = "stopped"
[static] Constant value used to defined the status property of the SomaLoader instance when it is stopped.
SomaLoader
  TYPE_BITMAP : String = "TypeBitmap"
[static] Constant value used to defined the type property of the loader for an image.
SomaLoader
  TYPE_CSS : String = "TypeCSS"
[static] Constant value used to defined the type property of the loader for an CSS file.
SomaLoader
  TYPE_FONT : String = "TypeFont"
[static] Constant value used to defined the type property of the loader for a SWF containing fonts.
SomaLoader
  TYPE_MP3 : String = "TypeMP3"
[static] Constant value used to defined the type property of the loader for a MP3.
SomaLoader
  TYPE_SWF : String = "TypeSWF"
[static] Constant value used to defined the type property of the loader for a SWF.
SomaLoader
  TYPE_TEXT : String = "TypeText"
[static] Constant value used to defined the type property of the loader for an text file.
SomaLoader
  TYPE_UNKNOWN : String = "TypeUnknown"
[static] Constant value used to defined the type property of the loader for an unknown file.
SomaLoader
  TYPE_XML : String = "TypeXML"
[static] Constant value used to defined the type property of the loader for an XML file.
SomaLoader
  VERSION : String = "1.0.1"
[static] SomaLoader version.
SomaLoader
Property detail
currentItemproperty
currentItem:SomaLoaderItem  [read-only]

get the item that is currently loading.

Implementation
    public function get currentItem():SomaLoaderItem
currentLoaderproperty 
currentLoader:*  [read-only]

get the current built-in loader instance used in SomaLoader, can be Loader, URLLoader or Sound.

Implementation
    public function get currentLoader():*
DEFAULT_BITMAP_SMOOTHINGproperty 
public static var DEFAULT_BITMAP_SMOOTHING:Boolean = true

Default value for the smoothing property. When an image is loaded, this value will be set to the smoothing property of the Bitmap.

DEFAULT_CACHE_ENABLEDproperty 
public static var DEFAULT_CACHE_ENABLED:Boolean = true

Default value for the cache system, whether the cache is enable or not. This value will set the cacheEnabled property of a SomaLoaderItem when created.

failOnErrorproperty 
failOnError:Boolean  [read-write]

indicates if the loading of the items in the queue should stop or continue if an error is found, the default is false.

Implementation
    public function get failOnError():Boolean
    public function set failOnError(value:Boolean):void
itemsproperty 
items:Array  [read-only]

get a copy of the list of items in the queue.

Implementation
    public function get items():Array
lengthproperty 
length:int  [read-only]

get the length of the queue (number of items in the queue).

Implementation
    public function get length():int
lengthCacheproperty 
lengthCache:int  [read-only]

get the length of the cache (number of items cached).

Implementation
    public function get lengthCache():int
loaderContextproperty 
loaderContext:LoaderContext  [read-write]

LoaderContext used in the SomaLoader instance.

Implementation
    public function get loaderContext():LoaderContext
    public function set loaderContext(value:LoaderContext):void
loadingproperty 
loading:ILoading  [read-write]

ILoading instance used to display a loading progress.

Implementation
    public function get loading():ILoading
    public function set loading(value:ILoading):void
LOG_ERRORSproperty 
public static var LOG_ERRORS:Boolean = true

Show or hide trace of internal errors. This does not affect the SomaLoaderEvent.ERROR events.

playerVersionproperty 
playerVersion:int  [read-only]

get the major version of the user's Flash Player.

Implementation
    public function get playerVersion():int
showLoadingproperty 
showLoading:Boolean  [read-write]

indicates if the ILoading instance should be used to display the progress.

Implementation
    public function get showLoading():Boolean
    public function set showLoading(value:Boolean):void
soundLoaderContextproperty 
soundLoaderContext:SoundLoaderContext  [read-write]

SoundLoaderContext used in the SomaLoader instance.

Implementation
    public function get soundLoaderContext():SoundLoaderContext
    public function set soundLoaderContext(value:SoundLoaderContext):void
statusproperty 
status:String  [read-only]

get the loading status of the SomaLoader instance, can be SomaLoader.STATUS_LOADING, SomaLoader.STATUS_PAUSED or SomaLoader.STATUS_STOPPED.

Implementation
    public function get status():String
Constructor detail
SomaLoader()constructor
public function SomaLoader()

Instantiates a SomaLoader

Method detail
add()method
public function add(url:String, container:DisplayObjectContainer = null, type:String = null, data:String = null, dataFormat:* = null):SomaLoaderItem

add an item at the end of the queue.

Parameters
url:String — URL of the object to load.
 
container:DisplayObjectContainer (default = null) — DisplayObjectContainer instance, if set and if possible, the file loaded will be added to the display list of this container.
 
type:String (default = null) — Type of the file that will be loaded. SomaLoader can find the proper type with the extension of the file, but it can be set manually (type example: SomaLoader.TYPE_BITMAP).
 
data:String (default = null) — custom Object that can contain anything.
 
dataFormat:* (default = null) — URLLoaderDataFormat for a URLLoader instance. The default is URLLoaderDataFormat.TEXT and can also be URLLoaderDataFormat.BINARY and URLLoaderDataFormat.VARIABLES.

Returns
SomaLoaderItem — an instance of SomaLoaderItem if it has been successfully added to the queue.
addAt()method 
public function addAt(url:String, index:int, container:DisplayObjectContainer = null, type:String = null, data:String = null, dataFormat:* = null):SomaLoaderItem

add an item to a specific index in the queue. The index 0 can't be used if the SomaLoader instance is currently loading.

Parameters
url:String — URL of the object to load.
 
index:int — position of the item in the queue.
 
container:DisplayObjectContainer (default = null) — DisplayObjectContainer instance, if set and if possible, the file loaded will be added to the display list of this container.
 
type:String (default = null) — Type of the file that will be loaded. SomaLoader can find the proper type with the extension of the file, but it can be set manually (type example: SomaLoader.TYPE_BITMAP).
 
data:String (default = null) — custom Object that can contain anything.
 
dataFormat:* (default = null) — URLLoaderDataFormat for a URLLoader instance. The default is URLLoaderDataFormat.TEXT and can also be URLLoaderDataFormat.BINARY and URLLoaderDataFormat.VARIABLES.

Returns
SomaLoaderItem — an instance of SomaLoaderItem if it has been successfully added to the queue.
addBinary()method 
public function addBinary(item:SomaLoaderItem, container:DisplayObjectContainer = null, data:* = null):SomaLoaderItem

add a SomaLoaderItem instance in the queue that contains Binary data (item.fileBinary), to create an instance of Bitmap or MovieClip.

Parameters
item:SomaLoaderItem — SomaLoaderItem that contains Binary data.
 
container:DisplayObjectContainer (default = null) — DisplayObjectContainer instance, if set and if possible, the file loaded will be added to the display list of this container.
 
data:* (default = null) — custom Object that can contain anything.

Returns
SomaLoaderItem — the instance of the SomaLoaderItem if it has been successfully added to the queue.
addBinaryAt()method 
public function addBinaryAt(item:SomaLoaderItem, index:int, container:DisplayObjectContainer = null, data:* = null):SomaLoaderItem

add a SomaLoaderItem instance that contains Binary data (item.fileBinary) to a specific index, to create an instance of Bitmap or MovieClip. The index 0 can't be used if the SomaLoader instance is currently loading.

Parameters
item:SomaLoaderItem — SomaLoaderItem that contains Binary data.
 
index:int — position of the item in the queue.
 
container:DisplayObjectContainer (default = null) — DisplayObjectContainer instance, if set and if possible, the file loaded will be added to the display list of this container.
 
data:* (default = null) — custom Object that can contain anything.

Returns
SomaLoaderItem — the instance of the SomaLoaderItem if it has been successfully added to the queue.
clearCache()method 
public function clearCache():void

clear the cache (remove all the SomaLoaderItem instance loaded).

contains()method 
public function contains(url:String):Boolean

Indicates if the queue contains an item with a URL.

Parameters
url:String — URL of the item.

Returns
Boolean — a Boolean.
dispose()method 
public function dispose(cacheIncluded:Boolean = false):void

stop and dispose the SomaLoader instance to remove listeners and delete built-in loaders.

Parameters
cacheIncluded:Boolean (default = false) — Whether or not the cache of the SomaLoader instance should be cleared in the same time.
getBinaryLoadedItemByOwnKey()method 
public function getBinaryLoadedItemByOwnKey(key:String, value:*):SomaLoaderItem

get a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.

   loader.add("photo1.jpg", null, null, {myKey:"myValue"}, URLLoaderDataFormat.BINARY);
   // or
   var item:SomaLoaderItem = loader.add("photo1.jpg");
   item.dataFormat = URLLoaderDataFormat.BINARY;
   item.data = {myKey:"myValue"};
   ...
   var itemBinary:SomaLoaderItem = loader.getBinaryLoadedItemByOwnKey("myKey", "myValue");
   

Parameters
key:String — property of an custom Object.
 
value:* — value of the property of an custom Object.

Returns
SomaLoaderItem — a SomaLoaderItem.
getBinaryLoadedItemByURL()method 
public function getBinaryLoadedItemByURL(url:String):SomaLoaderItem

get a SomaLoaderItem instance stored in the cache containing a ByteArray set to the fileBinary property of the SomaLoaderItem instance with the URL.

Parameters
url:String — URL of the SomaLoader instance

Returns
SomaLoaderItem — a SomaLoaderItem.
getBinaryLoadedItems()method 
public function getBinaryLoadedItems(type:String = null):Array

get the list of the SomaLoaderItem instances stored in the cache containing a ByteArray set to the fileBinary property of the SomaLoaderItem instance.

Parameters
type:String (default = null) — The type of the SomaLoaderItem can be specified to filter the search.

Returns
Array — an Array.
getIndex()method 
public function getIndex(url:String):int

get the item position in the queue with the url of this item.

Parameters
url:String — URL of the item.

Returns
int — the position of the item.
getItem()method 
public function getItem(url:String):SomaLoaderItem

get an item in the queue with the URL

Parameters
url:String — URL of the item.

Returns
SomaLoaderItem — the SomaLoaderItem instance that has been found.
getItemAt()method 
public function getItemAt(index:int):SomaLoaderItem

get an item in the queue at the specified index

Parameters
index:int — position of the item in the queue.

Returns
SomaLoaderItem — the SomaLoaderItem instance that has been found.
getLastItem()method 
public function getLastItem():SomaLoaderItem

get the last item added in the queue.

Returns
SomaLoaderItem — the SomaLoaderItem instance that has been found.
getLoadedItemByOwnKey()method 
public function getLoadedItemByOwnKey(key:String, value:*):SomaLoaderItem

get a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.

   loader.add("photo1.jpg", null, null, {myKey:"myValue"});
   // or
   var item:SomaLoaderItem = loader.add("photo1.jpg");
   item.data = {myKey:"myValue"};
   ...
   var item:SomaLoaderItem = loader.getLoadedItemByOwnKey("myKey", "myValue");
   

Parameters
key:String — property of an custom Object.
 
value:* — value of the property of an custom Object.

Returns
SomaLoaderItem — a SomaLoaderItem.
getLoadedItemByURL()method 
public function getLoadedItemByURL(url:String):SomaLoaderItem

get a SomaLoaderItem instance stored in the cache with the URL.

Parameters
url:String — URL of the SomaLoader instance

Returns
SomaLoaderItem — a SomaLoaderItem.
getLoadedItems()method 
public function getLoadedItems():Dictionary

get the list of the SomaLoaderItem instances stored in the cache.

Returns
Dictionary — a Dictionary.
info()method 
public function info():String

Returns a String describing the SomaLoader instance.

Returns
String — a String.
pause()method 
public function pause():void

stops the loading and keep the items not loaded in the queue, the loading can be resumed.

remove()method 
public function remove(url:String):Boolean

find an item with the URL and remove it from the queue.

Parameters
url:String — URL of the object to remove.

Returns
Boolean — a Boolean indicating if it has been successfully removed.
removeAll()method 
public function removeAll():Boolean

remove all the item from the queue. If the SomaLoader instance is currently loading, the item at the index 0 will not be removed.

Returns
Boolean — a Boolean indicating if the process has been successful.
removeAt()method 
public function removeAt(index:int):Boolean

find an item with the index and remove it from the queue. The index 0 can't be used if the SomaLoader instance is currently loading.

Parameters
index:int — position of the item in the queue.

Returns
Boolean — a Boolean indicating if it has been successfully removed.
removeItemLoaded()method 
public function removeItemLoaded(item:SomaLoaderItem):Boolean

remove a SomaLoaderItem instance stored in the cache.

Parameters
item:SomaLoaderItem — SomaLoaderItem instance to remove.

Returns
Boolean — a Boolean indicating that the item has been successfully removed.
removeItemLoadedByOwnKey()method 
public function removeItemLoadedByOwnKey(key:String, value:*):Boolean

remove a SomaLoaderItem instance stored in the cache with a key and a value of an Object set to the data property of a SomaLoaderItem instance.

   loader.add("photo1.jpg", null, null, {myKey:"myValue"}, URLLoaderDataFormat.BINARY);
   // or
   var item:SomaLoaderItem = loader.add("photo1.jpg");
   item.dataFormat = URLLoaderDataFormat.BINARY;
   item.data = {myKey:"myValue"};
   // if the item has been loaded:
   var item:SomaLoaderItem = loader.removeItemLoadedByOwnKey("myKey", "myValue");
   

Parameters
key:String — property of an custom Object.
 
value:* — value of the property of an custom Object.

Returns
Boolean — a SomaLoaderItem.
removeItemLoadedByURL()method 
public function removeItemLoadedByURL(url:String):Boolean

remove a SomaLoaderItem instance stored in the cache with the URL.

Parameters
url:String — URL of the SomaLoaderItem instance to remove.

Returns
Boolean — a Boolean indicating that the item has been successfully removed.
resume()method 
public function resume():void

resume a loading that has been paused.

setIndex()method 
public function setIndex(url:String, index:int):Boolean

set the item position in the queue with the url of this item.

Parameters
url:String — URL of the item.
 
index:int — position of the item in the queue.

Returns
Boolean — a Boolean indicating if the process has been successful.
start()method 
public function start():void

starts the loading of the items in the queue. The queue must contains at least one item.

stop()method 
public function stop():void

stops the loading and reset the queue.

Event detail
CACHE_CHANGEDevent 
Event object type: com.soma.loader.SomaLoaderEvent.CACHE_CHANGED
CACHE_CHANGED.type property = com.soma.loader.SomaLoaderEvent.CACHE_CHANGED

Indicates a change in the cache.

COMPLETEevent  
Event object type: com.soma.loader.SomaLoaderEvent.COMPLETE
COMPLETE.type property = com.soma.loader.SomaLoaderEvent.COMPLETE

Dispatched when a loading of an item is complete.

ERRORevent  
Event object type: com.soma.loader.SomaLoaderEvent.ERROR
ERROR.type property = com.soma.loader.SomaLoaderEvent.ERROR

Dispatched when an error has been found in the SomaLoader instance.

ID3_COMPLETEevent  
Event object type: com.soma.loader.SomaLoaderEvent.ID3_COMPLETE
ID3_COMPLETE.type property = com.soma.loader.SomaLoaderEvent.ID3_COMPLETE

Indicates an ID3 information is available when a mp3 starts to load.

PROGRESSevent  
Event object type: com.soma.loader.SomaLoaderEvent.PROGRESS
PROGRESS.type property = com.soma.loader.SomaLoaderEvent.PROGRESS

Dispatched when a loading of an item progresses.

QUEUE_CHANGEDevent  
Event object type: com.soma.loader.SomaLoaderEvent.QUEUE_CHANGED
QUEUE_CHANGED.type property = com.soma.loader.SomaLoaderEvent.QUEUE_CHANGED

Indicates a change in the queue.

QUEUE_COMPLETEevent  
Event object type: com.soma.loader.SomaLoaderEvent.QUEUE_COMPLETE
QUEUE_COMPLETE.type property = com.soma.loader.SomaLoaderEvent.QUEUE_COMPLETE

Dispatched when the loading of a list of items is complete.

QUEUE_PROGRESSevent  
Event object type: com.soma.loader.SomaLoaderEvent.QUEUE_PROGRESS
QUEUE_PROGRESS.type property = com.soma.loader.SomaLoaderEvent.QUEUE_PROGRESS

Dispatched when the loading of a list of items progresses.

QUEUE_STARTevent  
Event object type: com.soma.loader.SomaLoaderEvent.QUEUE_START
QUEUE_START.type property = com.soma.loader.SomaLoaderEvent.QUEUE_START

Dispatched when the loading of a list of items starts.

STARTevent  
Event object type: com.soma.loader.SomaLoaderEvent.START
START.type property = com.soma.loader.SomaLoaderEvent.START

Dispatched when a loading of an item starts.

STATUS_CHANGEDevent  
Event object type: com.soma.loader.SomaLoaderEvent.STATUS_CHANGED
STATUS_CHANGED.type property = com.soma.loader.SomaLoaderEvent.STATUS_CHANGED

Indicates a status change in the SomaLoader instance (loading, paused, stopped).

Constant detail
STATUS_LOADINGconstant
public static const STATUS_LOADING:String = "loading"

Constant value used to defined the status property of the SomaLoader instance when it is loading.

STATUS_PAUSEDconstant 
public static const STATUS_PAUSED:String = "paused"

Constant value used to defined the status property of the SomaLoader instance when it is paused.

STATUS_STOPPEDconstant 
public static const STATUS_STOPPED:String = "stopped"

Constant value used to defined the status property of the SomaLoader instance when it is stopped.

TYPE_BITMAPconstant 
public static const TYPE_BITMAP:String = "TypeBitmap"

Constant value used to defined the type property of the loader for an image.

TYPE_CSSconstant 
public static const TYPE_CSS:String = "TypeCSS"

Constant value used to defined the type property of the loader for an CSS file.

TYPE_FONTconstant 
public static const TYPE_FONT:String = "TypeFont"

Constant value used to defined the type property of the loader for a SWF containing fonts.

TYPE_MP3constant 
public static const TYPE_MP3:String = "TypeMP3"

Constant value used to defined the type property of the loader for a MP3.

TYPE_SWFconstant 
public static const TYPE_SWF:String = "TypeSWF"

Constant value used to defined the type property of the loader for a SWF.

TYPE_TEXTconstant 
public static const TYPE_TEXT:String = "TypeText"

Constant value used to defined the type property of the loader for an text file.

TYPE_UNKNOWNconstant 
public static const TYPE_UNKNOWN:String = "TypeUnknown"

Constant value used to defined the type property of the loader for an unknown file.

TYPE_XMLconstant 
public static const TYPE_XML:String = "TypeXML"

Constant value used to defined the type property of the loader for an XML file.

VERSIONconstant 
public static const VERSION:String = "1.0.1"

SomaLoader version.