Anyone saavy with XML?
by John Castelli
on
May 1, 2008 at 3:10:17 am
Hi all,
I'm going nuts here trying to figure out why I can't get this slide show I did to work. It's an XML slideshow in AS3. I have downloaded FLASHOTAKU components for a scroller and a slide show viewer, and then went to his website for a tutorial on how to create a slideshow. Everything is working fine. He supplied the code, how to put it together, and even has test files to compare your work to. I only have one problem, I can't get the flash movie to read the XML file, and/or the XML file to point to the images!
I think it might have something to do with my FTP site. I have tried to methods as far as showing the components the XML path. One, since all the folders will be in the same public folder on my FTP site (where all the HTML pages are) I point to it simply by saying "images.xml" and "thumbnails.xml". When I do that I get this error: "Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found."
The other way, I right click on the files on my FTP site and copy and paste the path. When I do that I get this error: "Error opening URL 'ftp://my ftp site.xml'
ERROR:The path of the xml file is not correct.
Any Idea what I could be doing wrong? or could try to fix this?
Re: Anyone saavy with XML? by Adam Ashby on May 3, 2008 at 7:27:55 pm
Once the swf is embedded in in a page it looks for the file relative to the location of the page not the location of the swf. So if your xml is located in a folder named flash and your page is in the main directory it would be something like this: flash/your.xml
Sometimes its easier just to put long descriptions of all your paths: http://yoursite.com/flash/your.xml
Re: Anyone saavy with XML? by John Castelli on May 3, 2008 at 7:46:27 pm
THANKS!!!!! I will try that as soon as I get home from work. I thought I had tried everything, but THAT is the one thing I didn't think of. I wouldn't have thought it was relative to the page. Thanks so much!
Re: Anyone saavy with XML? by John Castelli on May 4, 2008 at 12:05:05 am
Just so I am sure, do I then link the path in the XMLs relative to the html page itself, or do I link it relative to where its at compared to the XML file. The folders with the pics are in the same file as the XML, so should I make the path images/imagenames.jpeg or do i do it like I would the XML - Flash Movies/images/imagenames.jpeg?
Re: Anyone saavy with XML? by Adam Ashby on May 5, 2008 at 6:07:53 pm
The paths for the images are relative to the page, so Flash Movies/images/imagenames.jpeg would be correct.
I see there is a space in the named folder "Flash Movies". I think in the XML spaces should be handle with a %20. So it would be Flash%20Movies/images/imagenames.jpeg. That may be your problem.
Re: Anyone saavy with XML? by John Castelli on May 6, 2008 at 1:11:47 am
Hello Adam,
Well, your advice helped, but not 100%. I must still have something wrong in there somewhere. I now have the a scrolling bar in the thumbnail scroller and a bar in the viewer but no photos. If you think it will help to see it, feel free to go to johncastelli.com and then click on equipment. Right below the listing is where it Should be showing up. Maybe seeing it will help, but by the looks of it I'm one tiny mistake from having it working.
Re: Anyone saavy with XML? by John Castelli on May 4, 2008 at 3:09:30 am
Hey Adam,
So I tried what you said and had no luck. I get a horizontal line where the viewer would be, however, if that gives you any idea what might be the problem. What is the access security option when exporting the flash movie. Should I change it from local files only to network files only?