PDA

View Full Version : Question about swissarmy.js script



paldo
01-03-2009, 01:04 PM
I have installed this nice script and I wanted to do some changes but I did not managed to do it. The canvas ( or cell) where the images are loaded is white. I want it to be in another color. I have changed some background colors in the script with no result. Someone can tell me at which line of the script I have to do the change?

Here the script:

swissarmy.js

To be found at:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

Thank you very much

Paldo

My test homepage shows what I mean (http://paolinet.info/test.html). One possibility is to change the background color of each image, but as I have many of them I prefer to change the background color of the canvas.

jscheuer1
01-03-2009, 05:04 PM
Add the highlighted:


var slides=[]; //FIRST SLIDESHOW
//configure the below images and descriptions to your own.
slides[0] = ["1.jpg", "test"];
slides[1] = ["2.jpg", "test"];

slides.fadecolor='#099';

paldo
01-04-2009, 06:24 PM
Hallo John


I have checked on FF, Opera, Safari and Camino.
Still not working. Do I need to make some changes on the swissarmy.js script?


slides.fadecolor='#009999';

By the way, your script is nice.

Best regards from Switzerland

Paolo

jscheuer1
01-04-2009, 10:07 PM
Crop your 2.jpg image. It has a huge white space in it to the right and bottom.

Additionally, since you are not using image buttons, set this to false:


var preload_ctrl_images=true;

And if you set the dimensions of the show to the widest width and the tallest height, smaller images will be centered, ex:


<script type="text/javascript">
//Notes on Parameters: The only required parameter is the slides_array_name. If Width is used, so must Height.
//Interval is optional too. It is always last, either fourth after Width and Height or second after Slides_array_name.
//Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
new inter_slide(slides, 640, 480)
</script>

paldo
01-04-2009, 11:44 PM
Thank you John.

As I have many pictures of different size I thought it would be easier to give the same canvas background color as the page instead of changing every single picture ( I can set a background color to every single image but this take some time).

If I understand, your script allows only white as background color of the canvas were the pictures are loaded . Is this correct?

Paolo

jscheuer1
01-05-2009, 02:51 AM
No, the white background on 2.jpg is a part of the image itself.

paldo
01-06-2009, 03:43 PM
Dear John

thank you very much for your help. The diashow is now working as I like.

http://st-triphon.ch/fete08/diashowfete.html

All the best for 2009

Paolo