MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 487

Actionscript language reference
Table of Contents

Advertisement

Description
Event handler; invoked by Flash Player when a connection request initiated through
XMLSocket.connect()
parameter is
true
The default implementation of this method performs no actions. To override the default
implementation, you must assign a function containing custom actions.
See also
function,
XMLSocket.connect()
XMLSocket.onData
Availability
Flash Player 5.
Usage
XMLSocket.onData = function(src:String) {
// your statements here
}
Parameters
A string containing the data sent by the server.
src
Returns
Nothing.
Description
Event handler; invoked when a message has been downloaded from the server, terminated by a
zero (0) byte. You can override
without parsing it as XML. This is a 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
override
XMLSocket.onData
call it in your implementation of
Example
In this example, the
The zero (0) byte terminator is not included in the string.
XMLSocket.prototype.onData = function (src) {
this.onXML(new XML(src));
}
has succeeded or failed. If the connection succeeded, the
; otherwise the
success
XMLSocket.onData
method invokes the
with custom behavior,
XMLSocket.onData
parameter is a string containing XML text downloaded from the server.
src
parameter is
.
false
to intercept the data sent by the server
XMLSocket.onXML
XMLSocket.onXML
.
success
method. If you
is not called unless you
XMLSocket.onData
487

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents