View Full Version : RollOver with sound
kasanay
03-30-2003, 10: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, 11: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, 03: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, 04:27 PM
javascript kit saves the day again... (http://javascriptkit.com/script/script2/soundlink.shtml) :)
Mhtml
03-31-2003, 04:28 PM
lol, jsk has a habit of doing that :)
mattover-matter
03-31-2003, 10: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
04-01-2003, 12:34 AM
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, 11:47 AM
So do you want to use Flash or JavaScript to do it?
kasanay
04-01-2003, 12:41 PM
Java please
Mhtml
04-01-2003, 12:45 PM
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, 11: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, 07: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, 02:30 AM
GREAT!!!
That was too eazy! I got it working now.
Thanks again
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.