03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■ _parent specifies the parent of the current frame.<br />

■ _top specifies the top-level frame in the current window.<br />

If you do not specify a window parameter, it is the same as specifying _self.<br />

method:String -<br />

Returns<br />

Boolean -<br />

Example<br />

The following example defines an XML packet <strong>and</strong> sets the content type for the XML object.<br />

The data is then sent to a server <strong>and</strong> shows a result in a browser window.<br />

var my_xml:XML = new XML("Ernie<br />

13045");<br />

my_xml.contentType = "text/xml";<br />

my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank");<br />

Press F12 to test this example in a browser.<br />

See also<br />

sendAndLoad (XML.sendAndLoad method)<br />

sendAndLoad (XML.sendAndLoad method)<br />

public sendAndLoad(url:String, resultXML:XML) : Void<br />

Encodes the specified XML object into an XML document, sends it to the specified URL<br />

using the POST method, downloads the server's response, <strong>and</strong> loads it into the<br />

resultXMLobject specified in the parameters. The server response loads in the same manner<br />

used by the XML.load() method.<br />

In SWF files running in a version of the player earlier than Flash Player 7, the url parameter<br />

must be in the same superdomain as the SWF file that is issuing this call. A superdomain is<br />

derived by removing the left-most component of a file's URL. For example, a SWF file at<br />

www.someDomain.com can load data from sources at store.someDomain.com, because both<br />

files are in the same superdomain of someDomain.com.<br />

In SWF files of any version running in Flash Player 7 or later, the url parameter must be in<br />

exactly the same domain. For example, a SWF file at www.someDomain.com can load data<br />

only from sources that are also at www.someDomain.com. If you want to load data from a<br />

different domain, you can place a cross-domain policy file on the server hosting the SWF file.<br />

XML 691

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!