Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Loading XML file in Flash

Status
Not open for further replies.

hiebosch

Technical User
Dec 13, 2001
2
CA
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.

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!";
	}
}
I'm sure I'm missing something really simple here. Any tips/help would be appreciated.

Thanks
 
I figured out my problem...it was the if (resume.loaded) portion.

Now I'm having a problem reading my xml file in Flash 5 probably due to whitespace.

The battle continues...
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top