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

Gregory

Posted 8 years ago

Hi.. I am having problems with the MediaSlideshowFX player.. I am testing a few players before buying the group package (which I can’t find on your website anymore?) and have issues with the above player,... It works when tested on 'link' page, however when I move the page up one directory and change the paths something is going wrong, please help… Code below for the link given below

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” lang=“en” xml:lang=“en”> <head> <title></title> <meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /> <script type=“text/javascript” src=”../SLIDESHOW/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; flashvars.folderPath = “../SLIDESHOW/assets/”; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(”../SLIDESHOW/MediaSlideshowFX.swf”, “MediaSlideshowFXDiv”, “700”, “320”, “9.0.0”, false, flashvars, params, attributes); </script> </head> <body> <div id=“MediaSlideshowFXDiv”> <a href=“http://www.adobe.com/go/getflashplayer”> <img src=“http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif” alt=“Get Adobe Flash player” /> </a> </div> </body>
</html>

FlashXML Support

Hi,

The problem is with the folderPath. You set it to “flashvars.folderPath = “../SLIDESHOW/assets/”;” when it should be like this:
e,g:

flashvars.folderPath = “../SLIDESHOW/";

Mark

Posted 8 years ago

Hi I’ve just bought the Polaroid Gallery but still have the problem with paths. (I’ve also read the explanation above)

The situation:

all the components like, swfobject.js, PolaroidGalleryFX,swf, settings,xml, images.xml are located in the /js folder.
the images and assets folder are located in the /images/ folder.
the script in the index.html loads both the swfobject.js and PolaroidGalleryFX,swf. (without the images)

The problem are the images that don’t load.

My path of the images.xml in the settings.xml is: /images.xml

And my path of the images in images.xml is:
../images/01.jpg

Can someone help me with this path issue?

Best regards

Mark

FlashXML Support

Hi,

You have set the folderPath wrong. If your Polaroid Gallery Fx is in the “js” folder” set the path to that folder.
e.g:

var flashvars = {};
flashvars.folderPath = "/js/";

Dave

Posted 8 years ago

Hello again, I posted this question yesterday:

Hi, I’m using the Media GalleryFX in my Wordpress site, and love it so far. What I am trying to do is use the gallery to present .swf banners that I have created for my portfolio. I have uploaded the swf to the “video” directory and updated the big.xml file to point at: “video/myBanner.swf” and it will not replace the default picture that came with the component…........

YOU RESPONDED:
Hi,

If you’re trying to use a SWF file you have to add it in the big.xml file like this:

<photo image=“video/yourSWFfile.swf url=“http://www.flashxml.net” target=”_blank”>

Unfortunately this breaks the component and hangs the browser? I noticed that there was no closing quotation tag after the path to the SWF...so I tried it both ways, and neither worked. Do you have any other suggestions?

Thanks, Dave

FlashXML Support

Hi,

Of course you have to close the quotation and also the </photo> tag. I just gave you an example for the first part. Try this:

<photo image="video/yourSWFfile.swf" url="http://www.flashxml.net" target="_blank"></photo>

Dave

Posted 8 years ago

Hi, I’m using the Media GalleryFX in my Wordpress site, and love it so far. What I am trying to do is use the gallery to present .swf banners that I have created for my portfolio. I have uploaded the swf to the “video” directory and updated the big.xml file to point at: “video/myBanner.swf” and it will not replace the default picture that came with the component.

To be sure I was editing the proper .xml and video/image folders I modified the 01.jpg and it worked? So I’ve read your FAQ “Path issues with SWF files configured with XML” and am not sure the best way to approach this with wordpress.

Any help would be greatly appreciated.

Thanks!

FlashXML Support

Hi,

If you’re trying to use a SWF file you have to add it in the big.xml file like this:

<photo image="video/yourSWFfile.swf url="http://www.flashxml.net" target="_blank">

Harsha

Posted 8 years ago

Hai…., I am devoloping a web application using PHP enviroment.I want to get the data and styling from php file to swf file which is a chart component.Can I provide data and stylings to swf chart component directly through the xml file… I had seen that using flashvars the xml attributes data can be loaded into swf file which is now seperately from flex environment… Reply me soon…. Thanking u in advance…......

FlashXML Support

Hi,

About what component of ours are you talking about?

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