Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    music with JavaScript

    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---

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you are making a menu, it woudl be better to do it in flash but youll have to get it first
    photoshop too expensive? use the GIMP! www.gimp.org

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but the thing is... That it must be with JavaScript...

  • #4
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here 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
    I don't suffer from insanity, I enjoy every single minute of it!

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)
    photoshop too expensive? use the GIMP! www.gimp.org

  • #6
    New Coder
    Join Date
    Jun 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the link

    http://www.javascriptkit.com/script/...oundlink.shtml

    It is very helpfull, though... it doesn't work with NS6.

    If anyone has any ideas...



    Thanks again

  • #7
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    I don't suffer from insanity, I enjoy every single minute of it!

  • #8
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Santa Monica, CA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to modify provided music script?

    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!

  • #9
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Santa Monica, CA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorry about my prev post...wrong thread!

    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •