Advanced Search

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Preloaded Slideshow Script questions

  1. #11
    Join Date
    Jul 2012
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Page not yet up. I tend to build and test before uploading. Will check for possible (likely) syntax error in array.
    I had thought that the entire premise of this script was to load next image while the first was up, thereby avoiding the whole "pre-load all the images" delay.
    Do you have a fave among:

    http://www.dynamicdrive.com/dynamici...army/index.htm

    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    http://www.dynamicdrive.com/dynamici...bgcarousel.htm

    http://www.dynamicdrive.com/dynamici...wave/index.htm

    I have four shows to create. Another as long as this one, and two more less than half this size (each on its own page called from main page.) Simpler is better. Right click or button to advance, left click or button to go back esc or button to return to main page.
    Doesn't need fade/effects/ music.
    E

  2. #12
    Join Date
    Jul 2012
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Just noticed broken link icon in empty frame. I must not have sufficient path info in the array. The page and the images will be in the same folder. Will I need to use a path that goes all the way back to the drive letter? I don't really understand the paths that look like
    DriveLetter://. . ./. . ./. . ./foldername/subfoldername/filename (don't even think that's accurately reproduced e.g.)

  3. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,554
    Thanks
    42
    Thanked 2,879 Times in 2,851 Posts
    Blog Entries
    12

    Default

    You just need a valid path to the image. For testing purposes though, you could just remove that image from the array.

    Also, it's a good idea to make one folder for all of the images as a subfolder of the folder that has the slideshow on it. Move or copy them there. Then say that folder is called images. Then each path is the same:

    Code:
    images/image.jpg
    Oh, and according to the script's description, it does an incremental preload. But that still may mean that a missing or broken image could break it when it gets to that point. Of the slideshows I mentioned before, Swiss Army is the only one that does a true incremental preload. Ultimate Fade-in and perhaps the others preload the first image and assume the other images will preload as they are a part of the DOM at that point. Almost always works out well for Ultimate Fade-in. I've less experience with the other two, but from what I've seen of them, whatever they do is good too, unless there are any really huge (in byte size) images.

    Still, to be of any real help in diagnosing code, it's best to have a live demo of the problem to work with. So if you continue to have problems, put one up and post a link to it.
    - John
    ________________________

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

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Eli (08-15-2012)

  5. #14
    Join Date
    Jul 2012
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi John,
    Tried various path incarnations. While in same folder as show page tried foldername/imagename. NG. Added preceding / to foldername. NG
    Moved images to subfolder of show page folder. Tried foldername/subfoldername/imagename. With and without preceding /. NG. Double checked for stray spaces etc between apostrophes in the array.

    Put up here:
    http://www.eli-tables.com/yahoo_site...mages/BasicCAD Demo/BasicCAD Demo.html
    Opens in Firefox. Sourceview looks like intended.

    ne marche pas

    Able to call individual slides as thus:
    http://www.eli-tables.com/yahoo_site...ix/TITLE23.jpg
    I think ultimately gonna make images display larger.
    I'm sure I've done something lame that'll be obvious to your eye.
    E

  6. #15
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,554
    Thanks
    42
    Thanked 2,879 Times in 2,851 Posts
    Blog Entries
    12

    Default

    There were 2 opening <script> tags, some misplaced and/or missing ' marks in the array, and the path should be:

    Basiccad Pix/

    not:

    /Basiccad Pix/

    After I fixed those it ran for me:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
    	<TITLE></TITLE>
    	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.3  (Win32)">
    	<META NAME="CREATED" CONTENT="0;0">
    	<META NAME="CHANGED" CONTENT="0;0">
    	<SCRIPT LANGUAGE="JavaScript">
    
    //Preloaded slideshow script- By Jason Moon
    //For this script and more
    //Visit http://www.dynamicdrive.com
    
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    var Slides = new Array('Basiccad Pix/TITLE23.jpg','Basiccad Pix/DOCASE1.jpg','Basiccad Pix/DOCASE2.jpg','Basiccad Pix/DOCASE3.jpg','Basiccad Pix/DOCASE4.jpg','Basiccad Pix/DOCASE6.jpg','Basiccad Pix/DOCASE7.jpg','Basiccad Pix/DOCASE10.jpg','Basiccad Pix/DOCASE11.jpg','Basiccad Pix/DOCASE0.jpg','Basiccad Pix/INTTEXT1.jpg','Basiccad Pix/DOCASEX.jpg','Basiccad Pix/INTTEXT2.jpg','Basiccad Pix/BELLER6.jpg','Basiccad Pix/BELLER1.jpg','Basiccad Pix/BELLER2.jpg','Basiccad Pix/BELLER3.jpg','Basiccad Pix/BSCTXT1.jpg','Basiccad Pix/BSCSLD0.jpg','Basiccad Pix/BSCTXT2.jpg','Basiccad Pix/BSCSLD1.jpg','Basiccad Pix/BSCSLD3.jpg','Basiccad Pix/BSCSLD4.jpg','Basiccad Pix/BSCSLD5.jpg','Basiccad Pix/BSCSLD6.jpg','Basiccad Pix/BSCSLD7.jpg','Basiccad Pix/BSCSLD8.jpg','Basiccad Pix/BSCSLD9.jpg','Basiccad Pix/BSCTXT3.jpg','Basiccad Pix/BSCTXT4.jpg','Basiccad Pix/BSCSLD10.jpg','Basiccad Pix/BSCSLD12.jpg','Basiccad Pix/BSCSLD13.jpg','Basiccad Pix/BSCSLD14.jpg','Basiccad Pix/BSCSLD15.jpg','Basiccad Pix/BSCSLD16.jpg','Basiccad Pix/BSCSLD17.jpg','Basiccad Pix/BSCTXT5.jpg','Basiccad Pix/BSCSLD18.jpg','Basiccad Pix/BSCSLD19.jpg','Basiccad Pix/BSCTXT6.jpg','Basiccad Pix/D0.jpg','Basiccad Pix/D1.jpg','Basiccad Pix/D2.jpg','Basiccad Pix/D3.jpg','Basiccad Pix/D4.jpg','Basiccad Pix/D5.jpg','Basiccad Pix/D6.jpg','Basiccad Pix/D7.jpg','Basiccad Pix/D8.jpg','Basiccad Pix/D9.jpg','Basiccad Pix/BSCTXT7.jpg','Basiccad Pix/D10.jpg','Basiccad Pix/D11.jpg','Basiccad Pix/BSCTXT8.jpg','Basiccad Pix/DF.jpg');
    
    
    // DO NOT EDIT BELOW THIS LINE!
    function CacheImage(ImageSource) { // TURNS THE STRING INTO AN IMAGE OBJECT
       var ImageObject = new Image();
       ImageObject.src = ImageSource;
       return ImageObject;
    }
    
    function ShowSlide(Direction) {
       if (SlideReady) {
          NextSlide = CurrentSlide + Direction;
          // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
          document.SlideShow.Previous.disabled = (NextSlide == 0);
          document.SlideShow.Next.disabled = (NextSlide == 
    (Slides.length-1));    
     if ((NextSlide >= 0) && (NextSlide < Slides.length)) {
                document.images['Screen'].src = Slides[NextSlide].src;
                CurrentSlide = NextSlide++;
                Message = 'Picture ' + (CurrentSlide+1) + ' of ' + 
    Slides.length;
                self.defaultStatus = Message;
                if (Direction == 1) CacheNextSlide();
          }
          return true;
       }
    }
    
    function Download() {
       if (Slides[NextSlide].complete) {
          SlideReady = true;
          self.defaultStatus = Message;
       }
       else setTimeout("Download()", 100); // CHECKS DOWNLOAD STATUS EVERY 100 MS
       return true;
    }
    
    function CacheNextSlide() {
       if ((NextSlide < Slides.length) && (typeof Slides[NextSlide] == 
    'string'))
    { // ONLY CACHES THE IMAGES ONCE
          SlideReady = false;
          self.defaultStatus = 'Downloading next picture...';
          Slides[NextSlide] = CacheImage(Slides[NextSlide]);
          Download();
       }
       return true;
    }
    
    function StartSlideShow() {
       CurrentSlide = -1;
       Slides[0] = CacheImage(Slides[0]);
       SlideReady = true;
       ShowSlide(1);
    }
    </SCRIPT>
    </HEAD>
    <BODY LANG="en-US" DIR="LTR" ONLOAD="StartSlideShow()">
    <P ALIGN=CENTER><FONT FACE="Verdana, sans-serif"><FONT SIZE=6><I><B>BasicCAD
    Demo</B></I></FONT></FONT></P>
    <P><BR><BR>
    </P>
    <form name="SlideShow">
    <table>
    <tr>
       <td colspan=2><img name="Screen" width=534 height=380></td>
    </tr>
    <tr>
       <td><input type="button" name="Previous" 
    value=" << "
    onClick="ShowSlide(-1)"></td>
       <td align="right"><input type="button" name="Next"
    value=" >> " onClick="ShowSlide(1)"></td>
    </table>
    </form>
    <P><BR><BR>
    </P>
    </BODY>
    </HTML><!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="http://l.yimg.com/d/lib/smb/js/hosting/cp/js_source/whv2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?us1345065993" alt="setstats" border="0" width="1" height="1"></noscript>
    Oh, and I was just double checking, there's one missing image:

    eli-tables.com/yahoo_site_admin/assets/images/BasicCAD%20Demo/Basiccad%20Pix/SCSLD10.jpg

    I think that's just a typo, it's probably supposed to be BSCSLD10.jpg - I just fixed it in the above code.
    Last edited by jscheuer1; 08-15-2012 at 10:59 PM. Reason: double check
    - John
    ________________________

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

  7. #16
    Join Date
    Jul 2012
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    John,
    You are Da' Bomb!
    It's Alive!
    Now that you've set me on solid ground; lets see if I can make the remaining ones work.
    Many much thanks
    E

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
  •