Flash Lite 2.x and 3.0 ActionScript Language Reference

send (XML.send method)

public send(url:String, [target:String], method:String) : Boolean

Encodes the specified XML object into an XML document, and sends it to the specified URL using the POST method in a browser. The Flash test environment only uses the GET method.

Parameters

url:String - String; the destination URL for the specified XML object.

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

  • _self specifies the current frame in the current window.
  • _blank specifies a new window.
  • _parent specifies the parent of the current frame.
  • _top specifies the top-level frame in the current window.

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

method:String -

Returns

Boolean -

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)