Results 1 to 10 of 10

Thread: Swiss Army Image slide show script

  1. #1
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Swiss Army Image slide show script

    1) Script Title: Swiss Army Image slide show script

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

    3) Describe problem: Is there a way to arrive at a particular image within the slideshow?

    Is it possible to arrive at a particular image within the slideshow by clicking on the image from a thumbnail table?

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

    Default

    This slideshow went through many changes pre and post production. I did make up a demo like that:

    http://home.comcast.net/~jscheuer1/s..._ext_thumb.htm

    You will probably have questions. However the main issue is, as written it assumes image filenames in this format:

    name_thumb.jpg

    paired with:

    name.jpg

    And, .jpg is the only extension but, that could be changed in the on-page script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks...here's what I'm working on

    Thanks.

    http://www.andrewmara.com/source/?123456 shows the thumbs after a scroll down.

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

    Default

    Quote Originally Posted by jscheuer1 View Post
    This slideshow went through many changes pre and post production. I did make up a demo like that:

    http://home.comcast.net/~jscheuer1/s..._ext_thumb.htm

    You will probably have questions. However the main issue is, as written it assumes image filenames in this format:

    name_thumb.jpg

    paired with:

    name.jpg

    And, .jpg is the only extension but, that could be changed in the on-page script.
    Hi John,

    Excellent script!

    I have it implemented with a load of descriptive text links jumping to the associated image in the array when clicked.

    However once clicked the auto-play feature seems to stop.

    My question is this: How do I tell the script to continue playing through the array, from the next image after the one I just jumped to?

    Thanks in advance...

    Phil Glen
    philglen@gmail.com

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

    Default

    philglen@gmail.com,

    If a show is stopped, this will start it:

    Code:
    iss0.gostop(iss0.go('gostp0'));
    The 0's refers to the show instance. If you have only one show on a page it is 0. The second show would be 1 then 2 and so on. If you are not using the previous/stop/next buttons, all you need is:

    Code:
    iss0.gostop();
    These same commands will stop a running slideshow. If you only want it to start the show if it is stopped, use:

    Code:
    if (!iss0.playing){iss0.gostop()};
    or, if you are using the previous/stop/next buttons:

    Code:
    if (!iss0.playing){iss0.gostop(iss0.go('gostp0'))};
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John, Useful info, thanks for the reply.

    The code:

    iss[0].gostop('gostp0'); works fine for starting and stopping the slideshow

    however I am jumping to a specific slide using:

    iss[0].jumper(oImg)

    with oImg being a dynamic image number.

    How do I get the slideshow to continue its loop from the slide after the one jumped to?

    Regards,

    Phil.
    Last edited by philglen@gmail.com; 03-27-2007 at 08:31 AM. Reason: Mistake

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

    Default

    Code:
    iss[0].jumper(oImg);iss0.gostop(iss0.go('gostp0'))
    However, that will make it go to the next image so try:

    Code:
    iss[0].jumper(oImg-1);iss0.gostop(iss0.go('gostp0'))
    or just have oImg be one less to begin with. A timeout may be needed to ensure that the commands to not cancel or partially cancel each other out.

    Edit/Added

    After playing around a little, this seemed to work out well:

    Code:
    <input type="button" onmousedown="if(iss[0].playing){iss[0].gostop(iss[0].go('gostp0'));setTimeout('iss[0].jumper(3)',1000);}else{setTimeout('iss[0].jumper(3)',500)};" onmouseup="setTimeout(function(){iss[0].gostop(iss[0].go('gostp0'))},4000)">
    Last edited by jscheuer1; 03-27-2007 at 12:45 PM. Reason: Update/Add
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Also, since it isn't entirely clear to me what you are doing, you might want to look here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=18996

    But, I think that is something different.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John, your final onmouseup/down implementation has hit the nail on the head!

    I would like to thank you for your time and effort, my current project has a tight timeline and you have saved me at least half a days analysis, which is greatly appreciated.

    Thank you once again for this great cross browser script!

    To see the code in action, here is the page in question:
    http://www.jrtinsurance.co.uk/testimonials.asp

    Phil.
    Last edited by philglen@gmail.com; 03-28-2007 at 01:03 PM. Reason: Added link

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

    Default

    Looks good but, I would suggest adding an onclick event to those links to return false so that you do not get the # appended to the address (adding # to the address like that in some browsers will reload the page - definitely something to be avoided):

    Code:
    <a href="#" onclick="return false;" onmousedown . . .
    Also, since you are not using any control buttons, you can use:

    Code:
    iss0.gostop();
    in place of:

    Code:
    iss[0].gostop(iss[0].go('gostp0'))
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •