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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

my_xml.sendAndLoad("http://www.flash-mx.com/mm/login_xml.cfm",<br />

myLoginReply_xml);<br />

See also<br />

load (XML.load method), sendAndLoad (XML.sendAndLoad method)<br />

parseXML (XML.parseXML method)<br />

public parseXML(value:String) : Void<br />

Parses the XML text specified in the value parameter, <strong>and</strong> populates the specified XML<br />

object with the resulting XML tree. Any existing trees in the XML object are discarded.<br />

Parameters<br />

value:String - A string that represents the XML text to be parsed <strong>and</strong> passed to the specified<br />

XML object.<br />

Example<br />

The following example creates <strong>and</strong> parses an XML packet:<br />

var xml_str:String = "<br />

San Francisco"<br />

// defining the XML source within the XML constructor:<br />

var my1_xml:XML = new XML(xml_str);<br />

trace(my1_xml.firstChild.attributes.name); // output: California<br />

// defining the XML source using the XML.parseXML method:<br />

var my2_xml:XML = new XML();<br />

my2_xml.parseXML(xml_str);<br />

trace(my2_xml.firstChild.attributes.name); // output: California<br />

send (XML.send method)<br />

public send(url:String, [target:String], method:String) : Boolean<br />

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

using the POST method in a browser. The Flash test environment only uses the GET method.<br />

Parameters<br />

url:String - String; the destination URL for the specified XML object.<br />

target:String [optional] - String; the browser window to show data that the server returns:<br />

■ _self specifies the current frame in the current window.<br />

■ _blank specifies a new window.<br />

690 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!