Ondata (Xml.ondata Handler) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Information is displayed in the Output panel when Flash invokes the
the call completes successfully,
success: true
loaded: true
status: 0
See also
load (XML.load method)

onData (XML.onData handler)

onData = function(src:String) {}
Invoked when XML text has been completely downloaded from the server, or when an error
occurs downloading XML text from a server. This handler is invoked before the XML is
parsed, and you can use it to call a custom parsing routine instead of using the Flash XML
parser. The src parameter is a string that contains XML text downloaded from the server,
unless an error occurs during the download, in which case the
By default, the
XML.onData
event handler with custom behavior, but
XML.onData
call it in your implementation of
Availability: ActionScript 1.0; Flash Player 5
Parameters
- A string or
src:String
server.
Example
The following example shows what the XML.onData event handler looks like by default:
XML.prototype.onData = function (src:String) {
if (src == undefined) {
this.onLoad(false);
} else {
this.parseXML(src);
this.loaded = true;
this.onLoad(true);
}
}
You can override the XML.onData event handler to intercept the XML text without parsing
it.
1302
ActionScript classes
is displayed for the
true
,
onLoad (XML.onLoad handler)
event handler invokes
.
XML.onData
; the raw data, usually in XML format, that is sent by the
undefined
onLoad()
status in the Output panel.
loaded
parameter is
src
. You can override the
XML.onLoad
is not called unless you
XML.onLoad
handler. If
.
undefined

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF