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

Graham Simon

Posted 9 years 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 9 years 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 9 years 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 9 years 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 9 years ago

Sorry!

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

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