Questions

Answer

Path issues with SWF files configured via XML

Generally, you must know that the path of the assets the SWF uses (the path of the images 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).

More conclusively:

If the folder path of the HTML differs from the product’s folder path (the folder in which the XML files and images folder are located) then you must specify that path through a variable called folderPath.
For example, in the swfobject embedding code, under this line:

var flashvars = {};

add this line:

flashvars.folderPath = "my_path";

and replace my_path with the path you need to follow to go from the location of the HTML file to the folder in which the assets are located. Alternatively you can specify an absolute path. Note that when you specify the folderPath, it must be terminated with a “/”.

If it is still unclear, please read this arbitrary example:

- the index.html file is located at this address on my domain:
http://www.mydomain.com/index.html

- the swfobject.js file is located at this address:
http://www.mydomain.com/js/swfobject.js

- the product's files (XMLs, assets and images folders) are located in this folder:
http://www.mydomain.com/mycomponent/

- the ComponentNameFX.swf file is located in the product's folder on my domain:
http://www.mydomain.com/mycomponent/ComponentNameFX.swf

In this case, the right embedding code in the index.html file using relative paths is:

<script type="text/javascript" src="mycomponent/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.folderPath = "mycomponent/";
var params = {};
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
params.allowScriptAccess = "always";
var attributes = {};
swfobject.embedSWF("mycomponent/ComponentNameFX.swf", "ComponentNameDiv", "600", "300", "9.0.0", false, flashvars, params, attributes);
</script>

 

So again, all the paths are relative to the path of the HTML file and note that the folderPath (if specified) should end with a slash (/). You can of course use any path you like for any type of file, but the references must be modified accordingly.

You can also use absolute paths, for example:

flashvars.folderPath = "http://www.mydomain.com/mycomponent/";

Comments

Waqas

Posted 4 months ago

Hello..
There is a big problem i’m facing,i cant load the SWF plugin in my website….i want to use easch plug-in with their own folder name like different plugin have their own directory and load them into my website..
there is an path\address location error whic i m facing…
my Main Folder name is “Web” in which i put my whole website,now in the “web“folder there is an separate folder of each plugin like “Web/myplugin”
so i’m creating the website and i want to load all flash plugin into my site,i followed everything as above mentioned,but i didnt get the plugin in my site,there is always an Error of Path,i tried everything but nothing happend..
please help me out soon..
Ath the mean while of website developing i want to load all objects from my hardisk path not from Domain. i mean to say as this is mention in this line swfobject.embedSWF (“http://www.aussierampage.com/smf/weatherwidget/WeatherWidgetFX.swf”, “DivWeatherWidgetFX”, “325”, “130”, “9.0.0”, false, flashvars, params, attributes);
Now you can see the above path which is starting from domain name of website,,,i want to load all objects from my hardisk while i’m developing site..

i hope you all understand my problem.

FlashXML Support

Hi,

Your problem can be resolved if you add just one line of code in our HTML embedding code. You can read more about FX components and folder path problems in this FAQ
To load the files, either online, or locally, I recommend you use the relative path to your files, not the absolute http path.

Also, provide a link to your site, once you have it online, even if it is just to test the Weather Widget problem. The only way to be sure what the problem is with your site, we would need to see it live.

manish

Posted 4 months 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 4 months 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 4 months 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 4 months 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.

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 - 2012