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

Alex

Posted 8 years ago

The script completely ignore my settings.xml and image.xml and shows the standard image which is even not on my server.

It seem to me the open source one should be removed from the website as it’s only possible to show the default flashxml.net images with link on flashxml.net/ website only.

FlashXML Support

Hi,

After you replaced the pictures with your own and made changes to images.xml , clear your browser cache and reload again.

Dave Bernhardt

Posted 8 years ago

Please take a look at http://www.timberwolfnw.com/work/work.html. I would like to use photo gallery to replace existing js. I want to maintain seperate photo galleries, but want to be able to swich between them. Is photo gallery the best option and would I use seperate subfolders/paths? What is your recommeded approach to accomplish?

FlashXML Support

Hi,

The photo gallery would be one way to do this, but keep in mind it cannot change subfolders. All the pictures would have to be loaded on the same component, or you could use the component four times for each image set.

Ann

Posted 8 years ago

Hi, I’m trying to get the gallery to appear on my home page, but it’s not showing up Here’s the link:
http://bpdesigns.biz/home
The site is built in WordPress.

Here is the code I placed in my page. Can you help me figure out what I’ve done wrong? Thanks. -Ann

<script type=“text/javascript” src=“http://www.bpdesigns.biz/wp-content/uploads/commercial/swfobject.js/”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderPath = “http://www.bpdesigns.biz/wp-content/uploads/commercial/images/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(“http://www.bpdesigns.biz/wp-content/uploads/commercial/DockGalleryFX.swf/”, “DockGalleryFXDiv”, “100%”, “100%”, “9.0.0”, false, flashvars, params, attributes); </script>

FlashXML Support

Hi,

We checked your website and everything seems to work fine.

jason antao

Posted 8 years ago

the flash FLA files doesnt work in flash, i can open everything else except it

Also when trying to just put two components on two pages, according to the tutorial, is it merely the html page i have to change with the flashvars1?

FlashXML Support

Hi,

Make sure you’re using the Flash version required that is written on the product’s page to open the FLA file.

About using the product on two different pages, there is not really necessary to use flashvars1, but make sure you don’t mix the code.

Luis O

Posted 8 years ago

Using the photo flipper. I was hoping I can pass the flash variable through the index page to pick up a specific images.xml. I want to set it up so that it finds the specific images.xml for the specific user. Since the settings won’t change, only the path to the images.xml – is that doable? I tried something below but it didn’t work.

For example: var flashvars = {}; flashvars.images = “/user/000020/images.xml”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(“PageFlipFX.swf”, “PageFlipFXDiv”, “900”, “700”, “9.0.0”, false, flashvars, params, attributes);

FlashXML Support

Hi,

Sorry but you can pass only the settings.xml file through flashvars. You could create similar settings files which load different images xml files and specify a different settings file every time you want to load a different images xml file. This way you would obtain something similar to what you want.

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