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

Jordon

Posted 11 months ago

The above tutorial is great and makes sense. Could you just explain how you’d code this in AS2? I am trying to load docmenu several times to include different sets of images.

I have it set so that the docmenu component is loaded onRelease of a series of buttons. Each button corresponds to a different set of images I need displayed. (xml.2, xml.3,etc.)

I posted previously tonight, and apologize for any over posting. It found this article shortly after my original post, and thought it’s most appropriate to post here.

Thanks

Jade

Posted one year ago

Hello again,

Please refer to the link below. I’m trying to publish the same component (the 3D Carousel Menu) twice on the same page. I followed your tutorial and insered the following code to the page :

[3d-carousel-menu-fx settings=“settings2.xml” width=“600” height=“400”][/3d-carousel-menu-fx]

I also tried :

[3d-carousel-menu-fx width=“600” height=“400” settings=“settings2.xml”][/3d-carousel-menu-fx]

None of them are working. Perhaps because I only have PHP 4 ? The strange things is that when I open the index.html file with my browser, I can clearly see both of the menus with my 2 sets of images.

Could you please advice me on this one?

Thank you !

FlashXML Support

Hi,

Send to support[at]flashxml.net the login details to your WP-Admin and we will check it.

Jade

Posted one year ago

Hello again,

I forgot to mention that the component is the 3D Carousel Menu. I attached a link to the specific page.

Thank you !

FlashXML Support

Hi,

We’ve checked your website and the Dock Menu FX and the Accordion FX work properly. If they load the same images, please clear your browser cache.

Jade

Posted one year ago

Sorry for the multiple messages but could you please check my site and see what’s wrong. I can’t manage to set 2 menus with different images in the same page.
Thank you so much !

Jade

Posted one year ago

Ok, nevermind, It works again !!!

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] flashxml.net.
(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 © FlashXML.net 2009 - 2012