Web Analytics Made Easy -
StatCounter music with JavaScript - CodingForum

Announcement

Collapse
No announcement yet.

music with JavaScript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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

    Comment


    • #3
      but the thing is... That it must be with JavaScript...

      Comment


      • #4
        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!

        Comment


        • #5
          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

          Comment


          • #6
            Thanks for the link

            Click here for a script that allows you to play a sound when the mouse moves over or clicks a link!


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

            If anyone has any ideas...



            Thanks again

            Comment


            • #7
              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!

              Comment


              • #8
                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!

                Comment


                • #9
                  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!

                  Comment

                  Working...
                  X