I just found a solution to a thorn that's been in my side for some time now. On a few occasions I have had the need to use a photo gallery or page flip book SWF that reads an XML file to tell it which images to load, and provide basic text information such as captions.
I have found numerous "off the shelf" solutions at very reasonable prices, but had difficulty when I was trying to embed them into any sort of a dynamic system. Why? The HTML that referenced the Flash SWF was in a different folder than the SWF itself. Apparently, by default all relative paths in the SWF's actionscript are resolved relative to the containing HTML document's folder, not the folder containing the SWF.
The symptom observed was that the SWF would load just fine, but it would insist on loading the XML control file from the folder where the HTML or dynamically generated page (ASP, PHP, JSP, etc.) lived. (Your web server logs will help you see what is going on.) As a result, we could not use multiple flip-books driven by a single dynamic page.
SOLUTION: Add the "base" flash parameter to specify the home directory for the SWF. In the example below, I have a dynamic (ASP) page in /bridal that shows one of many photo galleries located in folders two levels beneath. Before adding the base param tag (for the object tag) and the base attribute of the embed tag, the gallery.swf was attempting to load the XML resource file from the /bridal directory, not the /bridal/images/martin_flyer folder, where the SWF file is located. See the bold italics in the code below for the fragments inserted.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" WIDTH=587 HEIGHT=430 VIEWASTEXT ID="Object1"> <PARAM NAME=movie VALUE="/bridal/images/martin_flyer/gallery.swf"> <PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF> <PARAM NAME=base VALUE="/bridal/images/martin_flyer/"> <EMBED src="/bridal/images/martin_flyer/gallery.swf" base="/bridal/images/martin_flyer/" quality=high bgcolor=#FFFFFF WIDTH=587 HEIGHT=430 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED></OBJECT>