sounds like you have to load the sound first to play it?... i'd be
looking at the sequence of events from the time it's first triggered,
and in what order the sound is loaded... the way i'd approach this
would to call a function which first loads the correct sound and then
plays it...

def play_correct_sound(input_value)
  if input_value = 'good'
    correct_sound = good_sound
  else
    correct_sound = bad_sound
  end
  Sound.play(correct_sound)
end

I could be wrong though...

On Dec 2, 9:04 pm, "Bill Walton" <[EMAIL PROTECTED]> wrote:
> Hi Fred,
>
> Frederick Cheung wrote:
>
> > scriptaculous also has a simple sound thingy
>
> (http://github.com/madrobby/scriptaculous/wikis/sound
>
> > )
>
> Thanks.  I found that a bit after my initial plea and grabbed sound.js.  I'm
> having a really wierd problem with it though.  I call Sound.play(good_sound)
> or Sound.play(bad_sound) depending on whether or not an item is found.
> First time it works correctly, playing the correct sound.  Second time, it
> plays the last sound, then the correct sound.  Works that way from then on.
> I'm logging the calls to Sound.play and it's only getting called once per
> request/response.  But the sound's getting played twice.  I've scratched my
> head raw.  Any idea what I might be doing wrong?
>
> Thanks,
> Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to