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

Brandon

Posted 2 days ago

I am using dreamweaver to design my page. I already have the page flip component from you guys on a page that is working great. The problem is I am trying to use this 3D wall gallery on another page and the file names are all the same. When I insert the media into my line of code and copy and paste the script you guys have here it is using the settings.xml and images.xml folders for the page flip component already being used. I have the 3D wall in its own folder. How do I change it so it works?

FlashXML Support

Hi,

Please follow this tutorial, to add two components in two different pages.

triumph06

Posted 2 days ago

hi, i have a page call tv.html and that’s where i have the below code, I have the youtube video player in a folder call tv, but the tv2.html is outside this folder, the page is not showing the player, please what am i doing wrong

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

FlashXML Support

Hi,

Please provide a link to the webpage you are using the component to our support team.

David Thompson

Posted 15 days ago

I have Cover Flow installed at ‘http://test2.exclusivelyweddings.co.uk/cover-flow/index_coverflow.html’ and it is working fine.
However when I copy the html file to ‘http://test2.exclusivelyweddings.co.uk/index_coverflow.html’ and modify the folder paths according to the instructions on your site, it doesn’t work.
Could you please take a look at this file and see what I am doing wrong with the paths?
<script type=“text/javascript” src=“cover-flow/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderpath = “cover-flow/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; var attributes = {}; swfobject.embedSWF(“cover-flow/CoverFlowFX.swf”, “DivCoverFlowFX”, “1000”, “580”, “9.0.0”, false, flashvars, params, attributes);

One further question. I am using 48 images and the page load time is too slow, even though I have reduced the image quality as much as possible. Is there a way of speeding up the load time other than reducing the number of images?

FlashXML Support

Hi,

Right now the Cover Flow FX isn’t loading because it can’t load the first image in the images.xml

http://test2.exclusivelyweddings.co.uk/bgimages/bouquets/aubergine-calla-lily-hand-tie,-with-crystal-tie-Chris-Ison.jpg

All the images in the XML must load in order for the component to work.

Unfortunately there's not much you can do about it, since the component has to load all the images and also render them in 3D, since CoverFlow is using a CPU heavy 3D engine. You can try to resize the images so they aren't larger than the actual viewsize on your site, and you could try to reduce the DPI, to 72, but other than that, not really.

Cody Rutherford

Posted 18 days ago

I am currently using a Go Daddy account wherein i don’t have a lot of freedom. I’ve been working on a way to use this scrolling Flash as a means to show my photography.. I am useless when it comes to web developing and I was wondering if there is any way to use this flash without embedding it in the body. Go daddy has an option to upload a flash, but it will not work in that manner. I apologize that i’m completely oblivious to my options and any guidance will be greatly appreciated.

Thanks,

Cody

FlashXML Support

Hi.

Unfortunately this is not possible because our components use more files, not only a SWF file. That’s why you have to specify the folderPath (where the component’s files are located) in the embedding code and it’s not enough to specify just the path to SWF.

waltex 3

Posted 28 days ago

sorry

solved …problems Div ..

thank you very much

walter

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