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 assets’ 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/mycomponent/index.html

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

- the asset files (XMLs and images folder) are located in this foloder:
http://www.mydomain.com/mycomponent/assets/

- the SWF file is located on the root folder on my domain:
http://www.mydomain.com/component-name.swf

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

<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.folderPath = "assets/";
var params = {};
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
var attributes = {};
swfobject.embedSWF("../component-name.swf", "component-name-div", "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/assets/";

Comments

Thomas

Posted 31 Days Ago

Hi. i’d like to know how to go to a html FILE (which is in my computer) through the images. is it possible? THANKS

FlashXML Support

Hi,

If that file can be accessed through the internet then you can do this.

Graham Simon

Posted 1 Month Ago

Hi,

I had read the tutorial, but that was part of the problem. There seems to be some conflict between using the folderPath parameter and the settingXML parameters together.

By necessity, I need to use a folderPath parameter. I initially places the settings1.xml and settings2.xml in the same folder. But when I did so, your code looked for the settings.xml file and not the settings1.xml or settings2.xml files even though they were explicitly specified in the settingXML parameters.

My eventual solution, after much diddling, was to create two different folders, dispense with the settingXML parameter and include a (different) setting.xml file in each folder along with the appropriate images and images.xml files.

This achieves the desired result, but seems a little clunky. Nonetheless, your component is brilliant and I am very pleased with the results.

Thanks

FlashXML Support

Hi,

It should work using the first method but if you find another solution then it’s good that works.

The Lam

Posted 1 Month Ago

Thanks, it worked!

http://tempbillionty.blogspot.com/

FlashXML Support

Hi,

I’m glad it did.

Graham Simon

Posted 1 Month Ago

OK,

I’ve found a solution to my own problem.

- Created two folders on the server: flashvars1 and flashvars2. – Removed the flashvars1.settingXML=“setting1.xml” and flashvars2.settingXML=“setting2.xml” lines from my javascript. – Set flashvars1.folderPath = “/ev/flashvars1/” and flashvars2.folderPath = “/ev/flashvars2/” – Put my images, images.xml and setting.xml files separately in each folder.

It’s not very elegant and a little counter-intuitive, but it works. Perhaps you can offer a better solution.

Thanks,

Graham

FlashXML Support

Hi,

We have to tutorial here for what you’re trying to do.

Graham Simon

Posted 1 Month Ago

Hi,

Any idea what I’m doing wrong here?

Had everything working fine with a single scrolling display. I’m now trying to display two sets of images using the following code:

<script type=“text/javascript”>
var flashvars1 = {};
flashvars1.folderPath = “/ev/flash/”;
flashvars1.settingXML=“settings1.xml”;
var params1 = {};
params1.scale = “noscale”;
params1.salign = “tl”;
params1.wmode = “transparent”;
params1.allowscriptaccess = “sameDomain”;
var attributes1 = {};
swfobject.embedSWF(”/ev/flash/imagescroller.swf”, “ScrollerDiv1”, “140”, “210”, “9.0.0”, false, flashvars1, params1, attributes1);

var flashvars2 = {};
flashvars2.folderPath = “/ev/flash/”;
flashvars2.settingXML=“settings2.xml”;
var params2 = {};
params2.scale = “noscale”;
params2.salign = “tl”;
params2.wmode = “transparent”;
params2.allowscriptaccess = “sameDomain”;
var attributes2 = {};
swfobject.embedSWF(”/ev/flash/imagescroller.swf”, “ScrollerDiv2”, “140”, “420”, “9.0.0”, false, flashvars2, params2, attributes2);

</script> .....
<div id=“ScrollerDiv1”> </div>
<div id=“ScrollerDiv2”> </div>
.....

The imagesXML parameter in settings1 is set as images1.xml.
The imagesXML parameter in settings2 is set as images2.xml.

Perversely, the scrolling content in both areas appears to be coming from the contents of my settings.xml and images.xml and not from the settings1.xml, settings2.xml, images1.xml, images2.xml files on the same directory.

Thanks in advance.

Graham

FlashXML Support

Hi,

I don’t see any image scroller on the link you send us. Are you sure it’s the correct one?

The Lam

Posted 1 Month Ago

Hi,

I’m trying to embed the scroller to my site hosted on Blogger. Because you can’t upload files directly to the host, I hosted the files on a different site and made the appropriate adjustments as described in your post. But nothing happens on the page. Does it not work on blogger? They seem to support scripts, so I’m not sure why nothing’s loading. Thanks for any help!

http://tempbillionty.blogspot.com/

FlashXML Support

Hi,

Now you need to create in your body section a div that looks like this:

<div id="component-name-div"></div>

This should solve the problem.

Simon Hall

Posted 1 Month Ago

Hi
I am getting a problem with the scroller to load… it all works fine on my local machine but when i upload my site the pre loading screen appears (red sequenced squares..)
I have adjusted the script tag in the body of the ‘electrical.html’ page as this is where the scroller script is located. The settings.xml, images.xml and the imagescoller.swf files are in the root folder of the domain (www) I altered the path for the swfobject.js as this file sits in the ‘js’ folder….Could it be that xml files dont like to be run in the root folder or is it a simple path issue that im missing/!!

Much appreciated if you can look… www.integrated-electrical.co.uk/electrical.html

<script type=“text/javascript” src=”../js/swfobject.js”></script>
<script type=“text/javascript”>
var flashvars = {};
var params = {};
params.scale = “noscale”;
params.salign = “tl”;
params.wmode = “transparent”;
var attributes = {};
swfobject.embedSWF(“imagescroller.swf”, “ImageScrollerDiv”, “600”, “190”, “9.0.0”, false, flashvars, params, attributes);
</script>

K Rgds

Simon

FlashXML Support

Hi,

You have some wrong path to your photos in your images.xml file. Please make sure you’re using the correct ones.

jeroen

Posted 1 Month Ago

Hi,

I am trying to integrate the 3Dstack into Drupal 6.
I have the embed code placed in page.tpl, the swfobject.js is in the js directory, settings.xml, images.xml are in the same directory as the page.tpl (theme directory).
Also the images folder that came with the package is in the theme directory (for the moment also with the images from the package).
I used all absolute paths to get it working, but the only thing that shows is the Flash XML logo.
The URL for the test site is http://prokrant.powercraft.nl in the settings.xml I used the following paths:
<settingsXML value=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/settings.xml”/> and
<imagesXML value=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/images.xml”/>

images.xml are called via:
<images> <image url=“http://prokrant.powercraft.nl/sites/prokrant.powercraft.nl/themes/prokrant/images/01.jpg” link=“http://www.flashxml.net” target=”_blank” title=“Hello” />

in page.tpl this code is called to embed the object <script type=“text/javascript” src=”<? print $base_path . path_to_theme(); ?>/js/swfobject.js”></script> <script type=“text/javascript”> var flashvars = {}; var params = {}; params.scale = “noscale”; params.salign = “tl”; params.wmode = “transparent”; params.allowfullscreen = “true”; var attributes = {}; swfobject.embedSWF(”<? print $base_path . path_to_theme(); ?>/3dstack.swf”, “StackDiv”, “200”, “230”, “9.0.0”, false, flashvars, params, attributes); </script>

Any clue to get it working?

kind regards,
jeroen den Haan

FlashXML Support

Hi,

For the moment we don’t have instructions on how to install this component in Drupal.
But if you’ll give us access to your Drupal (username + password) we’ll install it for you.
If you’re interested, you could send the username and password to support at flashxml.net
Thank you.

Teun

Posted 1 Month Ago

Sorry!

its already working. I tested it local but on the server it works.

Teun

Posted 1 Month Ago

Hi,

I have a problem to get the urls working. I’m trying for testing to link to google.nl

my code in xml:

<Carousel> <photo image=“images/01.png” url=“http://www.google.nl” ><![CDATA[Download the new<br/>3D Carousel]]></photo> <photo image=“images/02.png” url=“http://www.google.nl” ><![CDATA[Download the new<br/>3D Carousel]]></photo>
</Carousel>

what’s wrong? if I click on the image it won’t work.

Thank you

FlashXML Support

Hello,

Please give us a link to your website and we will look into the problem.

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!
(will not be published)
You mistyped the word(s)!
Can't read? Change the image
Format your comments using Textile: *bold*, _italic_, "link text":address, @code@
Copyright © FlashXML.net 2009 - 2010