Login / Sign Up

Your cart has 9 products totalling 306.50 USD

How to publish a component twice on the same page

 

 

These instructions cover the FX labeled components, not other components or SWFs.

 

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 and images.xml files, and also different images (if you don’t want to have the same pictures obviously).

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
  • SEARCH COMMENTS
  • loading comments...
  • 1
  • 2
  • 3
  • 4
  • 5
  • >
Cody M

I do not understand :S … I found a java code on some site. I put that code in, and it worked fine. I put it in twice, it doesn’t do anything. What do you mean by component

Posted Yesterday
Cody M

Hey, I’m using this javascript code below… I’m wanting to make another form box with different texts… But it will not let me use the same code twice on my html page.. how do I fix this?

<form name=“scriptform”><input name=“scriptinput” size=95 style=“border-width:1px solid black;font:TimesNewRoman”> <input type=“button” value=“Random” onClick=“randomdisplay()”></form>

<script>

quotes = new Array();
quotes0=“Warning: Dates in Calendar are closer than they appear.”;
quotes1=“Daddy, why doesn’t this magnet pick up this floppy disk?”
quotes2=“Give me ambiguity or give me something else.”
quotes3=“I.R.S.: We’ve got what it takes to take what you’ve got!”
quotes4=“We are born naked, wet and hungry. Then things get worse.”
quotes5=“Pentiums melt in your PC, not in your hand.”
quotes6=“Suicidal twin kills sister by mistake!”
quotes7=“Did anyone see my lost carrier?”
quotes8=“Make it idiot proof and someone will make a better idiot.”
quotes9=“I’m not a complete idiot, some parts are missing!”
quotes10=“He who laughs last thinks slowest!”
quotes11=“Always remember you’re unique, just like everyone else.”
quotes12=“Save the whales, collect the whole set”
quotes13=“A flashlight is a case for holding dead batteries.”
quotes14=“Lottery: A tax on people who are bad at math.”
quotes15=“There’s too much blood in my caffeine system.”
quotes16=“Artificial Intelligence usually beats real stupidity.”
quotes17=“Hard work has a future payoff. Laziness pays off now.”
quotes18=“Friends help you move. Real friends help you move bodies.”
quotes19=“I wont rise to the occaasion, but I’ll slide over to it.”
quotes20=“Ever notice how fast Windows runs? Neither did I.”
quotes21=“Double your drive space – delete Windows!”
quotes22=“What is a free gift ? Aren’t all gifts free?”
quotes23=“If ignorance is bliss, you must be orgasmic.”
quotes24=“Very funny, Scotty. Now beam down my clothes.”
quotes25=“Puritanism: The haunting fear that someone, somewhere may be happy.”
quotes26=“Consciousness: that annoying time between naps.”
quotes27=“Oops. My brain just hit a bad sector.”
quotes28=“I used to have a handle on life, then it broke.”
quotes29=“Don’t take life too seriously, you won’t get out alive.”
quotes30=“I don’t suffer from insanity. I enjoy every minute of it.”
quotes31=“A pedestrian hit me and went under my car.”
quotes32=“Better to understand a little than to misunderstand a lot.”
quotes33=“The gene pool could use a little chlorine.”
quotes34=“When there’s a will, I want to be in it.”
quotes35=“Okay, who put a stop payment on my reality check?”
quotes36=“Few women admit their age. Few men act theirs.”
quotes37=“I’m as confused as a baby in a topless bar.”
quotes38=“We have enough youth, how about a fountain of SMART?”
quotes39=“All generalizations are false, including this one.”
quotes40=“Change is inevitable, except from a vending machine.”
quotes41=“C program run. C program crash. C programmer quit.”
quotes42=“Criminal Lawyer is a redundancy.”
quotes43=“640K ought to be enough for anybody. – Bill Gates 81”
quotes44=“90% of all statistics are made up”
quotes45=“A man needs a good memory after he has lied.”
quotes46=“A little work, a little sleep, a little love and it is all over.”
quotes47=“A lot of people mistake a short memory for a clear conscience.”
quotes48=“Apple copyright 6024 b.c., Adam & Eve”
quotes49=“Apple Copyright 1767, Sir Isaac Newton.”
quotes50=“Bad knee, gotta run – Pat Buchanan to his draft board”
quotes51=“Beam me aboard, Scotty….. Sure. Will a 2×10 do?”
quotes52=“Beulah, peel me a grape.”
quotes53=“Bother, said Pooh as the brakes went out!”
quotes54=“Build a watch in 179 easy steps – by C. Forsberg.”
quotes55=“C++ should have been called B”
quotes56=“COINCIDENCE happens.”
quotes57=“Calvin, we will not have an anatomically correct snowman!”
quotes58=“Careful. We don’t want to learn from this. — Calvin”
quotes59=“Energizer Bunny Arrested! Charged with battery.”

function randomdisplay(){
randomquote=quotes[Math.floor(Math.random()*quotes.length)]
document.scriptform.scriptinput.value=randomquote
}

setTimeout(“randomdisplay()”,100)

</script>

support

Hello,

Could you be more specific about what component you are trying to use?

Posted 2 Days Ago
axial load

First off nice site. Im not sure if it has been addressed, however when using Chrome I can never get the entire blog to load without refreshing alot of times. Could just be my laptop. Enjoy!

support

Hello,

When you say “blog” are you referring to our site? If this is so, we haven’t encountered any other user with the same problems.

Thank you for the feedback.

Posted 6 Days Ago
FabrizioB

In your answer you told me:

“...Hi, Could you please give me access to your website?
I’ll made the changes for you. Thank you…”

I’m ready to send to you information about FTP access to download a ZIP file with structure of the web site: rooot folder with files and dirs about page with twice Image Scroller FX.

Can you say to me your email address to receive this access datas?

Thank a lot?

Fabrizio

support

Hi,

Send to support[at]flashxml.net all the details we need to connect to your FTP.

Posted 9 Days Ago
FabrizioB

Send again this probem because I’m not understood your previous answer… Sorry.

In this page:
http://www.orenji.it/viesca/newsite/properties_villa_viesca.html

There are two Image Scroller FX gallery (one in Gallery section “A” with 16 images and one in Museum section “B” with 6 images). Museum section is a DIV closed by default. If you want view this gallery you must clic to enlarge the DIV.

Case #1: you just arrived on this page

Scroller Image FX work fine: you see small images (and scroller), you clic to enlarge any image and see their number: Image x of 16

Case #2: you clic to enlarge DIV with Musem gallery

Scroller Image FX doesn’t work rightly: you see small images (and scroller) BUT...

- If you clic to enlarge any image from Museum Gallery “B” you see image from Gallery “A” and counter show to you “image x of 22”... (16 + 6)

- If you clic to enlarge any image from Gallery “A” first you see counter “Image x of 22” and when you arrived on the last image of Gallery “A” you can continue with NEXT button and wiew images from Museum Gallery “B”...

In my HTML file I’ve set (you can see this from url up):

<script type=“text/javascript”> var flashvars1 = {}; flashvars1.folderPath = “gallery_scroller_villaviesca/”; flashvars1.settingsXML= “settings1.xml”; var params1 = {}; params1.scale = “noscale”; params1.salign = “tl”; params1.wmode = “transparent”; var attributes1 = {}; swfobject.embedSWF(“gallery_scroller_villaviesca/FXImageScroller.swf”, “ImageScrollerDiv1”, “500”, “170”, “9.0.0”, false, flashvars1, params1, attributes1); var flashvars2 = {}; flashvars2.folderPath = “gallery_scroller_villaviesca/”; flashvars2.settingsXML= “settings2.xml”; var params2 = {}; params2.scale = “noscale”; params2.salign = “tl”; params2.wmode = “transparent”; var attributes2 = {}; swfobject.embedSWF(“gallery_scroller_villaviesca/FXImageScroller.swf”, “ImageScrollerDiv2”, “500”, “170”, “9.0.0”, false, flashvars2, params2, attributes2);
</script>

You can view XML files from:

http://www.orenji.it/viesca/newsite/gallery_scroller_villaviesca/settings1.xml
http://www.orenji.it/viesca/newsite/gallery_scroller_villaviesca/settings2.xml
http://www.orenji.it/viesca/newsite/gallery_scroller_villaviesca/images1.xml
http://www.orenji.it/viesca/newsite/gallery_scroller_villaviesca/images2.xml

Can you help me?

Best regards.

Fabrizio

support

Hi,

Could you please give me access to your website?
I’ll made the changes for you.

Thank you.

Posted 9 Days Ago
Riccardo

Hi there,
I purchased a dock-gallery-fx for wordpress that works fine.

I need to use it in three different pages, each page has its own set of images while settings, for consistency among pages, must be the same for all pages. You can get why very well looking at the site http://sylogic1.zucchetti.com/ctcolombo and navigate the “Prodotti” menu.

How can I do this?

Thanks in advance

Riccardo

support

Hello,

Create 3 identical settings.xml files. Make them settings1 settings2 and settings3. Make them the same, except for the fact that in settings1 , the “imagesXML” parameter has the value “images1.xml”. In settings2 it has “images2.xml” and in settings3 it has “images3.xml”.

When you embed the components in your pages, follow the tutorial above.
Component 1:

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

Component 2

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
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>

Component 3

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars3 = {};
flashvars3.settingsXML= "settings2.xml";
var params2 = {};
params3.scale = "noscale";
params3.salign = "tl";
params3.wmode = "transparent";
var attributes2 = {};
swfobject.embedSWF("component-name.swf", "ComponentDiv3", "300", "200", "9.0.0", false, flashvars3, params3, attributes3);
</script>

Do not forget to change, in the swfobject.embedSWF function, the “component-name.swf” to whatever your component is.

Posted 11 Days Ago
Mark

Looking at that question now, I feel pretty stupid. Thank you for your timely and excellent support.

Posted 23 Days Ago
Mark

Ok, I have the image scroller working, but it only loads the images that are used on the index.html page. I have made a new folder for the gallery page in my root folder named gallery_images, I have an XML file named settings2.xml which the SWF reads correctly, and I have an XML file named images2.xml that has the image info for the gallery.html page. How do I point the SWF to the images2.xml, instead of images.xml?

support

Hello,

Open the settings.xml file and change the first attribute : imagesXML=“images2.xml” instead of “images.xml”.

Posted 23 Days Ago
Brent

I tried to publish dock-gallery-fx twice on my wordpress site and you guys said that couldn’t be done. Now I’m trying to use coverflow-fx twice on the same site and can’t get it to work. I have valid settings2.xml and images2.xml files. Here’s a link to the page that won’t work.
link text
I tried it on a test page with the original settings and it worked fine (settings.xml and images.xml files).
Please help.
Thanks.

support

Hi,

If you used this code: [cover-flow-fx][/cover-flow-fx] to add the first Cover Flow component, you have to use this code: [cover-flow-fx settings=“settings2.xml”][/cover-flow-fx] for the second Cover Flow component. Also, make sure you have all files in the plugin’s location.

Posted 24 Days Ago
Mark

Thanks for the reply. I copied and pasted the code for page two into my html file, I am getting a syntax error for this line though: var flashvars2 = {};

support

Hello,

There’s no apparent reason for the error so please give us a link to your website and we will look into the problem.

Posted 24 Days Ago
  • loading comments...
  • 1
  • 2
  • 3
  • 4
  • 5
  • >

Leave a Reply

Only alphanumeric characters allowed
Please type a message!
Format your comments using Textile: *bold*, _italic_, "link text":address, @code@