pilsjart
06-24-2002, 05:42 PM
Hello there...
Well, I need to play music (*.mp3 and *.wav) using JavaScript I tried with
OnMouseOver="document.embeds[0].play()"
(assuming I embeded the music file).
This script works for some IE 5, some say that the object doesn't have the property or function "play()".
With N4 I couldn't make it work, not even using their tutorial instructions: i.e. play({true/false or number}, [URL]).
Can anyone help me? Even if the user gets the message "to play the music you'll need this plugin or/and enable that option"
for at least IE5 and N6
--THANK YOU VERY MUCH---
whackaxe
06-24-2002, 05:46 PM
if you are making a menu, it woudl be better to do it in flash but youll have to get it first :p
pilsjart
06-24-2002, 05:50 PM
but the thing is... That it must be with JavaScript...
Flamerule
06-24-2002, 05:52 PM
Here (http://www.javascriptkit.com/script/script2/soundlink.shtml) is a script which shows you how to do that. It claims to be NS compatible as long as you have the LiveAudio plugin (???)
Well flash would be the best alternative but not everyone can *cough*afford*cough* it :D
whackaxe
06-24-2002, 05:55 PM
i think www.javascriptkit.com should have what you need. or you could get a java appelet but i have never tried those (and dont plan to)
pilsjart
06-24-2002, 10:52 PM
Thanks for the link
www.javascriptkit.com/script/script2/soundlink.shtml
It is very helpfull, though... it doesn't work with NS6.
If anyone has any ideas...
Thanks again
Flamerule
06-25-2002, 07:35 AM
forget about NS?
Well, seriously, Sounds IMO are really annoying to use with Javascript, it slows down the page a lot and complicated to be cross browser compatible...
tommyf
06-26-2002, 10:25 AM
The music script provided is very useful! Thanks!
I was wondering how to do two different modifications to this script:
1) Provide a toggle to turn the music on and off.
2) If a user turns the music off (or back on) on one page, then navigates to another page on the same site, what's the best way to have the user's last selected music play choice (i.e. off or on) take effect on the new page. Does this get into cookies? Or is there an easier way to track this?
Thanks!
tommyf
06-26-2002, 10:36 AM
Was trying to respond to a different thread about playing background music...the referenced script is not in this thread. However, if you've got ideas on my previous post, let me know!