Topic: Insert the xml text in the html file

Hi and happy new year to everyone!
Once I set the gallery.xml file by svBuilder, is it pobbile to insert the text of gallery.xml directly in the file containg the swf instead of including it by flashvars.galleryURL = "gallery.xml" ?
So I will be able to set some flashvars dinamically by php!
Thank you

Re: Insert the xml text in the html file

You can set the XML vars in the JavaScript in your html page using flashvars.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
            var flashvars = {};
            flashvars.galleryURL = "gallery.xml";
            flashvars.galleryStyle="MODERN";
            flashvars.thumbNavStyle="NUMERIC";
            flashvars.captionPosition="OVERLAY_BOTTOM";
            var params = {};            
            params.allowfullscreen = true;
            params.allowscriptaccess = "always";
            params.bgcolor = "222222";
            swfobject.embedSWF("simpleviewer.swf", "flashContent", "100%", "100%", "10.0.0", false, flashvars, params);
</script>
Mike Richards
SimpleViewer Support Team.

Re: Insert the xml text in the html file

I've tried to set a var in the Javascript using flashvars:
flashvars.flickrSetId ="number";
but it works as the flickrsetId was not set.

In the galley xml the flickrSetId is set as ""; have the vars set in the xml a priority ?

Last edited by mcgiglio (2010-01-02 11:49:31)