Playing sounds is severely limited if things are as they were, you
almost have to embed a flash pixel that can play the sound, and it is
possible to trigger flash functions from JavaScript, or simpler yet,
the flash plays the sound once each time its embedded, so you can set
the flash embed style:display=none, then to style:display=block again,
and the sound should play again.  There use to be a way to make a body
background sound but its not going to be very reliable or ctrl-able
when it plays exactly until the sound is loaded, plus I don't think
its really supported or readily modifiable.

HTML5 Audio Tag for the win (maybe)
Otherwise you have to embed something and rely on a plugin

Theoretically appending one of these should do the trick, especially
if there is some easy way to replay or remove (like an onDonePlaying)
the element and attach it again, although not all controls are
documented here.

http://www.w3schools.com/tags/html5_audio.asp
Though you might have to require FF3.5, not sure exactly, its new to
me...

On Jul 20, 10:06 pm, Chong McBong <[email protected]> wrote:
> I am a n00b to greasemonkey, and i am not sure if this is possible,
> but what i need is a script that will play a sound when an image with
> a certain name pops up on a page.
>
> the page ishttp://apps.facebook.com/mousehunt/  (yes its a silly
> facebook game)
>
> the image that will trigger the sound is called "horn.gif"
>
> and the sound i need to trigger will be called "horn.wav" (or mp3 if
> that is easier)
>
> the horn image appears every 15 minutes, all i need is for a sound to
> be played -
> even a PC speaker "BEEP" would do...
>
> can anybody make a script for this or explain how i can write one?
>
> thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" 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/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to