Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem loading XML file on Hosting server

Participant ,
Jan 30, 2008 Jan 30, 2008
I am having an issue wher the XML data file lods fine and displays on my testingg server but returns "undefined" when uploaded to the hosting server.

The page can be viewed at http://www.merryheartpuppets.com/index3.html

The actionscript for the clip is included below:

TOPICS
ActionScript
926
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Feb 02, 2008 Feb 02, 2008
The swf is working!!! and the xml data is being read in and displayed correctly. I'm still getting an error when attempting to display the slideshow.xml in the browser even with the changes.

I'm thinking that the happy outcome is the result of several things:
1. Making the changes that GWD suggested and
2. Pointing the domain at the correct folder. For some reason the hosting server was not pointing to the folder to which I had originally set it. So, I changed it. But the change didn't take aff...
Translate
Guru ,
Jan 31, 2008 Jan 31, 2008
The reason its not working on the production server is that the relative path to the xml is different.

You should get it to work by changing this line:

xn.load("slideshow.xml");

to:

xn.load("/swf/slideshow.xml");

You can read about relative paths here: http://www.flashgods.org/forums/viewtopic.php?t=113

Also, when viewing your xml in either explorer or firefox they reported problems with the format. Perhaps it still decodes ok in flash... but just FYI:
a.no whitespace should occur before the xml declaration (this is unrelated to the ignoreWhitespace option)
b.& should be encoded as an entity : & in the caption attribute for the last photo.
Making those changes meant I could view your xml correctly in a browser.
The other thing is that, for xml the convention (standard? not sure) is to name nodes and attributes with lower case instead of upper case. I don't think it's vital, but its just another FYI. You will see most examples elsewhere using lower case.

Here's the xml with those changes (not case conversion to lower case though as it would prevent your code from working):





Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 31, 2008 Jan 31, 2008
I updated the xml file, as well as the onload statement but I'm still receiving "undefined" on the host server.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 31, 2008 Jan 31, 2008
Please double check what you uploaded to the server. The load command appears to not have been updated. And I get the same error with the xml which seems to indicate it hasn't changed:
http://www.merryheartpuppets.com/swf/slideshow.xml

It looks like your swf on the server is still requesting "slideshow.xml" and not "/swf/slideshow.xml"
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2008 Jan 31, 2008
I get an XML Parsing Error. Try changing the first line in your XML file to:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 31, 2008 Jan 31, 2008
I don't think its the encoding. The parsing errors were outlined above.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2008 Jan 31, 2008
Good call. Sorry about that. I failed to read the entire post above.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 31, 2008 Jan 31, 2008
@bhuber7: not a problem. I would use utf-8 encoding as well. But I was able to get it working just by fixing the two things I outlined above. Maybe flash doesn't care about them as it was apparently working for WebXperience on the test server... even so it makes sense to change them
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 31, 2008 Jan 31, 2008
I deleted the files on the server and put the updated files from the local server all in the root folder of the host server. But although it works on the local server it continues to return the "undefined " status when run on the hosting server.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 02, 2008 Feb 02, 2008
You may think you have done that on your server but your server does not.

You can easily check that by trying to view the xml in your browser.
A. http://www.merryheartpuppets.com/slideshow.xml fails to show the xml and redirects after a 404 error
B. http://www.merryheartpuppets.com/swf/slideshow.xml (shows a failed attempt to display the xml in the browser because you haven't made the changes to the xml I recommended earlier).

If you do the two things I mentioned in my first post on this thread it should work.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 02, 2008 Feb 02, 2008
Thanks GWD for all your suggestions. I fixed the xml file as youm suggested, I then went into the .fla set the onload method to read as you suggested and it still it returned the &quot;undefined&quot; response. So, I deleted the index3.html file on the server as well as the swf and xml files off the host server then uploaded the updated files onto the hosting server but still I received the &quot;undefined&quot; error message. note the code of the updated slideshow.xml.

I don't want to generate any frustration on your part thinking that I am not following instructions. Because at the commencement of your assistance I have been endeavoring to do just that. Without success. I will attempt to do it again as soon as I finish submitting this reply.

Thanks for all your help so far. I do appreciate it!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 02, 2008 Feb 02, 2008
The swf is working!!! and the xml data is being read in and displayed correctly. I'm still getting an error when attempting to display the slideshow.xml in the browser even with the changes.

I'm thinking that the happy outcome is the result of several things:
1. Making the changes that GWD suggested and
2. Pointing the domain at the correct folder. For some reason the hosting server was not pointing to the folder to which I had originally set it. So, I changed it. But the change didn't take affect for some reason. Anyway, after further investigation I got the domain pointing to the correct sub-folder and now the swf is working.

Thanks everyone for your input patience and guidance. I could not have successfully achieved this without your input. TX!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 02, 2008 Feb 02, 2008
Hey its not a problem. Its just that I could see the same problem there from before.
And its working fine now
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 02, 2008 Feb 02, 2008
LATEST
Great to hear. To fix the xml (it displays in firefox but not IE) follow bhuber7's advice:
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines