728
ActionScript classes
You can define a custom function that executes when the
onLoad
event handler of the XML
object is invoked.
Availability:
ActionScript 1.0; Flash Lite 2.0 - Behavior changed in Flash Player 7.
Parameters
url
:
String
- A string that represents the 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; for details, see the Description section.
Returns
Boolean
-
false
if no parameter (null) is passed;
true
otherwise. Use the
onLoad()
event
handler to check the success of a loaded XML document.
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
ignoreWhite (XML.ignoreWhite property)
,
loaded (XML.loaded property)
,
onLoad
(XML.onLoad handler)
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...