Playing a sound with flash

Hi Guys

I am writing a chatlike application with Ruby on Rails. I have come
across the problem that I need to subtly alert a user that a comment has
been made in the case where the user has minimised the browser, or it is
not in focus.

I am using Juggernaut to handle the posting back to the browser and it
works fine (generally - have had some hiccups though - it hangs on
Windows it seems). As Juggernaut requires the user to have flash
installed I would think that the best way to get a beep playing would be
to get flash to play the sound.

Unfortunately I dont have much (any, to be honest) experience with
flash. Has anyone ever had a similar problem and solved it?

(It seems that most of the literature I found on playing sound with
Rails recommends Apple’s Quicktime - as I am already requiring my users
to have flash enabled for Juggernaut I’d like to avoid asking them to
also install Quicktime)

You thoughts (and examples especially!) will be appreciated

Pieter H.
South Africa

On 28 Jan 2010, at 08:54, Pieter H. wrote:

installed I would think that the best way to get a beep playing
also install Quicktime)

You thoughts (and examples especially!) will be appreciated

Since you are just sending back javascript code, you can use
scriptaculous sound (or some other javascript sound library) to play a
sound. No need to send it using flash, just load it as part of the
javascript you’re initializing on the page. No need for Quicktime at
all.

Best regards

Peter De Berdt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs