PDA

View Full Version : Swiss Army Image Slideshow no controls..



anna32
02-02-2009, 08:09 AM
1) Swiss Army Image Slideshow

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

3) I have created a page using this script to show a slideshow..everything works fine, I just need to eliminate the control buttons which appear underneath the image and have tried adding in the line no_controls=1 however it looks like i haven't written it right or put it in the right place..can you tell me exactly what I need to type in and where I need to add it to the code and if I need to eliminate something else in order to delete the control buttons?

Your help would be greatly appreciated! thankss..hope to hear from you today..Anna

jscheuer1
02-02-2009, 08:23 AM
The no_controls=1 slide property must be defined for the array of slides you want it used with, it (and any other properties you wish set for that array) go after that array definition and reference it by name, example:


var slides=[]; //FIRST SLIDESHOW
//configure the below images and descriptions to your own.
slides[0] = ["photo1.jpg", "Kissing Fools"];
slides[1] = ["photo2.jpg", "Seated Woman"];
slides[2] = ["photo3.jpg", "The Dog Lovers"];
slides[3] = ["photo4.jpg", "Standing Woman"];
slides[4] = ["photo5.jpg", "John, Mary and Jesus"];
//optional properties for these images:
slides.no_controls = 1;

anna32
02-02-2009, 08:48 AM
Thankyou John..that works I thought I had done the same thing before..anyway it works now..i no longer see the control buttons..the only things is the word 'undefined' appears under the slideshow..I can't work out what to eliminate in the code..here's the code..can you tell me what could be causing the problem??

<head>
<title>Test page</title>

<script type="text/javascript">

var slides=[]; //FIRST SLIDESHOW
//configure the below images and descriptions to your own.
slides[0] = ["images/home_main_image1.jpg"];
slides[1] = ["images/home_main_image2.jpg"];
slides[2] = ["images/home_main_image3.jpg"];
slides[3] = ["images/home_main_image4.jpg"];
slides[4] = ["images/home_main_image5.jpg"];
slides[5] = ["images/home_main_image6.jpg"];
slides[6] = ["images/home_main_image7.jpg"];
slides[7] = ["images/home_main_image8.jpg"];
slides.no_controls = 1;
//above slide show uses only the defaults

//Notes:
//slides#.target will set a target for a slide group, will be overridden by slides#[#][3],

if present
//slides#.specs will set new window specifications for a slide group, will be overridden by

slides#[#][4], if present
//slides#.fadecolor will set fading images background color, defaults to white
//slides#.no_controls will set a slide show with no controls
//slides#.random will set a random slide sequence on each page load
//slides#.delay=3000 will set miliseconds delay between slides for a given show, may also be

set in the call as the last parameter
//slides#.jumpto=1 will display added controls to jump to a particular image by its number
//slides#.no_added_linebreaks=1; use for no added line breaks in formatting of texts and

controls

//use below to create a customized onclick event for linked images in a given show:
//slides#.onclick="window.open(this.href,this.target,'top=0, left=0,

//width='+screen.availWidth+', height='+screen.availHeight);return false;"

</script>

<script src="slideshow.js" type="text/javascript">

</script>
</head>
<body>

<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)
</script>

</body>
</html>

jscheuer1
02-02-2009, 08:57 AM
You've already eliminated too much. Each array entry should have at least two items, ex:


slides[0] = ["images/home_main_image1.jpg", ""];

even if the second one is empty.

You may also want to add (highlighted):


slides.no_controls = 1;
slides.no_descriptions = 1;
slides.no_added_linebreaks = 1;

anna32
02-02-2009, 09:06 AM
fantassssssstic!! greaaat! done! thanks to you!