
XML.status Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
946
|
ActionScript Language Reference
Description
The sendAndLoad() method serializes xmlDoc into a string of XML source code and sends
that string to a script or application that resides at
url. The specified xmlDoc must be the
top-level node in an XML object hierarchy (i.e., an instance of the XML class, not the
XMLnode class).
The receiving script or application at
url is expected to process the XML in some way and
send an XML document back as a response. The response document is caught by Flash,
parsed, converted into an XML object hierarchy, and placed in
resultXML. Any previous
contents of
resultXML are replaced by the newly loaded XML content. See XML.send() for
important information about sending XML to a server. Note that unlike send(),
sendAndLoad() sends
xmlDoc using a POST request in both the browser and Standalone
versions of Flash Player 6. However, in the Standalone Flash Player 5 on Windows,
sendAndLoad() uses the GET method. See Appendix F for details on support for GET and
POST.
Usage
Before accessing content imported with sendAndLoad(), we must be sure that the loading
and parsing operations are complete. To do so, we either check the value of
resultXML’s
loaded property or we assign resultXML an onLoad() event handler to respond to the load
completion. See ...