3

I am using the JQuery Plugin and would like to add sound for when my slideshow is going. I am using the shuffle effect and whenever it is to go to the next slide I would like a sound to be played.

$('#chars').cycle({
    fx:     'shuffle',
    prev:   '#prev',
    next:   '#next',
    timeout: 6000,
    speed:  800
});

jquery.malsup.com/cycle/ - That is the Plugin site.

These are the js files I am using.

Thanks a lot!

karim79
  • 339,989
  • 67
  • 413
  • 406
CongdonJL
  • 139
  • 2
  • 3
  • 10

1 Answers1

2

Have a look at this previous question:

Cross-platform, cross-browser way to play sound from Javascript?

And use what you learn from that to play a sound from within Cycle's before and after callbacks, e.g.:

$('#chars').cycle({
    fx:     'shuffle',
    prev:   '#prev',
    next:   '#next',
    timeout: 6000,
    speed:  800,
    after: function() { soundPlay("vrooOOoom"); }
});
Community
  • 1
  • 1
karim79
  • 339,989
  • 67
  • 413
  • 406
  • This seems like it will be a great solution. I am still having a couple issues. I cannot install a plugin on firefox so I am going to work on that. In IE the sound works the first time and then does not work again. I made a simple function that just shows an alert box and it works perfectly. – CongdonJL Dec 09 '10 at 17:32
  • Edit your question to show your new code that partially works – Justin C Dec 09 '10 at 23:43