Topic: passing xml filename as a parameter

hi,
I would like to know if it is possible to pass the name of the file "gallery.xml" as a parameter in the PRO version.
Now I'm testing the free version.
I'm working on very dynamic page that changes the content of the xml file on the fly almost at every page request building the thumbnails as requested. It seems I've fixed the cache issues. But now another problem arises when multiple users access the page at same time with different values. It seems that some users displays wrong galleries downloading the other's generated xml file. The idea is to change the xml filename appending one unique identifier per user. Is this possible ? Or can you suggest another solution ?
thanks
Roberto

Re: passing xml filename as a parameter

Yes ,it's possible to set the XML file path as a parameter. Check 'To Customize XML Data Source' here:
http://www.airtightinteractive.com/simp … omize.html

Felix Turner
SimpleViewer Support Team.

Re: passing xml filename as a parameter

Thank you
Roberto

Re: passing xml filename as a parameter

I can't seem to get this to work. I am testing with:

<script type="text/javascript">
        var so = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#181818");               
        so.write("flashcontent");
        fo.addVariable("xmlDataPath", "gallery2.xml");   
    </script>   

Is this correct???

Re: passing xml filename as a parameter

Hi,

fo should match the name of the SWFObject - in your case so. So, switch fo.addVaraiable for so.addVariable.

Felix Turner
SimpleViewer Support Team.

Re: passing xml filename as a parameter

felix, this is still not working. source is as below:

    <script type="text/javascript">
        var so = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#181818");               
        so.write("flashcontent");
        so.addVariable("xmlDataPath", "galleries/Thailand.xml");   
    </script>   

there is an xml file in the galleries directory, permissions are set, and the path is relative - it doesn't work with a full path either .

result is continuously "gallery not found", regardless of what i enter. when i rename a file to "gallery.xml" it works, which leads me to believe it's not reading the variables at all. i've just purchased the pro edition. thanks.

Re: passing xml filename as a parameter

Hi,

 so.write&#40;"flashcontent"&#41;; 

has to go under

so.addVariable&#40;"xmlDataPath", "galleries/Thailand.xml"&#41;; 

I've updated the documentation to make this more clear.

Felix Turner
SimpleViewer Support Team.

Re: passing xml filename as a parameter

Works fine for me.

  I was having troubles at the same point. I have a model's site and I need to build on fly my xml files. With just one gallery.xml it was working well on Firefox, but in Explorer even when the xml file was erased and rebuilded with new data, the gallery alwas was the first one chosen.

This was the very right answer to my problem. I redirect the parameter to a single and diferent xml file for each model and worked.

Ciao!