How to specify the correct path in the embedding code of the SWFs


Generally, you must know that the path of the assets the SWF uses (the path of the images or videos 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).

If the folder path of the HTML differs from the product’s folder path (the folder in which the XML files and images or videos are located) then you must specify that path as value for the base attribute.

This is an example for 3D Banner FX (replace the product's name if you're using a different one):

- the index.html file is located at this address on your domain:

- the swfobject.js file is located at this address:

- the product's files (XMLs, assets and images) are located in the Banner folder:

- the 3DBannerFX.swf file is located in the product's folder:

This is the embedding code you have to use:

<div id="Div3DBannerFX"></div>
<script type="text/javascript" src="Banner/swfobject.js"></script> //specify the folder's name here
<script type="text/javascript">
 var flashvars = {};
 var params = {};
 params.base = "Banner/"; //specify the folder's name here
 params.scale = "noscale";
 params.salign = "tl";
 params.wmode = "transparent";
 params.allowFullScreen = "true";
 params.allowScriptAccess = "always";
 swfobject.embedSWF("Banner/3DBannerFX.swf", "Div3DBannerFX", "600", "374", "9.0.0", false, flashvars, params); //specify the folder's name here

You can also use absolute paths like in this example:

params.base = "";

In case you used a different folder name don't forget to replace in all locations the Banner name with the name of your folder.

Note: there are three different locations in the embedding code where you have to specify the product's folder name so make sure you update all of them.



Posted 9 years ago

ok.. dont get it.. im using word press. on my header.php file right below i am pasting this >>>

“ <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);

So where i can get the path if im using this as my folder

all the files i put them under this file “filesample”
Is this right.. cause i am not getting anything..
I ll like to know this to be sure if i can buy the product..
Thank you..

FlashXML Support


Let’s say you have your index.html file in your root folder

In this folder you have the following files:
xmls, images, swf.

The path to your assets must be relative to your html file:

<script type=“text/javascript”>
var flashvars = {};
flashvars.folderPath = “filesample/”;
var params = {};
params.scale = “noscale”;
params.salign = “tl”;
params.wmode = “transparent”;
var attributes = {};
swfobject.embedSWF(”filesample/component-name.swf”, “component-name-div”, “600”, “300”, “9.0.0”, false, flashvars, params, attributes);

Barbie Koelker

Posted 9 years ago

I can get this to work in Firefox and Chrome, but not Explorer. Please help. The website is

FlashXML Support


Have you tried to embed the swf in your html file using the dynamic method that is described on this page?


Posted 9 years ago

Hi, you asked me to give my web link to publish atleast two different components on my single HTML page, here it is( In any case I need the correct code for this for my own knowledge.
I would highly appreciate your kindness.

FlashXML Support


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);

<div id="CarouselDiv1"></div>
<div id="CarouselDiv2"></div>


Posted 9 years ago

Hi, 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.

FlashXML Support


Could you give me a link to your website?
I’ll make it work for you.


Posted 9 years ago

Hi, 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.

FlashXML Support


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.

Do you have a question?

you will get an answer in 24 hours, tops.

(required) Only alphanumeric characters allowed
(required) (will not be published)
Please type a message! Your message is too long! Either try to keep within 1500 characters, or contact our support team via email at support [at]
(will not be published)
You mistyped the two words!
Can't read? Change the image
Format your comments using Textile: *bold*, _italic_, "link text":address, @code@
Connect to us on Facebook Follow us on Twitter Subscribe to our RSS feed
Copyright © 2009 - 2020