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

andrea m giordano

Posted 8 years ago

I am having some issues inserting this gallery twice into my website.

The main goal is to have two horizontal scrolling galleries on top of one another, but the top one has a white background and the bottom has a black background, and they both take images from different folders.

I have tried everything I could imagine with help from the FAQ.

I am stuck and need help!

here is the code:

html { height: 100%;}
body { background-color: #FFF; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin:0; padding:0; height:100%; border:none}
</style>
<script type=“text/javascript”>
var flashvars1 = {};
flashvars1.folderPath = “day/”;
var params1 = {};
params1.scale = “noscale”;
params1.salign = “tl”;
params1.wmode = “transparent”;
var attributes1 = {};
swfobject.embedSWF(“day/ImageScrollerFX1.swf”, “ComponentDiv1”, “600”, “300”, “9.0.0”, false, flashvars1, params1, attributes1);
</script>

<script type=“text/javascript” src=“night/swfobject.js”>
var flashvars2 = {};
flashvars2.folderPath = “night/”;
var params2 = {};
params2.scale = “noscale”;
params2.salign = “tl”;
params2.wmode = “transparent”;
var attributes2 = {};
swfobject.embedSWF(“night/ImageScrollerFX2.swf”, “ComponentDiv2”, “600”, “300”, “9.0.0”, false, flashvars2, params2, attributes2);
</script>
</head>

<body>
<table width=“100%” height=“50%” border=“0” cellspacing=“0” cellpadding=“0”> <tr> <td align=“center” valign=“middle”> <div id=“ComponentDiv1”> <object id=“FlashID” classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” width=“80%” height=“300”> <param name=“movie” value=“day/ImageScrollerFX1.swf” /> <param name=“quality” value=“high” /> <param name=“wmode” value=“opaque” /> <param name=“swfversion” value=“6.0.65.0” /> <!— This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. —> <param name=“expressinstall” value=”../Scripts/expressInstall.swf” /> <!— Next object tag is for non-IE browsers. So hide it from IE using IECC. —> <!—[if !IE]>—> <object type=“application/x-shockwave-flash” data=“day/ImageScrollerFX1.swf” width=“1650” height=“1080”> <!—<![endif]—> <param name=“quality” value=“high” /> <param name=“wmode” value=“opaque” /> <param name=“swfversion” value=“6.0.65.0” /> <param name=“expressinstall” value=”../Scripts/expressInstall.swf” /> <!— The browser displays the following alternative content for users with Flash Player 6.0 and older. —> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><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” width=“112” height=“33” /></a></p> </div> <!—[if !IE]>—> </object> <!—<![endif]—> </object> </div> </td> </tr>
</table>

<table width=“100%” height=“50%” border=“0” cellspacing=“0” cellpadding=“0” bgcolor=”#191919”> <tr> <td align=“center” valign=“middle”> <div id=“ComponentDiv2”> <object id=“FlashID2” classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” width=“80%” height=“300”> <param name=“movie” value=“night/ImageScrollerFX2.swf” /> <param name=“quality” value=“high” /> <param name=“wmode” value=“opaque” /> <param name=“swfversion” value=“6.0.65.0” /> <!— This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. —> <param name=“expressinstall” value=”../Scripts/expressInstall.swf” /> <!— Next object tag is for non-IE browsers. So hide it from IE using IECC. —> <!—[if !IE]>—> <object type=“application/x-shockwave-flash” data=“night/ImageScrollerFX2.swf” width=“1650” height=“1080”> <!—<![endif]—> <param name=“quality” value=“high” /> <param name=“wmode” value=“opaque” /> <param name=“swfversion” value=“6.0.65.0” /> <param name=“expressinstall” value=”../Scripts/expressInstall.swf” /> <!— The browser displays the following alternative content for users with Flash Player 6.0 and older. —> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><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” width=“112” height=“33” /></a></p> </div> <!—[if !IE]>—> </object> <!—<![endif]—> </object> </div></td> </tr>
</table>
</body>

any help would be greatly appreciated!

I am using dreamweaver, and inserting the .swf with the “insert .swf tool”

FlashXML Support

Hi,

Send us the link to your website to check out what you are trying to do.

Mike F

Posted 8 years ago

Hi, I’m using the ‘MultilevelMenu FX’ flash menu on an interactive CD, so the menu is going to be placed in my fla file to be compiled as a projector, rather than as a swf with seperate html.
In this situation how can I specify a different file location for settings.xml? I’d like to have it hidden away in a folder.

Oh, and the menu is great by the way!

FlashXML Support

Hi,

To specify a different path for settings.xml within .fla file you have to do this:
-select the muntilevel menu and give a name for instance (multiLevel for example)
-press F9 and write this line multiLevel.settingsXML = “your_path/settings.xml”;

Fernando Bauza

Posted 8 years ago

I can’t change the paths or names in Flash Component Inspector and XMLs, each time I do so I get that kind of lost path error for the assets (assets.xml, preloader.swf arrowgraphics, etc)

Thank you,

FlashXML Support

Hi,

It sounds like the problem is that the filepath you entered is not the correct one. Please pay careful attention to the way you write it. If you don’t want to bother with filepaths, keep the XMLs in the same folder with the FLA file.

Fernando Bauza

Posted 8 years ago

Hi,
I just bought your image scroller with the Flash Extension.
When I publish the swf it seems not to find one xml the one called “assets.xml”. I don’t see inside the folder I’ve downloaded from flashxml.net

The error that comes in Flash’s Output window is:
xml not found: galerias/archivo_historico/assets.xml

What I’m doing wrong?

Thank you very much!
<f@maligne.es>

Marius

Posted 8 years ago

Hi. Could You pleas help me. The scenario is:
1. i have (bougth) some flash xml banner template.
2. I need to add swf file to some advertising channel to be able change info everyday, and use for that the same swf.
3. xml and images for this swf should be hosted on my server (other server than swf file is).
4. There is no html embeding possibility – just .swf file.

I opened FLA file and found this code about the xml file in AS:
xmlData = new XML;
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“items.xml”);

So i suppose that i should change items.xml with full path where xml is ? Just my flash knowledge is a little bit more than 0 ;). Could You help me here?

Thanks in advance,

Marius

FlashXML Support

Hi,

Please tell us witch of products did you bought? Give more details on the matter. Thanks.

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