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 assets’ 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/mycomponent/index.html
- the swfobject.js file is located at this address:
http://www.mydomain.com/js/swfobject.js
- the asset files (XMLs and images folder) are located in this foloder:
http://www.mydomain.com/mycomponent/assets/
- the SWF file is located on the root folder on my domain:
http://www.mydomain.com/component-name.swf
In this case, the right embedding code in the index.html file using relative paths is:
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.folderPath = "assets/";
var params = {};
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
var attributes = {};
swfobject.embedSWF("../component-name.swf", "component-name-div", "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/assets/";
Do you have a question?
you will get an answer in 24 hours, tops.



Barbie Koelker
Posted 6 Months AgoI can get this to work in Firefox and Chrome, but not Explorer. Please help. The website is www.primusgolf.com
Hi,
Have you tried to embed the swf in your html file using the dynamic method that is described on this page?
TYAGI
Posted 6 Months AgoHi, you asked me to give my web link to publish atleast two different components on my single HTML page, here it is( kashmaar.7p.com). In any case I need the correct code for this for my own knowledge.
I would highly appreciate your kindness.
Hi,
In your html file you have something like this:
@<td>The issue represents the tussle between ….</td>.
Let’s say that you want to publish two carousels in the above table cell.
First create two different folders in your website root folder:
carousel1 and carousel2.
In the carousel1 folder place the following files: XML, images.
Make sure you rename carousel.swf, settings.xml and images.xml to carousel1.swf, settings1.xml and images1.xml.
In the second folder place the same files and rename the xml files to carousel2.swf, settings2.xml and images2.xml.
Copy the swfobject.js file in your root folder and write the following lines in your html file in the <td></td> element that we specified above.
@<script type=“text/javascript” src=“swfobject.js”></script>
<script type=“text/javascript”>
var flashvars1 = {};
flashvars1.folderPath = “carousel1/”
flashvars1.settingsXML= “settings1.xml”;
var params1 = {};
params1.scale = “noscale”;
params1.salign = “tl”;
params1.wmode = “transparent”;
var attributes1 = {};
swfobject.embedSWF(“carousel1/carousel1.swf”, “CarouselDiv1”, “600”, “300”, “9.0.0”, false, flashvars1, params1, attributes1);
var flashvars2 = {};
flashvars2.folderPath = “carousel2/”
flashvars2.settingsXML= “settings2.xml”;
var params2 = {};
params2.scale = “noscale”;
params2.salign = “tl”;
params2.wmode = “transparent”;
var attributes2 = {};
swfobject.embedSWF(“carousel2/carousel2.swf”, “CarouselDiv1”, “300”, “200”, “9.0.0”, false, flashvars2, params2, attributes2);
</script>@
TYAGI
Posted 6 Months AgoHi, previously i asked you about publishing two different components on the same web page, i went through the tutorial(which is based on publishing same components), but unfortunately I am not clear. Please illustrate it with an example having two different components.
High Regards.
Hi,
Could you give me a link to your website?
I’ll make it work for you.
TYAGI
Posted 7 Months AgoHi, I am really new to Flash, How can I have Banner Rotator and 3d Menu Fx simultaneously on my single web page respectively? As I tried one of the either works, is it bcz i changed the one of their all assets name!
I would highly appreciate any assistance.
regards!
Hi,
Here you’ll find a tutorial that explains in detail how to publish the same component on the same page.
So basically the procedure for publishing two differents components on the same page is almost the same.
Nando Skunk
Posted 7 Months Agothe website is http://www.urbanvalencia.com
all the files are into the root folder with the index.html file
Thanks so much
Hi,
Try to put your images folder in your root folder.
Or you could set the folderPath.
Here you’ll find detailed explanations on how to set the folderPath.
Nando Skunk
Posted 7 Months AgoHi
I bought the license for the banner rotator FX yesterday and I have the same problem as Brieuc Kestens, on my site appears only several ‘circular waiting symbols’ too, after follow the instructions many times…
I put all the files in to the root folder of the domain and still not working.
Please help me, I like your product and it will looks so fine on my website
Thanks in advance!!
Hi,
Could you please give me a link to your website?
I’ll check it out, to see what it’s the problem.
moodle user
Posted 7 Months AgoCan you use this this on Moodle (VLE package)
Hi,
Normally it should work because Moodle uses php pages.
Christopher Cousens
Posted 7 Months AgoHello,
I’m trying to put your Banner flash in to a Magento Homepage but it keeps coming up blank.
I’ve tried copying all of your code to my Static CMS page and also hardcoding all the URLs/Paths but still no luck.
I really do like your product and I’d like to get it to work before going ahead and buying it.
Please help.
Hi,
Try to embed the Banner Rotator FX in your Magento project using the static method.
This should work.
Bob
Posted 7 Months AgoI have purchased The “Carousel” plus the Bottom horizontal version (just for the record)
The problem I’m having is I would like to use the images buttons to place a video file on the page. I’m using a three part frame, the center frame id being “mainFrame”. Could you put me out of my misery by confirming that the command target “_mainFrame” won’t work on you system?
Please note: all the files and folder are in the same directory.
Obviously I would like to us your system graphically it’s very pleasing but if it won’t work I will have to attempt design something myself in flash – that’ll be interesting??
Bob
Hi,
I’ll show you an example on how to load in a frame a new image each time you click on a thumb.
So in your images.xml file at the url attribute you need to specify something like this:
url = “javascript:GroupDelegate(‘images/01.jpg’)”
url = “javascript:GroupDelegate(‘images/02.jpg’)”
url = “javascript:GroupDelegate(‘images/03.jpg’)”
.... and so on
In the html file that embeds the carousel.swf file you’ll need to write the following piece of javascript code between the <head></head> tags:
function GroupDelegate(url) { if(document.getElementById("frame1") == null) { iframeObj = document.createElement("IFRAME"); iframeObj.setAttribute("src", url); iframeObj.setAttribute("id", "frame1"); iframeObj.style.width = 640 "px"; iframeObj.style.height = 480 "px"; document.body.appendChild(iframeObj); } else { document.getElementById("frame1").setAttribute("src", url); } } </script>This should help you.
Brieuc Kestens
Posted 7 Months Agothis is the URL with the problem: http://brieuckestens.squarespace.com/mes-albums/
this is my setting.xml file: http://brieuckestens.squarespace.com/storage/settings.xml
this is my images.xml file: http://brieuckestens.squarespace.com/storage/images.xml
and finally my .swf file: http://brieuckestens.squarespace.com/storage/accordion.swf
Hi,
Please re-download the archive. We made some updates.