![MACROMEDIA Flash Lite 2 Скачать руководство пользователя страница 732](http://html1.mh-extra.com/html/macromedia/flash-lite-2/flash-lite-2_reference_687553732.webp)
732
ActionScript classes
Example
The following example creates and parses an XML packet:
var xml_str:String = "<state name=\"California\">
<city>San Francisco</city></state>"
// defining the XML source within the XML constructor:
var my1_xml:XML = new XML(xml_str);
trace(my1_xml.firstChild.attributes.name); // output: California
// defining the XML source using the XML.parseXML method:
var my2_xml:XML = new XML();
my2_xml.parseXML(xml_str);
trace(my2_xml.firstChild.attributes.name); // output: California
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.
Availability:
ActionScript 1.0; Flash Lite 2.0
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
-
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...