Packagecom.soma.loader
Classpublic class SomaLoaderEvent
InheritanceSomaLoaderEvent Inheritance flash.events.Event

Author: Romuald Quantin - www.soundstep.com
Project host: http://code.google.com/p/somaloader/
Class version: 1.0
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



Public Properties
 PropertyDefined by
  bytesLoaded : Number
The number or bytes loaded when the listener processes the event.
SomaLoaderEvent
  bytesTotal : Number
The total number of items or bytes that will be loaded if the loading process succeeds.
SomaLoaderEvent
  count : int
Number of items loaded.
SomaLoaderEvent
  errorMessage : String
Error message information.
SomaLoaderEvent
  id3Info : ID3Info
ID3Info instance dispatched when the current item is a MP3 and when the information is available.
SomaLoaderEvent
  item : SomaLoaderItem
SomaLoaderItem instance that is currently loading.
SomaLoaderEvent
  length : int
Number of items to load.
SomaLoaderEvent
  loader : SomaLoader
SomaLoader instance that has dispatched the current event.
SomaLoaderEvent
  loading : ILoading
ILoading instance used in the SomaLoader instance to show the progress.
SomaLoaderEvent
  percentItem : Number
Percentage value of the progress of the current item.
SomaLoaderEvent
  percentQueue : Number
Percentage value of the progress of the queue.
SomaLoaderEvent
Public Methods
 MethodDefined by
  
SomaLoaderEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false)
Creates a SomaLoaderEvent object to pass as a parameter to event listeners.
SomaLoaderEvent
  
clone():Event
Duplicates an instance of an SomaLoaderEvent.
SomaLoaderEvent
  
toString():String
Returns a string containing all the properties of the SomaLoaderEvent object.
SomaLoaderEvent
Public Constants
 ConstantDefined by
  CACHE_CHANGED : String = "com.soma.loader.SomaLoaderEvent.CACHE_CHANGED"
[static] Indicates a change in the cache.
SomaLoaderEvent
  COMPLETE : String = "com.soma.loader.SomaLoaderEvent.COMPLETE"
[static] Dispatched when a loading of an item is complete.
SomaLoaderEvent
  ERROR : String = "com.soma.loader.SomaLoaderEvent.ERROR"
[static] Dispatched when an error has been found in the SomaLoader instance.
SomaLoaderEvent
  ID3_COMPLETE : String = "com.soma.loader.SomaLoaderEvent.ID3_COMPLETE"
[static] Indicates an ID3 information is available when a mp3 starts to load.
SomaLoaderEvent
  PROGRESS : String = "com.soma.loader.SomaLoaderEvent.PROGRESS"
[static] Dispatched when a loading of an item progresses.
SomaLoaderEvent
  QUEUE_CHANGED : String = "com.soma.loader.SomaLoaderEvent.QUEUE_CHANGED"
[static] Indicates a change in the queue.
SomaLoaderEvent
  QUEUE_COMPLETE : String = "com.soma.loader.SomaLoaderEvent.QUEUE_COMPLETE"
[static] Dispatched when the loading of a list of items is complete.
SomaLoaderEvent
  QUEUE_PROGRESS : String = "com.soma.loader.SomaLoaderEvent.QUEUE_PROGRESS"
[static] Dispatched when the loading of a list of items progresses.
SomaLoaderEvent
  QUEUE_START : String = "com.soma.loader.SomaLoaderEvent.QUEUE_START"
[static] Dispatched when the loading of a list of items starts.
SomaLoaderEvent
  START : String = "com.soma.loader.SomaLoaderEvent.START"
[static] Dispatched when a loading of an item starts.
SomaLoaderEvent
  STATUS_CHANGED : String = "com.soma.loader.SomaLoaderEvent.STATUS_CHANGED"
[static] Indicates a status change in the SomaLoader instance (loading, paused, stopped).
SomaLoaderEvent
Property detail
bytesLoadedproperty
public var bytesLoaded:Number

The number or bytes loaded when the listener processes the event.

bytesTotalproperty 
public var bytesTotal:Number

The total number of items or bytes that will be loaded if the loading process succeeds.

countproperty 
public var count:int

Number of items loaded.

errorMessageproperty 
public var errorMessage:String

Error message information.

id3Infoproperty 
public var id3Info:ID3Info

ID3Info instance dispatched when the current item is a MP3 and when the information is available.

itemproperty 
public var item:SomaLoaderItem

SomaLoaderItem instance that is currently loading.

lengthproperty 
public var length:int

Number of items to load.

loaderproperty 
public var loader:SomaLoader

SomaLoader instance that has dispatched the current event.

loadingproperty 
public var loading:ILoading

ILoading instance used in the SomaLoader instance to show the progress.

percentItemproperty 
public var percentItem:Number

Percentage value of the progress of the current item.

percentQueueproperty 
public var percentQueue:Number

Percentage value of the progress of the queue.

Constructor detail
SomaLoaderEvent()constructor
public function SomaLoaderEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false)

Creates a SomaLoaderEvent object to pass as a parameter to event listeners.

Parameters
type:String — The type of event.
 
bubbles:Boolean (default = true) — Indicates whether an event is a bubbling event.
 
cancelable:Boolean (default = false) — Indicates whether the behavior associated with the event can be prevented.
Method detail
clone()method
public override function clone():Event

Duplicates an instance of an SomaLoaderEvent.

Returns
Event
toString()method 
public override function toString():String

Returns a string containing all the properties of the SomaLoaderEvent object.

Returns
String
Constant detail
CACHE_CHANGEDconstant
public static const CACHE_CHANGED:String = "com.soma.loader.SomaLoaderEvent.CACHE_CHANGED"

Indicates a change in the cache.

COMPLETEconstant 
public static const COMPLETE:String = "com.soma.loader.SomaLoaderEvent.COMPLETE"

Dispatched when a loading of an item is complete.

ERRORconstant 
public static const ERROR:String = "com.soma.loader.SomaLoaderEvent.ERROR"

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

ID3_COMPLETEconstant 
public static const ID3_COMPLETE:String = "com.soma.loader.SomaLoaderEvent.ID3_COMPLETE"

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

PROGRESSconstant 
public static const PROGRESS:String = "com.soma.loader.SomaLoaderEvent.PROGRESS"

Dispatched when a loading of an item progresses.

QUEUE_CHANGEDconstant 
public static const QUEUE_CHANGED:String = "com.soma.loader.SomaLoaderEvent.QUEUE_CHANGED"

Indicates a change in the queue.

QUEUE_COMPLETEconstant 
public static const QUEUE_COMPLETE:String = "com.soma.loader.SomaLoaderEvent.QUEUE_COMPLETE"

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

QUEUE_PROGRESSconstant 
public static const QUEUE_PROGRESS:String = "com.soma.loader.SomaLoaderEvent.QUEUE_PROGRESS"

Dispatched when the loading of a list of items progresses.

QUEUE_STARTconstant 
public static const QUEUE_START:String = "com.soma.loader.SomaLoaderEvent.QUEUE_START"

Dispatched when the loading of a list of items starts.

STARTconstant 
public static const START:String = "com.soma.loader.SomaLoaderEvent.START"

Dispatched when a loading of an item starts.

STATUS_CHANGEDconstant 
public static const STATUS_CHANGED:String = "com.soma.loader.SomaLoaderEvent.STATUS_CHANGED"

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