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

Rudi

Posted 8 years ago

The component manages to load but the controls don’t work.

e.g.
1. Pause button – does not pause

2. Left and right buttons – do not work

3. Clicking on the cover flow pictures does not load the specified page

Thanks

FlashXML Support

Hi,

We need the link to your website so we can investigate the problems you’re talking about.

Mike

Posted 8 years ago

We just purchased the ImageScrollerFX.

The scroller works fine when the page initally loads up.

However, when nagivating thorugh the website and then going back to the Home Page where ImageScrollerFX is located, the flash does not load.

I asusme the paths are incorrect.

The error message is:

Message: ‘swfobject’ is undefined
Line: 20
Char: 1
Code: 0

FlashXML Support

Hi,

In the index.php file delete the embedding code, lines 320 to 329

<script src="swfobject.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
var flashvars = {};
var params = {};
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
var attributes = {};
swfobject.embedSWF("ImageScrollerFX.swf", "ImageScrollerFXDiv", "600", "300", "9.0.0", false, flashvars, params, attributes);
// ]]></script>

and replace it with the <div id=ImageScrollerFXDiv></div>.
Save the changes, clear the browser chache and reload the page.

Tammy M Freeman

Posted 8 years ago

Hello,

I am trying to set the path of my video file in the media xml file. I want to use an absolute path for the url. It will not read it. How should the path be structured? I’ve tried with the http:// with just the www. and without the www. or http://

FlashXML Support

Hi,

Videos work with both the relative and the absolute paths declared. But if you are using the folderpath variable the videos will only work with the relative filepath. If the problem persists, contact us and give us a link to your web page.

Pieter van Lierop

Posted 8 years ago

A question about paths. My html-page with the photorotator-component is in the root folder. All the other files of the component are in a subfolder called ‘banner’. What should I change or add in which file(s) to make the photo rotator work?

FlashXML Support

Hi,

You will need to edit the HTML page itself, you will need to specify the filepath for the following files, swfobject.js, PhotoRotatorFX.swf, and you will have to declare the filepath for the settings.xml too, just like here.
Your code should look like this, in the end:

<script type="text/javascript" src="banner/swfobject.js"></script>
 <script type="text/javascript">
 var flashvars = {};
 flashvars.settingsXML = "banner/settings.xml";
 var params = {};
 params.scale = "noscale";
 params.salign = "tl";
 params.wmode = "transparent";
 params.allowfullscreen = "true";
 var attributes = {};
 swfobject.embedSWF("banner/PhotoRotatorFX.swf", "PhotoRotatorFXDiv", "600", "400", "9.0.0", false, flashvars, params, attributes);
 </script>

Mike F

Posted 8 years ago

Thanks for the reply, I’ve come across another issue –
My Intention is to use the Multi-level Menu on an interactive CD linking to a series of PDF files, also comtained on the CD. I’ve done something similar before using as2, where the pdfs open in the users web-browser – not ideal, but fine for this particular project. I made an assumption (my bad, sorry) that as your menu opened URLs in a browser then it would also be able to open the pdfs locally in the same way.
But as your xml does this differently to the as2 menu I used previously I don’t know if / how I can make this work. Is it possible to open pdfs in this way with this menu, and if so how should I go about doing it?
Thanks for any help you can give me with this.

Mike

FlashXML Support

Hi,

Unfortunately the component cannot be used to open .PDF files locally. It can only reference online files.

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