XMLLoaderEvent
Kind of class: | public class |
---|---|
Package: | |
Inherits from: |
|
Classpath: | org.asaplibrary.data.xml.XMLLoaderEvent |
File last modified: | Wednesday, 11 May 2011, 18:34:51 |
Passes events for XMLLoader. Subscribe to type
_EVENT
.
Example
-
xmlLoader.addEventListener(XMLLoaderEvent._EVENT, handleXMLLoaded);
Listen for loader events:private function handleXMLLoaded (e:XMLLoaderEvent) : void { switch (e.subtype) { case XMLLoaderEvent.COMPLETE: handleXmlComplete(); break; case XMLLoaderEvent.ERROR: handleXmlError(); break; } }
Summary
Constructor
-
XMLLoaderEvent
(inSubtype:String, inName:String, inData:XML = null)
- Creates a new XMLLoaderEvent.
Constants
-
_EVENT
: String
- Event type.
-
COMPLETE
: String
- Subtype of event sent when loading of a single XML is complete
-
ALL_COMPLETE
: String
- Subtype of event sent when the stack of loading XMLs is empty
-
ERROR
: String
- Subtype of event sent when an error has occurred
-
PROGRESS
: String
- Subtype of event sent during loading of XML
Instance properties
- name : String
- subtype : String
- data : XML
- error : String
- bytesLoaded : uint
- bytesTotal : uint
Constructor
XMLLoaderEvent
function XMLLoaderEvent(inSubtype:String,
inName:String,
inData:XML = null)
Creates a new XMLLoaderEvent.
Parameters
inSubtype:either subtype; see above
inName :identifier name
inData :the XML data object (only at COMPLETE)
Constants
ALL_COMPLETE
static const ALL_COMPLETE:String = "allComplete"
Subtype of event sent when the stack of loading XMLs is empty
COMPLETE
static const COMPLETE:String = "complete"
Subtype of event sent when loading of a single XML is complete
ERROR
static const ERROR:String = "error"
Subtype of event sent when an error has occurred
PROGRESS
static const PROGRESS:String = "progress"
Subtype of event sent during loading of XML
_EVENT
static const _EVENT:String = "onXMLLoaderEvent"
Event type.
Instance properties
bytesLoaded
bytesLoaded:uint(read,write)
bytesTotal
bytesTotal:uint(read,write)
data
data:XML(read,write)
error
error:String(read,write)
name
name:String(read,write)
subtype
subtype:String(read,write)
Instance methods
clone
override function clone() : Event
Creates a copy of an existing XMLLoaderEvent.
Overrides
- Event.clone
toString
override function toString() : String
Overrides
- Event.toString