MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 1052

Actionscript language reference
Table of Contents

Advertisement

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
XML.send(), XML.load(), XML.loaded,
1052
Chapter 2: ActionScript Language Reference
XML.onLoad

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents