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/";









Hi
I am getting a problem with the scroller to load… it all works fine on my local machine but when i upload my site the pre loading screen appears (red sequenced squares..)
I have adjusted the script tag in the body of the ‘electrical.html’ page as this is where the scroller script is located. The settings.xml, images.xml and the imagescoller.swf files are in the root folder of the domain (www) I altered the path for the swfobject.js as this file sits in the ‘js’ folder….Could it be that xml files dont like to be run in the root folder or is it a simple path issue that im missing/!!
Much appreciated if you can look… www.integrated-electrical.co.uk/electrical.html
<script type=“text/javascript” src=”../js/swfobject.js”></script>
<script type=“text/javascript”>
var flashvars = {};
var params = {};
params.scale = “noscale”;
params.salign = “tl”;
params.wmode = “transparent”;
var attributes = {};
swfobject.embedSWF(“imagescroller.swf”, “ImageScrollerDiv”, “600”, “190”, “9.0.0”, false, flashvars, params, attributes);
</script>
K Rgds
Simon
Hi,
You have some wrong path to your photos in your images.xml file. Please make sure you’re using the correct ones.
Hi,
I am trying to integrate the 3Dstack into Drupal 6.
I have the embed code placed in page.tpl, the swfobject.js is in the js directory, settings.xml, images.xml are in the same directory as the page.tpl (theme directory).
Also the images folder that came with the package is in the theme directory (for the moment also with the images from the package).
I used all absolute paths to get it working, but the only thing that shows is the Flash XML logo.
The URL for the test site is http://prokrant.powercraft.nl in the settings.xml I used the following paths:
<settingsXML value=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/settings.xml”/> and
<imagesXML value=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/images.xml”/>
images.xml are called via:
<images> <image url=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/images/01.jpg” link=“http://www.flashxml.net” target=”_blank” title=“Hello” />
in page.tpl this code is called to embed the object <script type=“text/javascript” src=”<? print $base_path . path_to_theme(); ?>/js/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(”<? print $base_path . path_to_theme(); ?>/3dstack.swf”, “StackDiv”, “200”, “230”, “9.0.0”, false, flashvars, params, attributes); </script>
Any clue to get it working?
kind regards,
jeroen den Haan
Hi,
For the moment we don’t have instructions on how to install this component in Drupal.
But if you’ll give us access to your Drupal (username + password) we’ll install it for you.
If you’re interested, you could send the username and password to support at flashxml.net
Thank you.
Sorry!
its already working. I tested it local but on the server it works.
Hi,
I have a problem to get the urls working. I’m trying for testing to link to google.nl
my code in xml:
<Carousel> <photo image=“images/01.png” url=“http://www.google.nl” ><![CDATA[Download the new<br/>3D Carousel]]></photo> <photo image=“images/02.png” url=“http://www.google.nl” ><![CDATA[Download the new<br/>3D Carousel]]></photo>
</Carousel>
what’s wrong? if I click on the image it won’t work.
Thank you
Hello,
Please give us a link to your website and we will look into the problem.
Hi,
still not working. When I go to http://www.brgamecards.com.br/loja/index.php/ it doesn`t work but when I go to http://www.brgamecards.com.br/loja/ without the index.php, it works well. I already added this line flashvars.folderPath = “http://www.brgamecards.com.br/loja/swf/”; , but still not working.
Hi,
I just checked your website and because you’re using the slash (/) after the index.php in the links to change the language, you have these errors. When you change the language the banner is searched inside the index.php folder because of the slash.
Hi, I trying to put this in my website. It is working well but when I try to change the language, the banner disappear. You can check this here: www.brgamecards.com.br/loja
I`m using magento. Please, I really need help.
Thanks.
Hi,
Try to put this line:
in your head section.
Hi,
Is it possible to have multiple galleries in Joomla? Different pages with different XML setting & Images?
Hi,
What component are you talking about?
Dear Developer,
I have successfully installed “Banner and Rotator”. Everything look ok except the second bottom navigator button from the right was not working. It suppose to zoom in photo.
Appreciate your professional advise how to make the button work.
Thank You Very Much!
Hi,
You have to add this line:
in the embedding code of the SWF from your HTML file.
Hi
I am wondering if its possible to embed the swf into the <body> without having to place the js inside the <head>, I am studying the possibility of using the carousel inside a cms platform, where I have restriction on placing code in the <head>.thanks
Hello,
Yes, it is possible to put it in the body, but we suggest trying with the free version first.
I just installed image scroller (pd version) and can not get it to run
see, http://globalfilmsonline.com
Thank you, greatvalues@optonline.net
John
Hello,
Could you be more specific? We checked your website and aside from the fact that the imageScroller is 600px width in the settings file and 625px when you embed it (causing some white area between the component and the other elements) it works just fine.
Please clear your browser’s cache and visit your site again.