Questions

Answer

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: http://www.yourdomain.com/index.html

- the swfobject.js file is located at this address: http://www.yourdomain.com/Banner/swfobject.js

- the product's files (XMLs, assets and images) are located in the Banner folder: http://www.yourdomain.com/Banner/

- the 3DBannerFX.swf file is located in the product's folder: http://www.yourdomain.com/Banner/3DBannerFX.swf

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

You can also use absolute paths like in this example:

params.base = "http://www.yourdomain.com/Banner/";

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.

Comments

claudine

Posted 7 years ago

I haven’t uploaded the website so you won’t be able to see my code or work. I have managed to put all the files in a folder and display the gallery on the page I need with no problem. However my problem is that under the gallery is a grey box the size of the gallery, obviously I do not want this on the page, just the gallery. How do I fix this?

FlashXML Support

Send to support [at] flashxml.net a screenshot with what do you see so we can understand what are you talking about.

Corey

Posted 7 years ago

I can not seem to figure exactly how to get this to work on my site. I am confused… please take a look at my site and let me know what is going on and where. I am so noobish at this apparently. thank you..

Corey

FlashXML Support

Your images are located in the image folder while in the images.xml file you specify the path to the images you’re trying to load from images folder (with the letter S at the end). Make sure you’re using the same name in both places.

Maksim

Posted 7 years ago

Hi. How do I remove the text that appears in the shadow like “It’s FREE” and etc. Thanks

FlashXML Support

The text that appears can be modified from the images.xml file in the CDATA section for each photo.

Peter

Posted 7 years ago

Have some idea why working correctly the “DockMenu” and why not the “ImageSubMenu”
with absolute path?

Comp1 and comp2 folders in correct place…

<div id=“DockMenuDiv”></div>
<script type=“text/javascript” src=“http://biaeletronico.com.br/comp3/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; var params = {}; params.base = “http://biaeletronico.com.br/comp3/”; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; var attributes = {}; swfobject.embedSWF(“http://biaeletronico.com.br/comp3/DockMenuFX.swf”, “DockMenuDiv”, “900”, “100”, “9.0.0”, false, flashvars, params, attributes); </script>

<div id=“DivImageSubMenuFX”></div> <script type=“text/javascript” src=“http://biaeletronico.com.br/comp1/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderPath = “http://biaeletronico.com.br/comp1/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; var attributes = {}; swfobject.embedSWF(“http://biaeletronico.com.br/comp1/ImageSubMenuFX.swf”, “DivImageSubMenuFX”, “946”, “498”, “9.0.0”, false, flashvars, params, attributes); </script>
FlashXML Support

The images you’re trying to load in the Image Sub-Menu in the images3.xml file don’t have the right path and the flash can’t find them to load them. Make sure you’re using the correct path in the images3.xml file.

Arnold

Posted 7 years ago

Is this the correct way to embed the image scroller onto my test html page. I uploaded every file and folder related
to the image scroller onto my server. And to the same directory as my html test page. I also specified where all the components were in the code below. But When I view the page on my browser, I get no error message, I also get no image scroller. HELP!!! pLEASE

<div id=“DivImageScrollerFX”></div>
<script type=“text/javascript” src=”/Assets/image-scroller/swfobject.js”></script>
<script type=“text/javascript”> var flashvars = { ‘file’: ‘settings.xml’ }; var params = { params.base = ‘image-scroller/’; params.scale = ‘noscale’; params.salign = ‘tl’; params.wmode = ‘transparent’; params.allowFullScreen = ‘true’; params.allowScriptAccess = ‘always’; }; swfobject.embedSWF(’/Assets/image-scroller/ImageScrollerFX.swf’, ‘DivImageScrollerFX’, ‘600’, ‘220’, ’9.0.0’, false, flashvars, params);

FlashXML Support

Add this code where you want to display the Image Scroller:

<div id="DivImageScrollerFX"></div>
<script type="text/javascript" src="Assets/image-scroller/swfobject.js"></script>
<script type="text/javascript">
 var flashvars = {};
 var params = {};
 params.base = "Assets/image-scroller/";
 params.scale = "noscale";
 params.salign = "tl";
 params.wmode = "transparent";
 params.allowFullScreen = "true";
 params.allowScriptAccess = "always";
 swfobject.embedSWF("Assets/image-scroller/ImageScrollerFX.swf", "DivImageScrollerFX", "600", "220", "9.0.0", false, flashvars, params);
</script>

If you still have problems then send us the link to your test page so we can check it.

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 - 2019