How to load a xml file that is in a cgi-bin folder in a flash movie

I have a perl script inside the cgi-bin folder that requests a flash movie that is located outside the cgi-bin folder. This flash movie loads an xml file that is located inside the cgi-bin folder. The reason for this structure is that I need the perl script to be able to write to the xml file before it is loaded in the flash movie. Therefore, the xml file needs to be inside the cgi-bin (I do not want to change my .htaccess file). However, the flash movie is not able to load the xml file in a different directory from where the .swf movie is, even if I specify a different path in the as3 from where the .swf file is located.

xmlLoader.load(new URLRequest("cgi-bin/folder/file2.xml"));

It keeps looking for the xml file inside the directory where the .swf file is.

I also use the following html code to embed my flash movie and tell the perl script that the .swf file is located in a different directory, outside the cgi-bin folder

param name='base' value = ''

This is maybe what is creating the issue, but I do not see how to resolve it. Any help would be appreciated.


EDIT: I resolved the problem by leaving the xml file in my cgi-bin folder and by editing my Apache server configuration by adding a default-handler to the .xml extension. However, I am not sure if this may cause security issues and if there are other better solutions.


I think cgi-bin folder is not accessible by http. what you can do is create another perl script which reads the xml file and render it to the flash request.

Need Your Help

Eclipse: how to mark occurrences in file opened from History

version-control eclipse-cdt

I'm using Eclipse CDT (Kepler & Luna) and I've found the Mark Occurrences feature to be really helpful, especially the variables occurrences/write occurrences.

wxPython threading downloads

multithreading wxpython

I need to download a list of urls in a wxPython application, but I'm really new to threading, could anyone show me a working example of how to download links and put the output in a wx control.