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

manish

Posted 8 years ago

hi
I bought your Banner-rotator component.
It works very nice but I’ve a problem with pictures . i tried to change the picture in images.xml file but it not worked
how can i change this picture.

FlashXML Support

Hi,

You need to specify the path to your images through the value of image attribute in images.xml. Note that you need to clear your browser’s cache before testing the changes.

Henk

Posted 8 years ago

hello

I tried to do everything I read here.

I use SMF PHP forum
I have a index.template.php file that tells all my items where I want them to display
this php file has <head></head<body></body> in it

but the index.template.php file is located in http://www.mysite.com/smf/them/mytheme/
and the WeatherWidgetFX is in http://www.mysite.com/smf/WeatherWidget

My setup is
<head> <script type=“text/javascript” src=”/smf/weatherwidget/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderPath = “/smf/weatherwidget/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; var attributes = {}; swfobject.embedSWF(“www.mysite.com/smf/weatherwidget/WeatherWidgetFX.swf”, “DivWeatherWidgetFX”, “325”, “130”, “9.0.0”, false, flashvars, params, attributes); </script>
</head>

and the body setting are

<body><div id=“DivWeatherWidgetFX”> <a href=“http://www.adobe.com/go/getflashplayer”>Get Adobe Flash</a> </div></body>

the place where I want to display shows blank now where before the edits showed the text “Get Adobe Flash”

can you please explain what i am missing

Thankyou

FlashXML Support

Hi,

I checked the webpage where you are trying to install our component and couldn’t find the DIV of the component in the body section; So please make sure that you include this div somewhere between <body> and </body>:

<div id="DivWeatherWidgetFX"></div>

Then, edit the embedding code of the component and write it just as I wrote you here:
<script type="text/javascript" src="http://www.aussierampage.com/smf/Themes/BlackRainV2_20g/scripts/swfobject.js" type="text/javascript" charset="UTF-8"></script>
 <script type="text/javascript">
 var flashvars = {};
 flashvars.folderPath = "http://www.aussierampage.com/smf/weatherwidget/";
 var params = {};
 params.scale = "noscale";
 params.salign = "tl";
 params.wmode = "transparent";
 params.allowScriptAccess = "always";
 params.allowFullScreen = "true";
 var attributes = {};
 swfobject.embedSWF("http://www.aussierampage.com/smf/weatherwidget/WeatherWidgetFX.swf", "DivWeatherWidgetFX", "325", "130", "9.0.0", false, flashvars, params, attributes);
 </script>

Please make these changes and then test the component to see if it displays.

Herwin

Posted 8 years ago

Hi Support,

Thanks for your reply but your reply with the concern below did not solve my problem.
Technically your answer is two have two settings on one HTML.
What we need is to have two settings on one SWF file.
I think you did not understand my issue. pls. check the website link and check your reply
http://192.168.1.99:81/2011/kawasaki/

What we’re trying to display here are set of different product category. meaning one settings for commuter bikes and another for leisure bikes when you “HOVER” on the FLASH BUTTONS. (pls. check the link).

Many Thanks!

Posted Today

is there a way to display two different settings on one page?

if you try to access/hover the commuter button it will show a carousel of bike within that category.
Now the problem is when you try to hover on the LEISURE BUTTON, the bikes being displayed here supposedly is a carousel of bikes within that category meaning to say a set of different bikes.

How can we make this happen?

FlashXML Support

Hi,

For HTML read this FAQ for flash read this FAQ

herwin

Posted 8 years ago

is there a way to display two different settings on one page?

if you try to access/hover the commuter button it will show a carousel of bike within that category.
Now the problem is when you try to hover on the LEISURE BUTTON, the bikes being displayed here supposedly is a carousel of bikes within that category meaning to say a set of different bikes.

How can we make this happen?

FlashXML Support

Hi,

Please read this FAQ.

Ced

Posted 8 years ago

I’m using the YouTube player. I have multiple instances of the player, but as soon as I created the new instances to place on the different pages, it stopped playing everything. I want the player to play a different playlist on each page. I assumed the error was because it was reading the “settings.xml” file in all of the separate folders and getting confused so I defined the correct path to the newly named xml file using
_<script type=“text/javascript”>
var flashvars = {};
flashvars.settingsXML= “settingsGroove.xml”;
flashvars.folderPath = “vimeoGroove/”;
var params = {};
params.scale = “noscale”;
params.salign = “tl”;
params.wmode = “transparent”;
params.allowScriptAccess = “always”;
params.allowFullScreen = “true”;
var attributes = {};
swfobject.embedSWF(“vimeoGroove/YouTubeVimeoPlayerFX.swf”, “DivYouTubeVimeoPlayerFX”, “650”, “450”, “9.0.0”, false, flashvars, params, attributes);
</script>_

I’m still getting nothing with the new file path. Do I need to change the name and path of the videos.xml file as well? If so, how would I do that.

FlashXML Support

Hi,

Please sent us a link to your website so we can see where the problem is.

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