kasanay
03-30-2003, 09:31 PM
Hi,
I would like to add a sound effect to my rollover - so that the viewer will see the image swap and hear the wav file at the same time. (OnMouseover)
Thanks for any help (I'm a newbie)
ionsurge
03-31-2003, 10:09 AM
This is relatively simple when you use Flash, if you have that at hand I would suggest that you use it, because it will do that very very easily and quickly.
You may have noticed, I am not a Java whizzard, so I can't say much about the OnMouseover event, in that I have never come across something that would allow this - nevertheless I am not saying that it will not work.
I hope that helps,
Have fun!
:thumbsup:
Mhtml
03-31-2003, 02:16 PM
So which will it be?
Flash =
1.Create a button, right click and edit
2.Select over (I think that's the label been to long out of flash)
3.Import your wav sound
4.Drag the wav file from the library (ctrl+L to show library) onto the over label.
5.Praise me as your god. ;)
Javascript =
Ionsurge ships this off to the javascript programming forum ;)
redhead
03-31-2003, 03:27 PM
javascript kit saves the day again... (http://javascriptkit.com/script/script2/soundlink.shtml) :)
Mhtml
03-31-2003, 03:28 PM
lol, jsk has a habit of doing that :)
mattover-matter
03-31-2003, 09:11 PM
is that really the smallest way? those sites have a way to extend a script to make it easy....
how bout
onmouseover="sound('sound')"
lol
kasanay
03-31-2003, 11:34 PM
Hey, thanks for the help but I still dont get it!
I don't know anything about Flash. Maybe I'll learn - but not right now.
Again, I would like to hear the sound AND see the rollover at the same time.
Also, I am new at this so be easy on me.
Thanks again,
ionsurge
04-01-2003, 10:47 AM
So do you want to use Flash or JavaScript to do it?
Mhtml
04-01-2003, 11:45 AM
Well red posted a link to an example a few posts up!
But I recall you wanted a mouseover as well. So I'll try to help you :).
Firstly what sort of mouseover? Eg; Image rollover or background color rollover?
kasanay
04-01-2003, 10:10 PM
Hey, thanks for all your help so far!
I guess you would call mine an "Image rollover".
I use a routine to pre-load the images and then, the second image replaces the first when the mouse pointer passes over the image.
I got that part working ok, I would just like to add sound to it So the same mouseove would trigger an image swap AND play a small wav file and the same time.
Thanks Again!
Mhtml
04-02-2003, 06:56 AM
Ok, well you would be calling your rollover image script by something like: onMouseOver="rollimg()" onMouseOut="unRoll()" as an example.
So if you use the script that redhead posted a few posts up you can call it like;
onMouseOver="playSound(0);rollimg()" onMouseOut="stopSound(0);unRoll()"
And just replace rollimg() and unRoll() with the rollover function names making sure to leave the playSound(); and stopSound(); intact.
kasanay
04-03-2003, 01:30 AM
GREAT!!!
That was too eazy! I got it working now.
Thanks again
pharbisina
02-04-2011, 06:55 PM
Could someone give me some help, pls?
I am running EZ Generator and have found the "add custom event" function for an image.
I have tried the coding listed previously in this thread but have had no luck.
I am guessing the problem is the syntax of the sound file itself as well as where does the original WAV file need to reside in the site's directory.
Any help would be greatly appreciated.