Results 1 to 5 of 5

Thread: Ultimate Fade In Slide Show (ver 1.5)

  1. #1
    Join Date
    Dec 2005
    Location
    Carolinas
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade In Slide Show (ver 1.5)

    http://www.dynamicdrive.com/dynamici...nslideshow.htm
    Hello,
    Just signed up and first time to post. Question on Fade Show. I hope I'm doing this all right. I play with web pages more for hobby than anything, just learning on my own.
    Question:
    I was able to figure out how to do this script. Haven't posted yet as I was hoping to figure something out. I want to have 3 pictures show as part of an introduction to a page, however I don't want them to loop. I have the 'copyright' heading so I'm not going to not give credit where due, but didn't know if it was ok to stop the loop so it will stay on last picture. Also, I need help to do this. I'm sure there is a spot to take out or something but don't know what it is. Thank you for help.
    justpete

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Check out the solution by jscheuer1: http://www.dynamicdrive.com/forums/s...ead.php?t=6567

  3. #3
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Add Caption?

    Hi!

    I've got somewhat of a related question. Is there any way to have a caption for a displayed image show below it or as a tooltip when the picture is moused over?

    Tom

  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

    Default

    Sure, add to the array for whatever slideshow(s) you want to have captions and tooltips:

    Code:
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]=["photo1.jpg", "", "", "cap1"] //plain image syntax
    fadeimages[1]=["photo2.jpg", "http://www.cssdrive.com", "", "cap2"] //image with link syntax
    fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new", "cap3"] //image with link and target syntax
    Replace the fadeshow.prototype.populateslide function with this one:

    Code:
    fadeshow.prototype.populateslide=function(picobj, picindex){
    var slideHTML=""
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
    slideHTML+='<img src="'+this.postimages[picindex].src+'" '+(this.theimages[picindex][3]? 'title="'+this.theimages[picindex][3]+'" ' : '')+'border="'+this.imageborder+'px">'
    if (this.theimages[picindex][3])
    slideHTML+='<div align="center">'+this.theimages[picindex][3]+'</div>'
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML+='</a>'
    picobj.innerHTML=slideHTML
    }
    Be sure to increase the height parameter when invoking the slideshow to insure adequate space for the caption to appear:

    Code:
    <script type="text/javascript">
    //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
    new fadeshow(fadeimages, 140, 255, 0, 3000, 1, "R")
    new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)
     
    </script>
    - John
    ________________________

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

  5. #5
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow!

    Thanks! works great! Maybe this option should be included in version 1.6?

    Tom

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
  •