Results 1 to 4 of 4

Thread: Change parameters in Ultimate Fade-in slideshow

  1. #1
    Join Date
    Jan 2009
    Location
    Trieste, Italy
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Change parameters in Ultimate Fade-in slideshow

    1) Script Title: Ultimate Fade-in slideshow (v1.51)

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

    3) Describe problem: I would like to change some parameters of the script.
    • the speed of the fade effect. It's seem too speedy for me and I would like to slow down it.
    • Somewhere I read (if I remember well) that the fade is made of 10 frames from the actual to the new immage. How to change this, to made the fade more smooth?

  2. #2
    Join Date
    Jan 2009
    Location
    Trieste, Italy
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    ok, seems that I'm not so stupid what I think :-)

    The speed or the steps / frames between two images is controlled by this parameter in the head of the document:

    ...
    function fadepic(obj){
    if (obj.degree<100){
    obj.degree+=10
    ...


    I changed the last parameter (10) to something lower.
    I put the last line to

    ...
    obj.degree+=3
    ...


    My only (other) question is:
    The visibility starts at 10% and then reach in steps decided with the upmentioned parameter to 100% (more or less)
    the difference is 90% (100% - 10%)
    The number (in my case 3) must be divisible with 90 or can be any number from 1 to 90 (or even 100)?

  3. #3
    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

    In my experience, it must divide evenly into 10, so 3 wouldn't be the best choice (I recommend 2, 5, 10 - anything higher is too fast - 1 is too slow), but most browsers will average out the results, and the script resets each new image to 10 again before fading it in.

    There is another place where you can adjust the rate of fading in:

    Code:
    fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
    The number 50 there. The higher that number, the slower things will go. 70 is pretty slow, any higher than that and the effect will be choppy. 20 is the lowest number you can safely use.

    I generally advise folks to adjust both the number you identified and this other one to get the optimal speed and smoothness for the rate of fading they want.

    One thing to be careful of though, if the rate of fading takes longer than the delay between images, things can get to a point where no image ever gets the chance to fade all of the way in.
    - 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:

    mitja (01-22-2009)

  5. #4
    Join Date
    Jan 2009
    Location
    Trieste, Italy
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your advice.

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
  •