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

Shane Williams

Posted 8 years ago

Hi,

I have tried the free basic text component and adding to our current web page – Just want to get an idea of how it works and looks before possible buying the full paid version.
I have my test site running through IIS and once Ive added the code and files to my index.html directory and U run the index.html file directly from the defult directory – It opens and displays correctly.
However if I open IE and open the index.html hosted on IIS it does not display correctly.
I get the FlashXML logo but no menu items.
Why would it not display correctly when open the page hosted on IIS?

Thanks
Shane

FlashXML Support

Hi,

Please send us the link to your website and we will check it out.

raza

Posted 8 years ago

hi how do you make the swf a transparent background

FlashXML Support

Hi,

Please tell us which of our products you are referring?

Tharindu De Silva

Posted 8 years ago

Can you please tel me how to add these code to asp.net website?

FlashXML Support

Hi,

You can publish the SWF file on your .aspx page using the static method. Please add the embedding code into your .aspx page, just as in the following example:

<object classid=“clsid27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0” width=“600” height=“260” id=“gal” align=“middle”>       
 <param name=“allowScriptAccess” value=“sameDomain” />    
 <param name=“allowFullScreen” value=“false” />
 <param name=“flashvars” value=“folderPath=yourfolderpath”>    
 <param name=“quality” value=“high” />    
 <param name=“bgcolor” value=”#ffffff” />    
 <param name=“scale” value=“noscale” />    
 <param name=“salign” value=“tl” />    
 <param name=“movie” value=“Component.swf” />   

<embed src=“Component.swf” width=“600” height=“260” bgcolor=”#ffffff” name=“ComponentName” quality=“high” scale=“noscale” and salign=“tl” align=“middle” allowScriptAccess=“sameDomain” allowFullScreen=“false” flashvars=“folderPath=yourfolderpath” type=“application/x-shockwave-flash” pluginspage=“http://www.macromedia.com/go/getflashplayer” ></embed> </object>
You need to write in the code your own SWF name, change the values for the width and height attributes with the ones that you have in your component’s settings, and write your own folder path.

Julia

Posted 8 years ago

Hi, I have copied over all the files to my index.html folder, except the style.css file. Because I have the style sheet for the html file. However, I did copy the head and body style defined in your original style sheet to mine. But it seems that the other style definitions are interfering and not allowing the text over the flash images to show up. Complete style sheet:
head { font-family: Arial; font-size: 20px; color: #ffffff;
}
body { font-size:11px; line-height:16px; font-family: Arial;}
a { color:#aaaaff; text-decoration:none;}
a:hover { text-decoration:underline;}
.orange { color:#fe5800;}

#header { background: url(images/header_bckg.gif) repeat-x ; height:120px; } #logo { width:780px; margin:0 auto; padding:50px 0 0 20px; } #logo a{ color:#FFFFFF; text-decoration:none; font-weight:bold; height:12px; font-size:20px; text-transform:uppercase;} #logo a:hover { } #menu {color:#fff; text-align:center; margin-top:22px;} #menu ul{ width:780px; margin:0 auto;list-style:none; padding:0; text-align:left;} #menu ul li{display:inline} #menu ul a { display:block; float:left; font-weight:bold; font-size:13px; text-decoration:none; color:#fff; background:url(images/menu_enactive.gif) no-repeat bottom center; padding:8px 10px; width:118px; text-align:center; text-transform:uppercase;} #menu ul a:hover { background:url(images/menu_over.gif) no-repeat bottom center; color:#232323;} #menu ul a.active { background:url(images/menu_active.gif) no-repeat bottom center; color:#232323;} #menu ul a.active:hover { background:url(images/menu_active.gif) no-repeat bottom center; color:#232323;}

#main { width:100%; margin:20px 0 20px 0; float:left;} #head_image { height:150px; background:url(images/head_bckg.jpg) no-repeat #fe5d00; padding:30px 0 30px 50px; line-height:24px;} #slogan { color:#fff; font-family: “Arial Narrow”, Arial, Tahoma; font-size:21px; text-transform:uppercase; } #under_slogan_text { color:#ffff00; font-size:10px; line-height:12px; padding-top:15px;} #content { margin:0 auto; padding:0; width:780px;} #content h1 { margin:20px 0 0 0; text-transform:uppercase; font-size:20px; color:#000; font-weight:normal;} #text {float:left; width:530px; padding-left:20px;} #sidebar { background:url(images/sidebar_bckg.gif) repeat-x; margin:20px 0 0 560px; color:#6f6e6e; padding:20px; } #sidebar h2 {color:#fe5800; margin:0 0 15px 0; font-size:14px; font-weight:bold; text-transform:uppercase;}

#footer {background:url(images/footer_bckg.gif) repeat-x #3f3e3e 0 2px; height:94px; margin-top:20px; clear:both;} #left_footer { float:left; padding:40px 0 0 30px; text-transform:uppercase; color:#FFFFFF; font-weight:bold; font-size:11px;} #left_footer a { color:#FFFFFF;} #left_footer a:hover { text-decoration:none;} #right_footer { float:right; padding:40px 30px 0 0; text-transform:uppercase; color:#FFFFFF; font-weight:bold; font-size:11px; text-align:right;} #right_footer a { color:#FFFFFF;} #right_footer a:hover { text-decoration:none;}

FlashXML Support

Hi,

While I can’t really understand to which component you are referring to, allow me to advise you against merging the page’s style.css with our own. What I recommend is you change the name of the component’s CSS file, to anyother name, let’s say style_component.css and then edit the settings.xml and change the filename of the CSS file:

<styleSheet value="assets/css/style_component.css"/>

raza

Posted 8 years ago

hi im using the coding for two products on the same page , and it works perfect , but the only problem is viewing it in IE only 1 flash component works but the second flash show a white box , do you know how to fix this problem and im using dreamweaver cs5.5 and IE 7 , google chrome , everything in google chrome work perfect

FlashXML Support

Hi,

Please provide at support [at] flashxml.net the link to the webpage where you implemented our product to check it out.

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