Results 1 to 5 of 5

Thread: Fade in/out settings on Featured Content Clider

  1. #1
    Join Date
    Apr 2008
    Posts
    84
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Fade in/out settings on Featured Content Clider

    1) Script Title:
    Featured Content Slider

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

    3) Describe problem:
    What do I need to change in the javascript to get the fading changes, in and out, to be slower, and less harsh looking?

    Thanks

  2. #2
    Join Date
    Apr 2008
    Posts
    15
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    In the code, inserted into the body of your page, change the mileseconds parameter for each instance.

    Code:
    <script type="text/javascript">
    //Define: ContentSlider("slider_ID", [autorotate_miliseconds], [custompaginatelinkstext], [customnextlinktext])
    ContentSlider("slider1")
    //OR ContentSlider("slider1", 3000)
    //OR ContentSlider("slider1", 3000, linktextarray)
    //OR ContentSlider("slider1", 3000, linktextarray, "Foward")
    //OR ContentSlider("slider1", "", linktextarray)
    //OR ContentSlider("slider1", "", "", "Foward")
    </script>
    1000 miliseconds is equal to 1 second.
    Increase the number to make the transition last longer.
    Decrease the number to make the transition quicker.

    Hope this helped.

  3. #3
    Join Date
    Apr 2008
    Posts
    84
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That's just the change of the pictures, I want to slow down the opacity from coming up and going down so fast. Changing that doesnt affect it.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In this function of contentslider.js, change the highlighted part to a higher number:

    Code:
    ContentSlider.fadeup=function(sliderid){
    	var targetobject=document.getElementById(sliderid).opacitylayer || null //reference slider container itself
    	if (targetobject && targetobject.currentopacity<1){
    		this.setopacity(sliderid, targetobject.currentopacity+0.1)
    		window[sliderid+"fadetimer"]=setTimeout(function(){ContentSlider.fadeup(sliderid)}, 100)
    	}
    }
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Apr 2008
    Posts
    84
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OK, I see the actual problem, now.

    There is no fade OUT in the js code.

    So when you click, it just cuts out the image really quick, then fades in the new image.

    That's why it's so grating to the eye, no fade out.


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
  •