|
Posted by cwdjrxyz on 06/21/06 20:46
Kryss wrote:
> I am trying to create a mouse over with a static gif, an animated gif
> and a wav or mp3
> per my clients request
>
> I can get te image mouseover, but not the sound.
>
> http://thewargame.com/working/game.htm
>
> Any suggestions are appreciated. At the moment i simply have the mouse
> over image up without the sound
> Regards,
> Kryss
>
> PS oh and it would be nice to be cross browser compliant (those are his
> words)
You can get an image or text onMouseOver for sound for the WMP on
browsers that support ActiveX for the WMP, This means IE browsers and
close relatives with the WMP installed, but not the Mozilla
family(recent Mozilla, Firefox, Netscape) unless they have added a
special third party ActiveX plugin for their browser. Here is an
example at http://www.cwdjr.net/rootold/soundscript.html . It has both
a onMouseOver and link to another page for text, an image, and a tiny
hotspot(period) just under the animated frog. In this case the sound is
selected at random from an array of 11 different wav and midi files.
You likely also could use mp3 and possibly wma. The important thing is
that this method does no harm if you are on a browser that does not
support it - you just do not hear the sound. I dug this up from some
old backups of mine, and the code is old. However it at least validates
as W3C html 4.01 transitional and CSS. You will most likely need to
change the code for a fixed sound URL for each hot image rather than
using the random one on my page. Sorry, but this is the best I have at
hand at the moment. If there is a method that is general for all common
browsers and all common sound players, I have not seen it. But then I
have not researched this subject in a long time.
Navigation:
[Reply to this message]
|