no problem Bill... The solution is just to keep playing with it, and
recoding it in different ways until it works...  if my suggestion
helped, then I think it probably has got something to do with the way
the Sound.play function is executing... from what you say, i suspect
that it's not clearing the previous sound out of cache before loading
the next one - I've seen something like that before but not in
Rails... you could try something like this to see if that's the case:

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

good luck

On Dec 3, 1:39 am, "Bill Walton" <[EMAIL PROTECTED]> wrote:
> Hi Nellboy,
>
> Nellboy wrote:
> > i'd be looking at the sequence of events from the
> > time it's first triggered, and in what order the sound
> > is loaded...
>
> I'm not sure what you mean by 'order the sound is loaded'.  Order relative
> to what?  I'm looking at the js execution in FF.  The double dinging is
> intermittent now and I haven't been able to isolate the cause yet.  When it
> starts, though, it can be replicated.  What's really wierd is that I can put
> a breakpoint at the beginning of the Sound.play function and the app dings
> before it ever gets there.  Then it dings again at the expected point within
> the function.
>
> > the way i'd approach this would to call a function
> > which first loads the correct sound and then plays it...
>
> Thanks much for the suggestion.  It's helped.  I just pulled the url string
> out of the call to Sound.play and replaced it with a variable to which I'd
> just assigned the string.  The problem still happens, but not as much.
>
> Any other ideas are very, very welcome.
>
> 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