464
Chapter 6: ActionScript Core Classes
The value you pass for the
url
parameter must be in exactly the same domain. For example, a
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()
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 executes when the
onLoad
event handler of the XML
object is invoked.
Example
The following simple example uses the
XML.load()
method:
// 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
true
if the document-loading process initiated by the
XML.load()
call has completed successfully; otherwise, it is
false
.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...