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

y

Posted 7 years ago

I am using Video Player FX. I would like to be able change which video gets played first dynamically. The order is derived from media.xml but that is a static file. Is there a flashvar I can use to either tell ur player to start at a different index or can I pass an alternative file name for media.xml to accomplish what I am looking for. Thank you.

FlashXML Support

Hi,

If you were skilled with PHP you could dynamically generate the XML values with PHP and add the first video according to the criteria you want to chose.

Golden Child

Posted 7 years ago

Hi,

I implemented the mp3 player for a website for a client. The player works perfectly fine with my own mp3 files locally on my computer. However, the player no longer works when launched to the web. The player never finishes loading. What could be wrong here? All the files are on the site file manager and I think I routed all the files correctly.

Thanks in advance.

FlashXML Support

Hi,

I checked your website but I noticed that our MP3 Player is working properly now. Try to clear your browser’s cache and to check again.

Alexandre

Posted 7 years ago

Hi

i’m new on this site and start with xml…

I did download the “So portfolio template” and try to changes texts/ pictures / and categories into french and create a new one like an Audio demo with the “mp3player” integrated in a categorie Demo voice…

Till that no problem …

I do encouter some difficulties with the video categorie…
I just want to replace “the youtubeviemoplayer” by an embed video player (videoplayerFX) to play my own videos directly from my site. I want this video player to be integrated on the white bg like the “home”, “about” and “contact” categories… of the “So template”

I did succed with the mp3 player but do not with this one…

actually I’m just working on local to make some tests and to learn before i put my site online…

What would be the good process?

Thanks for your answers

Alexandre

FlashXML Support

Hi,

The Youtube Vimeo Player can play local video files too. It can play them by adding them in the videos.xml file. The syntax should be like this:

<video media="video_folder/video.mp4" image="video_folder/image.jpg" backColor="0x000000" backAlpha="1" autoplay="true">
<![CDATA[<thumbHead>Hello</thumbHead><thumbBody>Welcome to the new YouTube/Vimeo Player</thumbBody>]]></video>

If you are to look at our player’s page you’d see it supports both Youtube and Vimeo videos, as well as local FLV/MP4 files, and even MP3 files.

Neill

Posted 7 years ago

Hi guys

Re Carousel.
I’ have tried various solutions you provided with the setting of the path but nothing works.
If a click on the image inmy dev environment all works fine (must be VS2010 web server), it opens up a video clip on _blank.

But when uploaded to my host server, the javascript is not finding the video clip file. Is it because IIS (don’t know if the host is running that or Apace?) is performing a shadow copy of files for caching and the current directory path is an issue?

I could not find any previous issues where users are making use of aspx, only plain html or php.
I will appreciate your assistance.

Thanks
Neill

FlashXML Support

Hi,

The problem is that the script you wrote is trying to access the MP4 files in the root folder, like this:

http://www.thepuppet.co.za/The_Puppet_Accreditation.mp4

and this file isn’t here on your server – 404 error – not found.

Please make sure that the filepath to the MP4 is correct, as right now the file you are trying to open is not there.

Monique

Posted 7 years ago

Hello,
I have several slideshows in my website, for every client I have a slideshow. So for every client I have a file.
The problem is that I have to copy everytime all the components.
Is it possible to keep in the clients file only the file with the images and the image.xml file and of course the html file.
And create a Data file where I keep the other files, BannerRotatorFX.swf, settings.xml, style.css and swfobject.js.
Those files does’nt change they are the same for all the clients.
Can you help me please?

FlashXML Support

Hi,

You can just create different settings.xml (even if the settings will not change) and images.xml files for each user. After that, you can specify in the embedding code which settings/images to use, as you can see in this tutorial.

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