The value you pass for the
SWF file at www.someDomain.com can load data only from sources that are also at
www.someDomain.com. If you want to load data from a different domain, you can place a cross-
domain policy file on the server that is hosting the SWF file. For more information, see "Applying
Flex Security" in Developing Flex Applications.
When the
load()
the XML data finishes downloading, the
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 executes when the
object is invoked.
Example
The following simple example uses the
// create a new XML object
var flooring:XML = new XML();
// set the ignoreWhite property to true (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("flooring.xml");
For the contents of the flooring.xml file, and the output that this example produces, see the
example for
XML.ignoreWhite
See also
XML.loaded,
XML.onLoad
XML.loaded
Availability
Flash Player 5.
Usage
my_xml.loaded:Boolean
Description
Read-only property; a Boolean value that is
call has completed successfully; otherwise, it is
XML.load()
464
Chapter 6: ActionScript Core Classes
parameter must be in exactly the same domain. For example, a
url
method is executed, the XML object property
XML.load()
.
property is set to
loaded
onLoad
method:
if the document-loading process initiated by the
true
false
is set to
loaded
false
, and the
true
onLoad
event handler of the XML
.
. When
event
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?