Leonard Burton a écrit : > HI Christopher, Lose the 'r' ;-)
> Thanks for the reply. Would you please give me an code snippet > example of what you are meaning? Actually, thinking about it, this is heavier than manual timeouts, and for no purpose. Here's a non-queue-, timeout-based solution. Untested, but something along the lines of this: function playSoundsInQueue(sounds) { var delay = 0; sounds.each(function(info) { setTimeout(Sound.play.curry(info.uri), delay * 1000); delay += (info.duration || 0); }); } var soundFiles = [ { uri: 'blah.mp3', duration: 12 }, { uri: 'blip.wav', duration: 3 }, { uri: 'blob.mp3', duration: 13 } ]; playSoundsInQueue(soundFiles); This will probably cause tiny blanks between files, depending on the browser's performance, but should work well enough. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---