Results 1 to 2 of 2

Thread: Fade-In slideshow: changing manually

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

    Default Fade-In slideshow: changing manually

    1) Script Title: Fade-In slideshow

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

    3) Describe problem:
    What i want is a link that change the current image.
    I have this in the javascript:

    fadeshow.prototype.change=function(i){
    this.nextimageindex=i;
    fadearray[0].rotateimage();
    }

    and this in the body
    <a href="#" onClick='fadearray[0].change(2)'>Change photo</a>

    With this I call to that function with the number of the image of the array, and the image fade-in normally, but it creates a second setinterval. If you do this and click several times the fades go crazy, like there is a lot of interval functions changing everything.

    I've tried clearing the interval (clearInterval(fadeclear[0]) but it does not work...

    Any idea or solution ?

    thanx

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    See this modification of mine. I was originally going to object-orient it properly before suggesting it as a replacement for the original, but it doesn't look like that's going to happen any time soon.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •