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

hispinkslip

Posted 9 years ago

Hello,

First off, I wanted to say how thoroughly impressed I am with your Accordian FX software. I don’t have much flash or xml knowledge and I was easily able to determine how to code the included files. When I preview index.html locally from my computer, I can view them exactly as expected, similar it sounds to Steve Warwick, however when I upload all the files onto my server (Homestead), I too have a blank space where the swf file should load in the browser. I have Flash 10 installed on my laptop, and I have even attempted uploading crossdomain.xml and socketpolicy.tar files onto my server to help with security issues, which incidentally, did nothing, lol.
I have been beating my head against the wall for the past 2 days trying to resolve this on my own, but to no avail. I even went back into my <head> tags and modified each path to point directly to each file just in case my server was improperly recognizing each location.
Any suggestions? I am willing to give you temporary access to the site, of course, if you provide me with your email so the information can remain private.

Thank you!

FlashXML Support

I just sent you an e-mail where you can give me your informations. So I can have access to your website.

Steve Warwick

Posted 9 years ago

Hi,

I am just in the process of launching my web-site and am using 123-Reg for a template-build e-commerce site.

I have no web experience at all and am not a programmer or designer.

I’ve downloaded the files for the menu and have put these all in the same folder, along with an html file as specified with the necessary code in it.

When I open this file in explorer it displays the menu exactly as expected.

However, when trying to get this on my site (I believe I’m right in trying to embed this HTML code into the page), it only shows a blank area with the exception of showing an almost microscopic flashxml.net logo.

Can you help me in explaining where I am going wrong and what I should do to try to get this live on my site?

Many thanks

Steve

FlashXML Support

Could you give me access to your website?.
Or send me an archive with your files to see exactly what’s the problem.

Terry West

Posted 9 years ago

We are trying to use the Banner FX object. So far so good, however… we want to point the CSSstyle option to /_css/ourstyle.css.

Your object does not handle this case correctly. We can put ourstyle.css in the same directory as the .html and it works fine. move it to /_css and it does not.

We suspect there is an issue in your code. Can you verify and fix?

Regards
Terry West

FlashXML Support

There’s nothing wrong with the Banner Rotator FX. There has to be done a small modification in the settings.xml file.
So in the <generalOptions> tag at the styleCSS attribute set the follwing path: _css/ourstyle.css and it will work.

ralphiedee

Posted 9 years ago

Need instructions,
delete large image
how to make rotation move only mouse x and y are close to main pic
how to make main image bigger than the rest of gallery images?

plz advize

rrr

FlashXML Support

You have two functions onRollOut and onRollOver:

The onRollOut function listens for mouse cursor when it’s over an image. In the FLA file the function looks like this:

this.onRollOver = function() {
 var trans:Transform = new Transform(this.holder);
 var colorTrans:ColorTransform = new ColorTransform();
 .............
 
 }

After penultimate bracket you’ll need to write the follwing lines of code (in bold style) in order to make the main image bigger:

this.onRollOver = function() {
 var trans:Transform = new Transform(this.holder);
 var colorTrans:ColorTransform = new ColorTransform();
                ............... 
 
 var holderXscaleRollOver:Tween = new Tween(this.holder, "_xscale", Back.easeOut, this.holder._xscale, 17.7777 * 1.5, .5, true);
 var holderYscaleRollOver:Tween = new Tween(this.holder, "_yscale", Back.easeOut, this.holder._yscale, 17.7777 * 1.5, .5, true);
 var holderXRollOver:Tween = new Tween(this.holder, "_x", Back.easeOut, this.holder._x, -20, .5, true);
 var holdXscaleRollOver:Tween = new Tween(this.hold, "_xscale", Back.easeOut, this.hold._xscale, 100 * 1.52, .5, true);
 var holdXRollOver:Tween = new Tween(this.hold, "_x", Back.easeOut, this.hold._x, -20, .5, true);
 var holdYRollOver:Tween = new Tween(this.hold, "_y", Back.easeOut, this.hold._y, 187, .5, true);
 
 }

Next you’ll need to make the image come back to the original size when mouse cursor leaves the picture (roll out).
So you’ll need to make the follwing changes in the onRollOut function:
The function looks like this in the FLA file:

this.onRollOut = function() {
 var trans:Transform = new Transform(this.holder);
 var colorTrans:ColorTransform = new ColorTransform();
 ..........
 }

You’ll need to insert the follwing 6 lines (in bold style) of code after the penultimate bracket:

this.onRollOut = function() {
 var trans:Transform = new Transform(this.holder);
 var colorTrans:ColorTransform = new ColorTransform();
 ..........
 
 var holderXscaleRollOut:Tween = new Tween(this.holder, "_xscale", Back.easeOut, this.holder._xscale, 17.7777, .5, true);
 var holderYscaleRollOut:Tween = new Tween(this.holder, "_yscale", Back.easeOut, this.holder._yscale, 17.7777, .5, true);
 var holderXRollOut:Tween = new Tween(this.holder, "_x", Back.easeOut, this.holder._x, 0, .5, true);
 var holdXscaleRollOut:Tween = new Tween(this.hold, "_xscale", Back.easeOut, this.hold._xscale, 100, .5, true);
 var holdXRollOut:Tween = new Tween(this.hold, "_x", Back.easeOut, this.hold._x, 0, .5, true);
 var holdYRollOut:Tween = new Tween(this.hold, "_y", Back.easeOut, this.hold._y, 160, .5, true);
 }

For the part with the carousel to move only when mouse is close to the main image, you’ll need to do as follows:

You’ll need to put all the code from the onEnterFrame function in a if test, like this:

So the previous code looks like this:

thumbs.onEnterFrame = function() {
 
 speed -= initialRotate*0.001;
 
 if ((_ymouse >30) && (_ymouse<galleryHeight-30) && (_xmouse>20 imagesX) && (_xmouse<galleryWidth-20)) { 
 ........ 
 
 for (var i = 0; i<pictures.length; i  ) {
 pictures[i].show();
 }
 }

The modified code would be:

thumbs.onEnterFrame = function() {
 
 trace(_ymouse);
 trace(this._ymouse);
 speed -= initialRotate*0.001;
 if(this._ymouse   40 >= _ymouse/2)
 {
 
     if ((_ymouse >30) && (_ymouse<galleryHeight-30) && (_xmouse>20 imagesX) && (_xmouse<galleryWidth-20)) 
                    ...............
 
 }
 
 for (var i = 0; i<pictures.length; i  ) {
 pictures[i].show();
 }
 }

Laurie

Posted 9 years ago

I got the carousel to work from a seperate directory, but it lost the connection to but1. How do I replace that so the button shows?

FlashXML Support

In your settings.xml file set the value of rotateOnRollOver to both.
This should show you the buttons.
You find this in <Rotation_Properties> tag.

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