Questions
Answer
Path issues with SWF files configured via XML
Generally, you must know that the path of the assets the SWF uses (the path of the images specified in the XML file and the path of the XML files themselves) must be relative to the path of the HTML file which embeds the SWF file (and not relative to the SWF file - a common confusion).

More conclusively:
If the folder path of the HTML differs from the product’s folder path (the folder in which the XML files and images folder are located) then you must specify that path through a variable called folderPath.
For example, in the swfobject embedding code, under this line:
var flashvars = {};
add this line:
flashvars.folderPath = "my_path";
and replace my_path with the path you need to follow to go from the location of the HTML file to the folder in which the assets are located. Alternatively you can specify an absolute path. Note that when you specify the folderPath, it must be terminated with a “/”.
If it is still unclear, please read this arbitrary example:
- the index.html file is located at this address on my domain:
http://www.mydomain.com/index.html
- the swfobject.js file is located at this address:
http://www.mydomain.com/js/swfobject.js
- the product's files (XMLs, assets and images folders) are located in this folder:
http://www.mydomain.com/mycomponent/
- the ComponentNameFX.swf file is located in the product's folder on my domain:
http://www.mydomain.com/mycomponent/ComponentNameFX.swf
In this case, the right embedding code in the index.html file using relative paths is:
<script type="text/javascript" src="mycomponent/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.folderPath = "mycomponent/";
var params = {};
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
params.allowScriptAccess = "always";
var attributes = {};
swfobject.embedSWF("mycomponent/ComponentNameFX.swf", "ComponentNameDiv", "600", "300", "9.0.0", false, flashvars, params, attributes);
</script>
So again, all the paths are relative to the path of the HTML file and note that the folderPath (if specified) should end with a slash (/). You can of course use any path you like for any type of file, but the references must be modified accordingly.
You can also use absolute paths, for example:
flashvars.folderPath = "http://www.mydomain.com/mycomponent/";
Comments
Do you have a question?
you will get an answer in 24 hours, tops.





pink79
Posted 4 months agoi am using image slider component… but i am modifying it by using xml document , this document will show text in swf main file but i want a link in this document to be hyperlinked to another swf or animation file lying on my desktop.
Is it possible to run another child swf file while running main swf using a hyperlink in a text file(created through xml)..?i just hope u got my point.
i need this ASAP..please help
Thanks
Hi,
Yes, it is possible. You need to edit the XML file and between the CDATA tags where the <a href> attribute is write the path to the SWF file like this:
pink79
Posted 4 months agoHi ,
Please help me..
i am making a flash presentation using CS3, it is working fine playing xml file from within the swf file.
Problem is:-
I have a link embedded in xml file (which i am playing in the presentation), i want to use that link to play another swf file located on my desktop.
which implies i m playing swf presentation but i want another swf to run from xml file..(i tried href// but not working)
Thanks
Hi,
Please specify which of our components you are using.
Casey
Posted 4 months agoHi,
I’m using the Dock Gallery for a page in my website and I cannot get it to show up on my page. I’m thinking it’s a path issue, but I’m not exactly sure where I should look to fix it. The files are all located in a folder called ‘lifedrawing’ and I thought I changed all the file paths to that folder, but no gallery ever shows up. If you could point me to a solution I would greatly appreciate it! Thank you.
Hi,
I checked your website and I found the problem. Our script that you have to insert in your HTML file is incomplete. You deleted a paragraph, above folderPath= you have to insert this code:
var flashvars = {};Lee Messenger
Posted 5 months agoRegarding previous FAQ inquiry and response, I made the flashvars changes as you suggested but the fx_text_menu is still not working.
Please help.
Lee Messenger
Posted 5 months agoI am now trying to have two products on the same page. I have followed your directions and seen the YouTube video but I am not getting it to work.
my website is “www.gashlandumc.org\genesis\index.html”
The index.html file is in the www.gashlandumc.org\genesis\ directory and the two component sub directories are: fx_text_menu and fx_accordion.
Please help me get this working and then I will purchase your complete deal package.
Many thanks.
lee
Hi,
Under var flashvars1 you wrote flashvars.folderPath, but the right code is flashvars1.folderPath. You have to do the same thing with flashvars2.