MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference page 734

Actionscript language reference
Table of Contents

Advertisement

Parameters
- A string; the destination URL for the specified XML object. If the SWF file
url:String
issuing this call is running in a web browser,
for details, see the Description section.
- A target XML object created with the XML constructor method that will
resultXML:XML
receive the return information from the server.
Example
The following example includes ActionScript for a simple e-commerce storefront application.
The
XML.sendAndLoad()
and 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 = myOnLoad;
my_xml.sendAndLoad("http://www.flash-mx.com/mm/login_xml.cfm",
myLoginReply_xml);
function myOnLoad(success:Boolean) {
if (success) {
if ((myLoginReply_xml.firstChild.nodeName == "packet") &&
(myLoginReply_xml.firstChild.attributes.success == "true")) {
gotoAndStop("loggedIn");
} else {
gotoAndStop("loginFailed");
}
} else {
gotoAndStop("connectionFailed");
}
}
See also
send (XML.send method)
onLoad (XML.onLoad handler)
734
ActionScript classes
url
method transmits an XML element that contains the user's name
handler to process the reply from the server.
onLoad
,
load (XML.load method)
must be in the same domain as the SWF file;
,
loaded (XML.loaded property)
,

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents