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

Allan Miller

Posted 8 years ago

Trying to install 3DCarouselMenuFX. Seem to be having trouble getting the image path right in my image.xml, or something. Thanks in advance for your help!

Roman

Posted 8 years ago

Dear support team,

I use the component “image-scroller” and s long as I use it the way you explained it, everything works great. But know I try to feed the component with dynamic pictures which had been uploaded by the users. Therefore I either wish to set a specific images_USER.xml file per user and refer to this with a php or javascript variable, or – if possible – load the xml file dynamically (maybe write the xml file in a php loop while the file is loading).

Either way I need to know where I can effect the path to the “images.xml” file as well as the filename.

Please excuse my english, I do not speak natively speak this language :-)
Thank you for your support, Roman

FlashXML Support

Hi,

You can read in this article how to load a different settings.xml file and you can generate the settings.xml file with a different value of images.xml through assets attribute.

Matthew

Posted 8 years ago

Dear Sir,

I am testing your product banner rotator. I have copied the files in one of directory of my website. It is working find using your index file. However, when I using the same code in your index file. and make another html file in other location. It cannot display the image file, the flash and js file can be display fine.

Please help!

Regards,
Matthew

FlashXML Support

Hi,

You need to make sure that you declared correctly the path to the component’s files in the embedding code on this line:

var flashvars = {};
flashvars.folderPath = "yourcomponent/";
Also, you need to check the images.xml file and make sure that the path to the images is correctly declared. If you still can not make it work, send at support[at]flashxml.net the link to the webpage where you embedded the component, or if that is not possible, send us an archive with the component’s files and the HTML file to check it out.

Ray

Posted 8 years ago

Sorry about the format.
The <div id=“DivListGalleryFX”></div> part is in the second “Begin Pathway”- section of the last code.

FlashXML Support

Hi,

You need to specify the correct path for swfobject.js, also.
e.g:

<script type="text/javascript" src="http://141.47.5.146/pp18/templates/ja_larix/Gallery/swfobject.js"></script>

You could also to add the embedding code directly in the second .php file right before of <div id=“DivListGalleryFX”></div>.
If still does not work, try to publish your site on web, so we could check where the problem is.

pacoqueipo

Posted 8 years ago

Hi again,
I have a problem with the folderPath.
The folder where is elite- gallery Flashxml, is CATALOGO.
I think there is an error but i dont know where. Could you help me? This is my code:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” lang=“en” xml:lang=“en”> <head> <title>DIFUSI&Oacute;N * VALLADOLID * MODA</title> <meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /> <script type=“text/javascript” src=“swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderPath = “http://www.difusionvalladolid.com/web/CATALOGO/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(“EliteGalleryFX.swf”, “EliteGalleryFXDiv”, “100%”, “100%”, “9.0.0”, false, flashvars, params, attributes); </script> <style type=“text/css”> html, body , #EliteGalleryFXDiv { margin: 0; padding: 0; height: 100%; } #EliteGalleryFXDiv { float: left; } </style> </head> <body> <style type=“text/css”>
....

Many thanks
Paco

FlashXML Support

Hi,

Send us the link to the page where you’re trying to embed the Elite Gallery FX 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