49 users online (1 members and 48 guests)  


Page 3 of 3 First 1 2 3
  Results 31 to 37 of 37

Related

  1. how to stop javascript via another javascript    Forum: Javascript Forum
    Replies: 0
  2. Replies: 8
  3. Replies: 5
  4. Image slideshow    Forum: Javascript Forum
    Replies: 3
  5. Help with Javascript    Forum: Javascript Forum
    Replies: 2
  1. #31
    arian6's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    29

    Re: slideshow javascript need help

    Quote Originally Posted by rangana View Post
    Remove highlighted:
    Code:
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    [ code ]
    var Slides = new Array(    'http://boudhatour.wapath.com/files/kora2/step1.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step2.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step3.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step4.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step5.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step6.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step7.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step8.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step9.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step10.Jpg'
        'http://boudhatour.wapath.com/files/kora2/step11.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step12.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step13.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step14.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step15.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step16.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step17.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step18.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step19.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step20.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step21.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step22.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step23.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step24.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step25.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step26.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step27.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step28.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step29.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step30.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step31.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step32.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step33.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step34.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step35.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step36.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step37.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step38.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step39.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step40.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step41.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step42.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step43.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step44.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step45.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step46.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step47.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step48.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step49.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step50.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step51.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step52.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step53.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step54.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step55.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step56.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step57.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step58.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step59.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step60.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step61.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step62.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step63.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step64.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step65.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step66.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step67.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step68.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step69.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step70.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step71.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step72.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step73.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step74.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step75.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step76.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step77.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step78.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step79.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step80.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step81.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step82.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step83.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step84.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step85.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step86.Jpg',
    );
    for(var i=1;i<=86;i++)
     Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    ...so it should only read:
    Code:
    var Slides = new Array();
    for(var i=1;i<=86;i++)
     Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    do you want i remove all photo from new Array();
    but where i put the 85 rest ?
    for(var i=1;i<=86;i++)
    Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    i am confused please tell me where i put the 86 photo in out of the Array space ??? Its not possible ?? I am so sorry sir Angana but its dark for me i couldn't understand please give me more infos about where i put the 86 photo ??? Always Thanks
    ok i try removing all the photo inside the Array and only put your code
    var Slides = new Array();
    for(var i=1;i<=86;i++)
    Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    i have removing all photo from the Array and put your code but nothing else happen : http://boudhatour.wapath.com/files/kora2/test/slideshow_1.htm
    Last edited by arian6; 12-09-2008 at 09:43 AM.

  2. #32
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: slideshow javascript need help

    You need to remove this:
    Code:
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    [ code ]
    ...that's not a valid syntax.

    Also, you forgot to comment this line:
    Code:
    // DO NOT EDIT BELOW THIS LINE!
    function CacheImage(ImageSource)
    Fixing that will prove an effect.

    You need not to place any image in the array (manually), since the script I've given you as a replacement does it for you.

    You should have trusted my suggestion and yourself. I sense you're confused.

    Here's a fully rectified version:
    HTML Code:
    <script type="text/javascript">
    
    //Preloaded slideshow script- By Jason Moon
    //For this script and more
    //Visit http://www.dynamicdrive.com
    // Modified by Raymond Angana
    // username: rangana [Ahfb2000.com]
    // Changes: Automatic preload of images
    
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    var Slides = new Array();
    for(var i=1;i<=86;i++)
     Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    var SlideReady = false;
    
    // 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>
    Let me know if I missed something else.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #33
    arian6's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    29

    Re: slideshow javascript need help

    Quote Originally Posted by rangana View Post
    You need to remove this:
    Code:
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    [ code ]
    ...that's not a valid syntax.

    Also, you forgot to comment this line:
    Code:
    // DO NOT EDIT BELOW THIS LINE!
    function CacheImage(ImageSource)
    Fixing that will prove an effect.

    You need not to place any image in the array (manually), since the script I've given you as a replacement does it for you.

    You should have trusted my suggestion and yourself. I sense you're confused.

    Here's a fully rectified version:
    HTML Code:
    <script type="text/javascript">
    
    //Preloaded slideshow script- By Jason Moon
    //For this script and more
    //Visit http://www.dynamicdrive.com
    // Modified by Raymond Angana
    // username: rangana [Ahfb2000.com]
    // Changes: Automatic preload of images
    
    // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
    var Slides = new Array();
    for(var i=1;i<=86;i++)
     Slides.push('http://boudhatour.wapath.com/files/kora2/step'+i+'.Jpg');
    var SlideReady = false;
    
    // 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>
    Let me know if I missed something else.
    hello Rangana i am verry so sorry but not yet run this sacred slideshow ! I have add your script suggestion but always nothing else doesn't contacted the server for preload the next photo there you can see the result : http://boudhatour.wapath.com/files/kora2/test/slideshow_1.htm

  4. #34
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: slideshow javascript need help

    That effect you see, is the same just as you place all of the images manually (Corrected from some bugs):
    Code:
    <script type="text/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(
    	'http://boudhatour.wapath.com/files/kora2/step1.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step2.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step3.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step4.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step5.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step6.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step7.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step8.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step9.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step10.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step11.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step12.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step13.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step14.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step15.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step16.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step17.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step18.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step19.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step20.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step21.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step22.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step23.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step24.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step25.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step26.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step27.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step28.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step29.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step30.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step31.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step32.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step33.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step34.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step35.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step36.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step37.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step38.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step39.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step40.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step41.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step42.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step43.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step44.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step45.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step46.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step47.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step48.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step49.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step50.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step51.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step52.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step53.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step54.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step55.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step56.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step57.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step58.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step59.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step60.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step61.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step62.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step63.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step64.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step65.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step66.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step67.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step68.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step69.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step70.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step71.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step72.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step73.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step74.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step75.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step76.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step77.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step78.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step79.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step80.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step81.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step82.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step83.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step84.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step85.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step86.Jpg'
    );
    
    var SlideReady = false;
    
    // 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>
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  5. #35
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: slideshow javascript need help

    That effect you see, is the same just as you place all of the images manually (Corrected from some bugs):
    Code:
    <script type="text/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(
    	'http://boudhatour.wapath.com/files/kora2/step1.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step2.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step3.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step4.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step5.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step6.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step7.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step8.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step9.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step10.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step11.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step12.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step13.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step14.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step15.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step16.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step17.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step18.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step19.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step20.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step21.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step22.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step23.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step24.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step25.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step26.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step27.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step28.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step29.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step30.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step31.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step32.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step33.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step34.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step35.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step36.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step37.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step38.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step39.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step40.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step41.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step42.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step43.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step44.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step45.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step46.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step47.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step48.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step49.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step50.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step51.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step52.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step53.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step54.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step55.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step56.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step57.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step58.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step59.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step60.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step61.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step62.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step63.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step64.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step65.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step66.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step67.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step68.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step69.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step70.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step71.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step72.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step73.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step74.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step75.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step76.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step77.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step78.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step79.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step80.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step81.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step82.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step83.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step84.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step85.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step86.Jpg'
    );
    
    var SlideReady = false;
    
    // 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>
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  6. #36
    arian6's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    29

    Re: slideshow javascript need help

    Quote Originally Posted by rangana View Post
    That effect you see, is the same just as you place all of the images manually (Corrected from some bugs):
    Code:
    <script type="text/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(
     'http://boudhatour.wapath.com/files/kora2/step1.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step2.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step3.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step4.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step5.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step6.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step7.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step8.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step9.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step10.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step11.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step12.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step13.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step14.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step15.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step16.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step17.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step18.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step19.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step20.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step21.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step22.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step23.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step24.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step25.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step26.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step27.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step28.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step29.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step30.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step31.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step32.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step33.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step34.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step35.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step36.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step37.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step38.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step39.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step40.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step41.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step42.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step43.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step44.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step45.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step46.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step47.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step48.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step49.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step50.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step51.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step52.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step53.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step54.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step55.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step56.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step57.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step58.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step59.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step60.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step61.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step62.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step63.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step64.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step65.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step66.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step67.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step68.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step69.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step70.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step71.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step72.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step73.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step74.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step75.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step76.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step77.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step78.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step79.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step80.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step81.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step82.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step83.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step84.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step85.Jpg',
        'http://boudhatour.wapath.com/files/kora2/step86.Jpg'
    );
    
    var SlideReady = false;
    
    // 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>
    Ah ! Ok ! Right now i will add all image manualy as you told me of your expert advise i will tell you later if ok always thanks a lot Sir Rangana have a nice day

  7. #37
    arian6's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    29

    Re: slideshow javascript need help

    Quote Originally Posted by arian6 View Post
    Ah ! Ok ! Right now i will add all image manualy as you told me of your expert advise i will tell you later if ok always thanks a lot Sir Rangana have a nice day
    honestly i have try to add one by one manualy the 86 photo but the problem it need times may 30 minutes and the server of xtgem put me out an blank screen appears after saving my work then all photo i have add manualy its gone and i need login again sorry its not possible to add the photo one by one the in xtgem we need another means but what we can do now ??????



Page 3 of 3 First 1 2 3

Tags for this Thread