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

WEbman

Posted 8 years ago

Is there any way to get the xml file relationships to work if they are set up in different folders?

I want to put: – settings.xml – images folder – images.xml

in a subfolder, BUT keep the swf, index.html and assets folder in the root. I want to do this because each subfolder will have different settings. I have a lot of subfolders, so creating settings2.xml would not be a tidy approach.

FlashXML Support

Hi,

Yes, this is possible. Let’s say that you have 2 subfolders: folder1 and folder2 which contains the following files and directories: images,images.xml,settings.xml and swfobject.js. In the root of your site you have the SWF file and the assets folder.
What you need to do now is to set the correct path for the assets files in settings.xml and to specify the folder path in the embedding code like in the following example:

<script type="text/javascript" src="folder1/swfobject.js"></script>
 <script type="text/javascript">
 var flashvars = {};
 flashvars.folderPath="folder1/";
 var params = {};
 params.scale = "noscale";
 params.salign = "tl";
 params.wmode = "transparent";
 var attributes = {};
 swfobject.embedSWF("Component.swf", "DivImageScrollerFX", "600", "220", "9.0.0", false, flashvars, params, attributes);
 </script>

jean

Posted 8 years ago

Hello,
http://www.experience-canada-after-immigration.com/bannertest.com
I am trying to upload the demo banner. I have renamed the index.html to bannertest.html.

I am also copying the internal file names so you can see where i have kept it relative and where absolute.

FlashXML Support

Hi,

I have checked your site and found a problem. You are missing the SWF file in the default location in the embedding code:

http://www.experience-canada-after-immigration.com/support-files/BannerRotatorFX.swf

Please make sure the SWF is in this location, or update the embedding code to point to the correct location.

Kevin Prince

Posted 8 years ago

Hi,

I am using the Banner Rotator component with Wild Apricot, which is a membership management service (and web host). They have a WYSIWYG type of web page interface that is quite good, and allows you to past in Java scripts. Since I’m not sure what their paths are for files uploaded to their website, I’ve uploaded the FlashXML files to my other server, at www.quickpatents.com/clients/banner. As you can see if you type that URL in, the index.html file works fine. However, when I call the script from http://hopeca.com/Default.aspx?pageId=1085159 all I get is a blank area with the FlashXML.NET logo. I’m using all absolute paths in both the Java script and in the images.xml and the settings.xml fiile (for the imagesXML and styleCSS locations). Please have a look and let me know what I’m doing wrong… thanks!

FlashXML Support

Hi,

The problem comes from you setting the filepaths absolute, instead of relative. Using the folderPath variable you don’t need to set the paths to absolute, or you will get a request like this:
http://www.quickpatents.com/clients/banner/http://www.quickpatents.com/clients/banner/style.css
Please edit the XML files on your second domain and set all the filepaths to relative, and not absolute.

Anthony

Posted 8 years ago

When I upload the files to my site and refesh my site it, my site is gone and it only shows the get adobe image, the issue is whenever I upload the index.html file. as soon as i delete it the site is back to normal? so where do i upload the files to?

FlashXML Support

Hi,

Please send us a link to the web[age where you are trying to add the component.

David

Posted 8 years ago

Hi,

I tried installing the free version….I placed the proper html in the index, and all of the files are in the same folder. When I type in the address of the gallery, I just get a 404 error code. Please help!

FlashXML Support

Hi,

I have checked your site, and you seemed to have not loaded the thumbs and big folders, with their respective images to your site. Please upload all of the gallery’s files to your site and to the proper location. If you use your own images, you will have to declare in the thumbs.xml – the images for the navigation bar; in the big.xml the big images for each corresponding thumb image.

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