Sendandload (Xml.sendandload Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example defines an XML packet and sets the content type for the XML object.
The data is then sent to a server and shows a result in a browser window.
var my_xml:XML = new XML("<highscore><name>Ernie</name>
<score>13045</score></highscore>");
my_xml.contentType = "text/xml";
my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank");
Press F12 to test this example in a browser.
See also

sendAndLoad (XML.sendAndLoad method)

sendAndLoad (XML.sendAndLoad method)
public sendAndLoad(url:String, resultXML:XML) : Void
Encodes the specified XML object into an XML document, sends it to the specified URL
using the
method, downloads the server's response, and loads it into the
POST
specified in the parameters. The server response loads in the same manner
resultXMLobject
used by the
method.
XML.load()
In SWF files running in a version of the player earlier than Flash Player 7, the
parameter
url
must be in the same superdomain as the SWF file that is issuing this call. A superdomain is
derived by removing the left-most component of a file's URL. For example, a SWF file at
www.someDomain.com can load data from sources at store.someDomain.com, because both
files are in the same superdomain of someDomain.com.
In SWF files of any version running in Flash Player 7 or later, the
parameter must be in
url
exactly the same domain. For example, a SWF file at www.someDomain.com can load data
only from sources that are also at www.someDomain.com. If you want to load data from a
different domain, you can place a cross-domain policy file on the server hosting the SWF file.
When
is executed, the XML object property
is set to
. When
sendAndLoad()
loaded
false
the XML data finishes downloading, the
property is set to
if the data
loaded
true
successfully loaded, and the
event handler is invoked. The XML data is not parsed
onLoad
until it is completely downloaded. If the XML object previously contained any XML trees,
they are discarded.
Availability: ActionScript 1.0; Flash Lite 2.0 - Behavior changed in Flash Player 7.
XML
733

Advertisement

Table of Contents
loading

Table of Contents