Click to See Complete Forum and Search --> : I want to do a mouseover animation AND Sound. Any ideas?


AAScudiero
05-12-2003, 02:44 PM
I'm having no luck figuring out how to add a sound rollover in addition to a graphics rollover.

Any ideas?

I thought it was just a simple task of adding my sound statement to the end of the onMouseover command but the results don't even show the swapped GIF.

For my soundfile I've got the <embed> tag set up as follows...
<!-- embed sound -->
<EMBED SRC="spin.wav" HIDDEN=TRUE AUTOSTART="false" MASTERSOUND NAME="soundfile">

I'm using Fireworks to create library files for Dreamweaver so I can easily drag and drop my rollover files onto the page. The swap image script appears at the top of the body, and the mouseover command is in the library item. Here is what one looks like.

<!-- #BeginLibraryItem "/library/about.lbi" --><a href="http://www.aaaudioarts.com/who.html" target="mainFrame" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('about','','about.gif',1)" ><img name="about" src="library/images/about.gif" width="100" height="20" border="0"></a><!-- #EndLibraryItem -->

Now I thought it would be easy to just add the following script to the end of the onMouseOver command after a ;. So it would look something like this...
onMouseOver="MM_swapImage('about','','about.gif',1);"javascript:document.soundfile.play()"

But this doesn't seem to work, or at least I may have copied something wrong. I'm going to try it again but if anybody could give me some help, I would appreciate it.

Tanks

Jona
05-12-2003, 02:50 PM
onMouseOver="MM_swapImage('about','','about.gif',1);document.soundfile.play()"