MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 133

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 132
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
130
Loads an XML document from a File object or from a URL over HTTP, and replaces the contents of the specified
XML object with the XML data. The load process is asynchronous; it does not finish immediately after the
load()
method is executed.
When the
load() method is executed, the XML object property loaded is set to false. When the XML data finishes
downloading, the
loaded property is set to true and the onLoad() event handler is invoked. The XML data is not
parsed until it is completely downloaded. If the XML object previously contained any XML trees, they are discarded.
You can define a custom function that is executed when the
onLoad() event handler of the XML object is invoked.
Availability
Flash Media Server 2
Parameters
url A File object or a URL where the XML document to be loaded is located. If the SWF file that issues this call is
running in a web browser,
url must be in the same domain as the SWF file. You cannot use a file path for this
parameter.
Returns
A boolean value;
true if successful; otherwise, false.
Example
The following simple example uses the
XML.load() method:
// Create a new XML object.
var flooring = new XML();
// Set the ignoreWhite property to true (the default value is false).
flooring.ignoreWhite = true;
// After loading is complete, trace the XML object.
flooring.onLoad = function(success) {
trace(flooring);
};
// Load the XML into the flooring object.
flooring.load("http://somehttpserver/flooring.xml");
For the contents of the flooring.xml file, and the output that this example produces, see the example for
XML.ignoreWhite.
XML.loaded
my_xml.loaded
A boolean value; true if the document-loading process initiated by the XML.load() call completed successfully;
otherwise,
false.
Availability
Flash Media Server 2
Example
The following example uses the
XML.loaded property in a simple script:
var my_xml = new XML();
my_xml.ignoreWhite = true;
Vedere la pagina 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 154 155

Commenti su questo manuale

Nessun commento