PDA

View Full Version : Help with XML/Flash photo gallery



Superwilly
December 28th, 2006, 04:28 PM
Hi everyone. I used this tutorial to create a photo gallery for a site I'm developing. http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm (http://www.kirupa.com/forum/../developer/mx2004/xml_flash_photogallery.htm)

When I preview the gallery in Flash, it works fine, but when I insert the flash into a web page, and upload the works, it seems that the .swf is not connecting to the .xml file, so no images or image descriptions are displayed. If I click on the url for the uploaded .swf, it works fine, just not when imbedded in the following web page: http://www.terraceview.ca/dev/estates/updates.html

The swf is located at: http://www.terraceview.ca/dev/flash/te_photo_gallery.swf
The xml file is at: http://www.terraceview.ca/dev/flash/images.xml

Help please! I would really appreciate any insight on how to get this gallery working inside my web page.
Thanks!

Kraken
December 28th, 2006, 04:32 PM
I'm getting a 404 not found from the flash when it looks for this file:
http://www.terraceview.ca/dev/estates/images.xml

Looks like it's linking to the wrong folder.

Superwilly
December 28th, 2006, 05:40 PM
I'm getting a 404 not found from the flash when it looks for this file:
http://www.terraceview.ca/dev/estates/images.xml

Looks like it's linking to the wrong folder.

Sorry, I just mis-typed the URL in my original post.

The xml file is here: http://www.terraceview.ca/dev/flash/images.xml

Kraken
December 28th, 2006, 05:47 PM
No, I'm saying the flash piece is actually looking for the xml file inside the dev/estates folder. This is because once the flash is loaded into the HTML page, it takes the location of the HTML as its current location. So, flash believes it is in dev/estates and not dev/flash. What you need to do is have the flash load the xml like this:


myxml.load("../flash/images.xml");

Superwilly
December 28th, 2006, 06:11 PM
No, I'm saying the flash piece is actually looking for the xml file inside the dev/estates folder. This is because once the flash is loaded into the HTML page, it takes the location of the HTML as its current location. So, flash believes it is in dev/estates and not dev/flash. What you need to do is have the flash load the xml like this:
ActionScript Code:

myxml.load("../flash/images.xml");





.. or even easier, just upload the .xml file to the same location as the HTML page.

Thanks for your help! :)