Results 1 to 5 of 5

Thread: Swiss Army Slideshow -- stop loop?

  1. #1
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Swiss Army Slideshow -- stop loop?

    1) Script Title: Swiss Army Image Slideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...army/index.htm

    3) Describe problem: I'd like to modify the script in order to keep my show from repeating. I'm using a slideshow as my splash page (instead of flash) and I'd like it to cycle once, and then stop at the last slide.

    How can I do that?

    Thanks,

    John

  2. #2
    Join Date
    Jun 2007
    Location
    England
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Assuming you have all of your images in an array, you can run through them using an increasing 'index' variable. The variable can just be incremented on each cycle until it reaches a certain value, then it will no longer increase-causing the slideshow to end.

  3. #3
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I tried doing that, but it didn't work. But it's probably because I don't know much (if anything) about javascript. Here's what I used:

    var i=0
    for (i=0;i<=0;i++)
    {
    contents of slideshow script here
    }

    My assumption was that the show would cycle once, change i to 1 and then it would stop. But it just seems to either ignore this completely, or it never starts the show at all.

    Can you suggest what I should be using?

    Thanks,

    John

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  5. #5
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you!

    Thank you! That was just what I was looking for.

    John

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •