Hi,
I am having trouble loading XML content from Firefox. At this very moment I have Safari and Firefox open: Safari works every time, and firefox is unpredictable. When I run the code from within Flash CS3 it works 100% of the time.
The XML contains the names of folders within a directory, and I’m turning that information into a menu.
Here is the AS3 code:
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("http://*.com/xml/categories.php"));
myXMLLoader.addEventListener(Event.COMPLETE, processMenuXML);
function processMenuXML(e:Event):void {
myMenuXML=new XML(e.target.data);
my_sections = myMenuXML.section;
my_sections_total = my_sections.length();
createMenu();
}
categories.php returns this code:
<?xml version="1.0" encoding="UTF-8"?>
<portfolio>
<section name="ANIMALS"></section>
<section name="LANDSCAPES"></section>
<section name="MISC"></section>
<section name="PORTRAITS"></section>
<section name="STREET"></section>
<section name="TRAVEL"></section>
</portfolio>
I have tried it with and without the XML Version/Encoding line, and I have also linked directly to a .xml file and neither has made a difference.
Any ideas?
Thanks