Hi,
I'm trying to learn how to use XML in Flash, but I'm having a problem with loading my XML file. I have a dynamic text field called contact, and I call the function loadResume by clicking a button.
The function just supposed to load the xml file, then has if statement to check if loaded. If true call function to write out xml data, or false show problem message. I've triple checked my resume.xml file location and path spelling. At the start my text field says "testing..." and then when I click the button I go straight to my problem message.
I'm sure I'm missing something really simple here. Any tips/help would be appreciated.
Thanks
I'm trying to learn how to use XML in Flash, but I'm having a problem with loading my XML file. I have a dynamic text field called contact, and I call the function loadResume by clicking a button.
The function just supposed to load the xml file, then has if statement to check if loaded. If true call function to write out xml data, or false show problem message. I've triple checked my resume.xml file location and path spelling. At the start my text field says "testing..." and then when I click the button I go straight to my problem message.
Code:
_root.contact = "testing...";
function loadResume(){
// create xml object
resumeData = new XML();
resumeData.Load("[URL unfurl="true"]http://localhost/resume/resume.xml");[/URL]
if (resumeData.loaded){
_root.contact = "Resume loaded";
_root.drawContact();
}else{
_root.contact = "Houston we have a problem!";
}
}
Thanks