Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
Web General Discussion
Object with sound|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Working Mechanic |
I use Site Spinner and was wondering if there is any way to have an Object linked to a sound file. I have a page that is linked to a sound file but I would like an Object on a different page to have sound?
|
||
|
VM Staff![]() |
Hi Dane,
It depends what it is you are trying to do. You can create a mouse-over for a sound, but then the sound will play until it is finished. To do that you would create a mouse-over effect from the image to the sound object (use the Foreign Object Editor to create the sound object). This will work for a sound effect, such as a button click. - Derry |
|||
|
Guru 'Power' Mechanic![]() |
There are examples of mouseovers causing sounds here: http://www.wiley4.net/Test/scene2.htm
Great graphics too - thanks to Wiley Cheers Bruceee |
|||
|
|
Working Mechanic |
First - Derry, thank you. What you have indicated works very welll for me.
Second - Bruceee, that link you provided is totally awesome. I have tried to create a simillar page, where I have music starting automatically and also have an object trigger a sound file. What happens is the sound file overides the background music, not sure how to get around this. |
|||
|
VM Staff![]() |
Hi Dane,
You can only have one 'type' of sound play at a time. So, if you have a midi file, you can also have a wav file for a sound effect, but you could not have 2 midi files playing at the same time, or two wav file, etc. - Derry |
|||
|
Guru 'Power' Mechanic![]() |
Ok guys, I'm missing something here. Can't get the sound effect to work on a mouseover. I'm running IE6 in case that is relevant.
I put a .wav file into a foreign object (set Format to Sound/Music) as Derry outlined I can get the sound to play when my page is loaded, and also when I click 'play' on the embedded media player However I can't get the mouseover (from Special FX) to work - the closest I can get is to show or hide the media player - but no sound. Mouseovers from Special FX seem to be confined to displaying or hiding objects - nothing about playing sounds or loading files. Even had a look in the help file - now there's a sign of desperation! However, Dane has got it to work, and seemingly quite quickly too. What am I missing? |
|||
|
|
Working Mechanic |
Bruceee, what I did was to configure an object that when the mouse was over it, the embedded media player would then appear. When it appears the sound starts automatically.
|
|||
|
VM Staff![]() |
Hi Bruceee,
Dane nailed it. Does that not work for you? - Derry |
|||
|
Guru 'Power' Mechanic![]() |
Er, no, it doesn't.
Thank you Dane and Derry - at least I now know I'm on the right track. For me the sound plays once automatically on page load, then will not play again. The mouseover consistently pops up the media player, but just as consistently, there is no sound. The media player slider does not move either. I'm using XP Home Edition and IE6 with all the latest Microsoft patches (including media player) Tried also on a laptop running XP Office Edition and IE6, but not with all the latest patches. Similar situation. Similar situation with Netscape 7.1 For anybody wanting to recreate this, here are the steps I used: 1. Start a new project 2. Place a default rectangle on the workpage (obj1) 3. Place a foreign object on the workpage (obj2) 4. Change the foreign object defaults: 5. Preview to make sure the embedded media player plays the file 6. Set a mouseover on the rectangle to display the media player: 7. Preview again If anybody tries this, I'd be interested to know if it works (ie does it play the .wav file when you mouse over the rectangle?), and what OS you are using? Cheers Bruceee |
|||
|
VM Staff![]() |
Hi Bruceee,
Well, turns out I was mistaken. You can do that above, but it will only work once. If you want to have the functionality you want, that is, mouse over triggers a sound each time the user moves the mouse over the object, then you would need to use Web Engine for that. Sorry for the misinformation. - Derry |
|||
|
Guru 'Power' Mechanic![]() |
Hi Derry
No problem. Glad to know I'm not going mad after all. When you have as many posts as you have (1868 - wow!) you're entitled to feed in a little misinformation now and then. We shouldn't believe everything we read anyway I still think it is possible to make a mouseover sound effect with SS and a bit of code. Just a question of which bit of code - when I find out, I'll report back here... Cheers Bruceee |
|||
|
Guru 'Power' Mechanic![]() |
As a followup, here are some ways to produce sounds on mouseovers with SiteSpinner. These methods work only with recent versions of Internet Explorer - IE4 (I think) or better.
Let's start with the simplest. This is the technique Wiley used, mentioned above Mouseover text Place the following code object on your page. Change the name of the sound file and mouseover text to suit your needs. <BGSOUND SRC="#" ID="sound1" AUTOSTART="TRUE"> <A HREF=javascript:void("") onmouseover="document.all.sound1.src='sounds/click.wav'"> mouseover text</A> Mouseover image Let's extend the above so that you mouse over an image to produce the sound effect. Again change the name of the sound file and image file to suit your needs. Also, adjust the width and height (I used 108 here) to suit your image. <BGSOUND SRC="#" ID="sound2" AUTOSTART="TRUE"> <A HREF=javascript:void("") onmouseover="document.all.sound2.src='sounds/click.wav'"> <img SRC="images/myimage.gif" border=0 width=108 height=108></A> Mouseover any Object This modification allows you to mouse over any object. It consists of two steps: <BGSOUND SRC="#" ID="sound" AUTOSTART="TRUE"> Link Type -blank- Select or Enter the URL to link to: javascript:void('')"onmouseover="document.all.sound.src='sounds/click.wav'" Final Thoughts The last effect is the one I prefer: You can use these sounds with the usual inbuilt SiteSpinner mouseover effects - there does not seem to be any interference. I've assembled a demonstration (IE users only) which also gives more details. There is also a way to make a sound when you use a pop up window. See Bruceee's Sandpit. Have fun [Edit: Updated link] This message has been edited. Last edited by: Bruceee, |
|||
|
VM Staff![]() |
Very cool. Thanks for info, we may point to it from the Audio FAQ.
- Derry |
|||
|
|
Working Mechanic |
Bruceee,(and others please)
I am still working to get mouseover clicks. For the benefit of others, can you see what I'm doing wrong. Here's what I'm doing. - I have navigation tabs that are black. When mouseover they turn brown. Using Special FX --> mouse effects. I have 2 images right on top of each other. When mouse is over black tab, top image disappears exposing the bottom brown tab image. Bottom image has link to another page. I tried with both top and bottom image, I right moused clicked on image and edit link to: Link Type -blank- Select or Enter the URL to link to: javascript:void('')"onmouseover="document.all.sound.src='click.wav'" then added click.wav to root folder next to index.html then clicked on "code" button on left and inserted: <BGSOUND SRC="#" ID="sound" AUTOSTART="TRUE"> and just left the box sitting in the middle of page. Published page and still no click sounds. Am I even close?
|
|||
|
|
Working Mechanic |
Wonder if anyone got these sound events to work with other browsers yet??
Just curious |
|||
|
Guru 'Power' Mechanic![]() |
You must be. I cut and pasted the code as you quoted it in the top part of your post and that worked for me. Some things you may not have done: page2.html"onmouseover="document.all.sound.src='click.wav'" Change the page2.html part to be the name of the page you want to link to. If you still have no luck, can you post a link to the problem page? These sound effects rely on the BGSOUND tag which is an IE special. It is "deprecated" which means that there is no guarantee that even IE7 will support it in the future. So the question boils down to: what is the replacement for the "BGSOUND" tag? |
|||
|
|
Working Mechanic |
On the "edit link" dialog box, can we enter multiple entries? ie - _______________________________ edit link to: Link Type -blank- Select or Enter the URL to link to: javascript:void('')"onmouseover="document.all.sound.src='click.wav'" --AND-- edit link to: Link Type -page- Select or Enter the URL to link to: index ______________________________________________ basically take care of click and direction together? |
|||
|
|
Working Mechanic |
So I tried putting 2 values into edit link and it doesn't work for me. So I did what Bruceee said above and it works perfectly.
____________________ index.html"onmouseover="document.all.sound.src='click.wav'" ____________________ Now if anyone can figure out a BGSOUND that works across more browsers, that would be great. |
|||
|
|
Working Mechanic |
Now that I got mouseover click sounds to work, it's become to noisey.
Can I convert the buttons so they only make a click sound when clicking on the button with the mouse. Is there a mouseclick function instead of mouseover? |
|||
|
Guru 'Power' Mechanic![]() |
There are onmouseclick and onmouseup events, neither of which work here. But onmousedown should do what you want:
index.html"onmousedown="document.all.sound.src='click.wav'" Another option would be to find or make a quieter sound file. Also, IE6 (at least mine does!) already makes a soft click sound when you click on a link. |
|||
|
| Powered by Social Strata | Page 1 2 |
| Please Wait. Your request is being processed... |
|

