Parameters
A Boolean value that evaluates to
success
or
XML.load()
XML.sendAndLoad()
Returns
Nothing.
Description
Event handler; invoked by Flash Player when an XML document is received from the server. If the
XML document is received successfully, the
received, or if an error occurred in receiving the response from the server, the
is
. The default, implementation of this method is not active. To override the default
false
implementation, you must assign a function that contains custom actions.
Example
The following example includes ActionScript for a simple e-commerce storefront application.
The
sendAndLoad()
password, and uses an
var login_str:String = "<login username=\""+username_txt.text+"\"
password=\""+password_txt.text+"\" />";
var my_xml:XML = new XML(login_str);
var myLoginReply_xml:XML = new XML();
myLoginReply_xml.ignoreWhite = true;
myLoginReply_xml.onLoad = function(success:Boolean){
if (success) {
if ((myLoginReply_xml.firstChild.nodeName == "packet") &&
(myLoginReply_xml.firstChild.attributes.success == "true")) {
gotoAndStop("loggedIn");
} else {
gotoAndStop("loginFailed");
}
} else {
gotoAndStop("connectionFailed");
}
};
my_xml.sendAndLoad("http://www.flash-mx.com/mm/login_xml.cfm",
myLoginReply_xml);
See also
function, XML.load(),
XML.parentNode
Availability
Flash Player 5.
Usage
my_xml.parentNode:XMLNode
operation; otherwise, it is
method transmits an XML element that contains the user's name and
handler to process the reply from the server.
XML.onLoad
XML.sendAndLoad()
if the XML object is successfully loaded with a
true
false
parameter is
success
.
. If the document was not
true
parameter
success
XML.parentNode
471
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?