all groups > flash data integration > january 2005 >
You're in the

flash data integration

group:

XML/PHP across file structures



XML/PHP across file structures Voddie
1/31/2005 4:12:14 PM
flash data integration: Hi

I hope someone could assist me or point me in the right direction to find an
article about my problem.

I am trying out some rich internet applications in this case the Bike Trip
Central example downloaded from this site.

I have uploaded all the files and it works fine i.e. Provides the right text
and appropriate images. If I call the swf from another html page (not in the
same directory - but using the absolute path to the swf) It loads everything
except the data from the xml file.

Question.....does the html file have to reside in the same directory as the
swf, xml file and images.....if so why?

I have a dynamic image gallery taking data from a database. If I load the html
file for the swf it works fine, but if load the swf from an html page not in
the same directory no data is received.

Is the issue paths to the xml files/php files? Should these files be in the
same directory as the html file calling it?

Is it the browser that is calling the data or the flash movie?

Hope someone can assist, thanks in advance

Andy

Re: XML/PHP across file structures Doktor13
2/2/2005 5:17:17 AM
Hey Andy, I haven't taken a look at the actual code, but it is most likely a
path issue. The files theoretically shouldn't have to reside in the same
directory, but it sounds like the web app was written to access the files
relative to the directory where the .SWF is located... Once again, not having
looked at the code, Spidey Sense? tells me that you should have a look-see at
the PHP scripts. The data access functions are more than likely in them, and
you could adjust them accordingly to your own environment... [Insert Standard
Disclaimer Here] 'Your actual mileage may vary...' Hope this helps... -- The
Doktor http://www.skyymap.com/
Re: XML/PHP across file structures Loxam
2/7/2005 4:59:05 PM
Hello,

Path have to be relative to the HTML(or PHP etc...) page where the SWF is
loaded.
I explain :

Dir1/my.swf
Dir1/data.xml
Dir1/page.htm
If in my.swf the path is "data.xml" it's ok

Dir1/swf_files/my.swf
Dir1/xml_files/data.xml
Dir1/page.htm
If in page.htm the path is "swf_files/my.swf"
and in my.swf the path is "xml_files/data.xml" (NOT "../xml_files/data.xml")
it's ok.

Best Regard,
Loxam



AddThis Social Bookmark Button