Results 1 to 3 of 3

Thread: Ultimate Fade-In Slideshow with sound?

  1. #1
    Join Date
    Jul 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ultimate Fade-In Slideshow with sound?

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

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

    3) Describe problem: Would it be possible to add a sound file to the slideshow with maybe play/stop features?

  2. #2
    Join Date
    Jul 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    anyone know if this is possible?

  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

    Generally the two don't go together. You could play a sound on your page - always a good choice if your object is to annoy and drive away users, less so if it can at least be turned off, even less so if it starts out off and may be turned on - but for some kind of direct integration into a slide show, if synchronized timing is at all critical, use Flash. If timing isn't critical, just make the noise feature separate. If you attempt to integrate it with the show using javascript, due to load times varying between images and sound files, there is no guarantee things will mesh up very well.

    For simple play/stop buttons for the slide show you may init your show something like so:

    Code:
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [468, 500], //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: "fadeshow1toggler",
    	nav: function(num){
    		mygallery.navigate(num);
    		var dm = mygallery.setting.displaymode;
    		if(typeof dm.timer !== 'undefined'){
    			clearTimeout(dm.timer);
    			}
    		dm.timer = setTimeout(function(){
    			if(dm.type !== 'auto'){
    				dm.type = 'auto';
    				mygallery.showslide('next');
    				}
    			}, dm.pause);
    		}
    })
    Then you'll be able to use any or all of these buttons:

    HTML Code:
    <input type="button" onclick="mygallery.navigate(mygallery.setting.imgindex);" value="Stop"><input type="button" onclick="mygallery.setting.nav(0);" value="1"><input type="button" onclick="mygallery.setting.nav(1);" value="2"><input type="button" onclick="mygallery.setting.nav(2);" value="3"><input type="button" onclick="mygallery.setting.nav(3);" value="4"><input type="button" onclick="mygallery.setting.nav(4);" value="5"><input type="button" onclick="var dm=mygallery.setting.displaymode;if(dm.type!=='auto'){dm.type='auto';mygallery.showslide('next');}" value="Go">
    which may be placed anywhere on the page that you like.
    - 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
  •