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

Artur

Posted 6 months ago

“...Test it and see if it works.”

It works very great, thank you for your support!
You’re the best! )

Artur

Posted 6 months ago

Good evening,
I can’t support you with FTP details as I am not directly connected to it. Although it is weird that you couldn’t find images at specified folder, please try again, addresses are:
http://fohowstore.weebly.com/uploads/7/9/9/2/7992239/5.jpg
and
http://fohowstore.weebly.com/uploads/7/9/9/2/7992239/10.jpg

I’m still hoping for your solution.

Have a nice day,
Artur

FlashXML Support

Hi,

The problem is with the paths to the images that you declared in images.xml. As the location of your images is the same with that of your XML file, there is no need to write full paths to the images. So, please edit images.xml and change the paths like this:

<photo image="10.jpg" url="http://www.flashxml.net" target="_blank" duration="4" effect="zoom" zoompercent="110" direction="out" hzoompos="left" vzoompos="right">
<head>Download the new FlashXML Banner Rotator</head><body>it's FREE</body>
</photo>

Test it and see if it works.

Artur

Posted 6 months ago

I am testing your Banner Rotator FX product.
I have copied the files into one directory on a server (files: bannerrotatorfx.swf, images.xml, settings.xml, style.css, swfobject.js, index.html and random images to display named “5.jpg“ and “10.jpg“). It is working very well using given index.html file.
However, when I upload files onto a server, it doesn’t display image files – all I can see is loading button. Tried to figure this problem out by myself, but nothing has resulted from my efforts.

Your help would be very appreciated.

Cheers,
Artur

FlashXML Support

Hi,

Please provide FTP connection details to support [at] flashxml.net to investigate further, as right now, I can’t seem to find the specified .jpg images in the upload folder:

http://fohowstore.weebly.com/uploads/7/9/9/2/7992239/

WEbman

Posted 6 months ago

Sorry, but I don’t seem to have a hotspots folder at all? This wasn’t included in the download I purchased?

FlashXML Support

Hi,

I’m sorry for this misunderstood, I thought you was referring to Panorama Viewer FX. Indeed, the path to these files is hard coded and can not be specified in a xml file. You will need to create a folder called assets in folder1 and folder2 and to copy there these two files.

WEbman

Posted 6 months ago

Hi, that all works great, thanks. The only thing now that isn’t showing is handCursor.png and close.png (X) on the popup window. I can’t seem to find the reference to these in any of the xml files. Thanks for your quick responses to my persistent questioning!

FlashXML Support

Hi,

In hotspot.xml you have set the path to another file through the value of info attribute:

info="../assets/hotspots/info/mosca1.xml"

In this file (mosca1.xml) you need to set the path for closeButton, scrollDragBar, etc.

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