Q1. Try this
var OrgsXML:XML = new XML();
trace (typeof(OrgsXML))
Q2. XML.load will return an error in the output window if it cannot find the
file. As well the success argument is false.
Q3. I alway add the <?xml version='1.0' encoding='UTF-8' ?> but you can
leave it out. Make sure there are no line breaks in the xml file.
<?xml version='1.0' encoding='UTF-8' ?><datapacket><message>Hello
World!</message></datapacket>'
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "MaveK" <webforumsuser@macromedia.com> wrote in message
news:dl3cpl$r8s$1@forums.macromedia.com...
Ok, I have isolated the problem to the XML variable data type. If I define
the
var OrgsXML:XML with the XML data type then the variable is "undefined" but
if
I leave out the XML data type then at least the file loads. Unfortunately
the
onLoad function returns the "error" instead of the sucess.
First question: Why is the XML datat ype causing the variable to be
undefined?
Second question: Why is the XML onLoad function returning an error? (Does
it
have anything to do with my XML file?)
Third question: Is there a standard XML format that flash is expecting?
(Macromedia has presented several diferent XML exammples.)
<?xml version="1.0" encoding="iso-8859-1"?>
<STATES>
<ORG STATE="OR"
ACRONYM="OCEANetwork"
URL="http://www.oceanetwork.org" />
<ORG STATE="VA"
ACRONYM="HEAV"
NAME="Home Educators Assocation of Virginia"
URL="http://www.heav.org" />
<ORG STATE="IA"
ACRONYM="IAHE"
NAME="Indiana Assocation of Home Educators"
URL="http://www.inhomeeducators.org" />
</STATES>