onData = function(src:String) {}
Invoked when a message is downloaded from the server and terminated by a zero (0) byte. You can override the XMLSocket.onData event handler to intercept data that the server sends without parsing it as XML. This capability is useful if you're transmitting arbitrarily formatted data packets, and you'd prefer to manipulate the data directly when it arrives, rather than have Flash Player parse the data as XML.
By default, the XMLSocket.onData method invokes the XMLSocket.onXML method. If you override XMLSocket.onData with custom behavior, XMLSocket.onXML is not called unless you call it in your implementation of XMLSocket.onData.
src:String - A string containing data that the server sends.
In this example, the src parameter is a string containing XML text downloaded from the server. The zero (0) byte terminator is not included in the string.
XMLSocket.prototype.onData = function (src) {
this.onXML(new XML(src));
}