Results 1 to 3 of 3

Thread: Ultimate Fade-In Slideshow: Cancel Preloading

  1. #1
    Join Date
    Mar 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ultimate Fade-In Slideshow: Cancel Preloading

    Script: Ultimate Fade-In Slideshow v1.5, previously modified per instructions from John to include Captions

    Reference Thread from "Absolutely" posted on 01-18-06 with final reply on 02-22-06; http://www.dynamicdrive.com/forums/s...light=ultimate.

    The question was asked how to NOT preload all images, but rather, how to load the next image while displaying another image. I have implemented the changes (4 lines of code added or changed), but can not get it to display. I get the following error message in FrontPage preview mode:

    Error: 'this.postimages.1' is null or not an object

    This error occurs at the first two lines of code added:

    this.postimages[0].src=this.theimages[0][0] // PRELOAD FIRST IMAGE
    WITHIN ARRAY

    this.postimages[1].src=this.theimages[1][0] // PRELOAD SECOND IMAGE
    WITHIN ARRAY

    I have a short demo program (using small images on a basically blank page) at:
    http://www.viennapres.org/index-fadein2.htm

    Any help in resolving this would be greatly appreciated.

    Thanks,

    Bill

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

    Default

    The error is in the code:

    Code:
    for (p=0;p<theimages.length;p++){
    this.postimages[p]=new Image()
    this.postimages[0].src=this.theimages[0][0] // PRELOAD FIRST IMAGE WITHIN ARRAY
    this.postimages[1].src=this.theimages[1][0] // PRELOAD SECOND IMAGE WITHIN ARRAY
    }
    It should actuallly be:

    Code:
    for (p=0;p<theimages.length;p++)
    this.postimages[p]=new Image()
    this.postimages[0].src=this.theimages[0][0] // PRELOAD FIRST IMAGE WITHIN ARRAY
    this.postimages[1].src=this.theimages[1][0] // PRELOAD SECOND IMAGE WITHIN ARRAY
    Notice the removal of the outer curly brackets. They are not supposed to be there, as is the case with the code I posted in the other thread.

  3. #3
    Join Date
    Mar 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile


    Thanks a bunch! Some day I hope to be able to figure out things like that myself, but I am still too much a novice to do it now. I really do appreciate your help!

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
  •