Questions
Answer
How to publish a product twice on the same page
The answer is simple if you understand how SWF-XML-Images interact.
An article which explains this interaction would be Path issues with SWF files
So if you want to publish the same SWF twice on the same HTML page, you don’t need two SWF files nor two swfobject.js files, but you’ll need different settings.xml (e.g. settings1.xml, settings2.xml) and different images.xml files (e.g. images1.xml, images2.xml) and also different images (if you don’t want to have the same pictures obviously). You can specify in a settings.xml file which images.xml to load through assets attribute.
Note that some products have menu.xml instead of images.xml.
So on the same HTML page, you can have in the head section two references to the same SWF file, but with different settings.xml file:
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars1 = {};
flashvars1.settingsXML= "settings1.xml";
var params1 = {};
params1.scale = "noscale";
params1.salign = "tl";
params1.wmode = "transparent";
var attributes1 = {};
swfobject.embedSWF("component-name.swf", "ComponentDiv1", "600", "300", "9.0.0", false, flashvars1, params1, attributes1);
var flashvars2 = {};
flashvars2.settingsXML= "settings2.xml";
var params2 = {};
params2.scale = "noscale";
params2.salign = "tl";
params2.wmode = "transparent";
var attributes2 = {};
swfobject.embedSWF("component-name.swf", "ComponentDiv2", "300", "200", "9.0.0", false, flashvars2, params2, attributes2);
</script>
Notice I named the instances of the same SWF file ComponentDiv1 and ComponentDiv2.
Insert these two instances anywhere in your HTML document:
<div id="ComponentDiv1"></div>
…
<div id="ComponentDiv2"></div>
In settings1.xml and settings2.xml, make sure you’re referring to a proper imagesXML file (like images1.xml and images2.xml), in which you’ll edit the paths and other details of the images for the two different components.
Comments
Do you have a question?
you will get an answer in 24 hours, tops.





leon
Posted 13 days agoHi. I’ve no idea how to change the settings. Can you advice?
Hi,
Please read this FAQ article.
Nehal
Posted 31 days agoTHank u very much for your great efforts either in your products or in supporting us :) ..
Nehal
Posted one month agoI used dock gallery (free package) to show Images related to the conferences belong to my organization so I need to create .xml dynamically to get images for each conference showed at the moment but when i changed :
flashvars1.settingsXML= “settings1.xml”;
to
another name, the gallery doesn’t work ?
Hi,
Please read this FAQ article.
ivan hendija
Posted one month agoHello I’ve bought bannerrotator component 1 year ago – now having problems with 3 different sets of images (different settings.xml file).
My code is, link is provided bellow:
<script type=“text/javascript”> var flashvars = {}; flashvars.settingsXML= “settings2.xml”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(“BannerRotatorFX.swf”, “BannerRotatorFXDiv”, “960”, “196”, “9.0.0”, false, flashvars, params, attributes); </script>
Hi,
Could you please explain where you are encountering problems as the Banner seemed OK in the link you provided.
hamsterlabs
Posted 3 months ago@0l3er
You can use the gallery as a plugin and just setting up the configuration by tags e.g.:
{imageslider pathtosettings=“yourSettings.xml”}{/imageslider}
You can use the gallery as a module,too. But then you have to change more things of course.
Be sure to modify your path the right way…