Results 1 to 7 of 7

Thread: Ultimate Fade-in slideshow (v2.1) - 1st image no fade in

  1. #1
    Join Date
    Nov 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v2.1) - 1st image no fade in

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

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

    3) Describe problem:

    The slideshow starts with a black background, I dont want this.

    I'd like to start the slideshow with an image 100% loaded so the first image should not fade in, after this the transition should start.

    Another solution to my problem would be that the slideshow starts with a transparent background (so it seems it starts fading from div background to first image).

    Anyone knows how to change the code?
    (sorry I have little to none js skills that's why I ask here)
    Thanks!

  2. #2
    Join Date
    Nov 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I just red this thread:

    http://www.dynamicdrive.com/forums/s...ad.php?t=50152

    I followed the instructions as posted by jscheuer1.

    What happpens now is that it starts exactly as I want, but now every transition starts with opacity: 0, but I'd like to keep the transitions as they were.

    So it seems I came a little closer, but not there yet!

  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

    I'm not real clear on what you are going for, but instead of following the instructions in that thread to the letter, do the other stuff recommended there, but change this line in in the script:

    Code:
    setting.$gallerylayers.eq(setting.fglayer).css({zIndex:999}) //foreground layer becomes background
    to:

    Code:
    setting.$gallerylayers.eq(setting.fglayer).css({zIndex: 999}).stop().animate({opacity: 0}, setting.fadeduration); //foreground layer becomes background
    I also setup another approach to what I think you are after that requires no changes to the styles or script. I can't find it at the moment, but we put an absolutely positioned div over the slide show and put an image in that. Using the undocumented onslide property of the show, made this added division go away after the first slide had fully faded in:

    Code:
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [470, 502], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
    		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
    		["http://stickmanlabs.com/images/kevin_vegas.jpg"],
    		["http://i30.tinypic.com/531q3n.jpg"],
    		["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: "",
    	onslide: function(){
    		document.getElementById('coverDiv').style.display = 'none';
    		this.setting.onslide = function(){};
    	}
    })
    Don't miss the added comma after the togglerid: "" property. The markup could then be something like:

    Code:
    <div style="position:relative;width:470px;height:502px"> <-- Same Dimensions as the show -->
    <div id="fadeshow1"></div>
    <div id="coverDiv" style="position:absolute;z-index:1002"><img src="myImage.jpg" alt=""></div>
    </div>
    You may have to add top and left style properties to the coverDiv to get the image to appear just where you want it to. Some other minor tweaks may be required.
    - John
    ________________________

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

  4. #4
    Join Date
    Nov 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow! That first solution works great!
    Perfect! Thanks!

  5. #5
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by tomkorver View Post
    Wow! That first solution works great!
    Perfect! Thanks!
    Tom,

    How did you get it to work? I want the first image to be visible when a page loads. Thanks.

    Francisco

  6. #6
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Neither of these solutions work for me, any other ideas?

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

    Please start a new thread for a new question. Give details. Closing this thread.
    - John
    ________________________

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

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
  •