I'm working on a XML slideshow application: http://fuzzylogical.com/clients/rei/slideshow/v5/ss_swfObject.html
Using SWFObject, I'm easily able to pass the variable tripPath to the swf using flashvars. <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("xml_photogallery_5.swf", "sotester", "570", "455", "7", "#FFFFFF"); so.addVariable("tripPath", "foo"); so.write("flashcontent"); // ]]> </script> I then use tripPath to append the directory where slideshow.xml lives (foo) using the following code: //-- Load XML --// function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; imagetitle = []; description = []; thumbnail = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; imagetitle[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue; thumbnail[i] = tripPath+xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue; } firstImage(); } else { content = "file not loaded!"; } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load(tripPath+"/slideshow.xml"); The problem I'm having is since I'm describing a relative path in the xml file, for example: <image>gal_00.jpg</image>, I'm unable to have the images reside in the same directory as the xml file. They have to be relative to the slideshow swf in order to load. Can anyone offer any thoughts on how I might concatenate tripPath to the beginning of the path of <image> described in the xml file? http://fuzzylogical.com/clients/rei/slideshow/v5/foo/slideshow.xml Thanks in advance, Corey _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com