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 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2003
    Location
    SD, CaLi
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    music script? help

    this is the script i use on my site www.jpdm.vze.com... and everyone says it doesnt work... even though i could hear it just fine(my cookies maybe?)

    plz help !

    <SCRIPT language=JavaScript type=text/javascript>
    <!--
    my_song=new Array()
    my_song[1]="music/one.wma" // first
    my_song[2]="music/two.wma" // second
    my_song[3]="music/three.wma" // third

    function preview(n){
    document.all.track.src=my_song[n]
    }

    function Stop(){
    document.all.track.src =""
    }
    // -->
    </script>

    <BGSOUND SRC="" ID="track" VOLUME="0">
    <form>

    <p align="left">

    <br>

    <input type="image" src="images/1.gif" onclick="preview(0);return false" onload="preview(1)" value="Play 1" name="1" width="27" height="16">
    <input type="image" src="images/2.gif" onclick="preview(1);return false" value="Play 2" name="2" width="27" height="16">
    <input type="image" src="images/3.gif" onclick="preview(2);return false" value="Play 3" name="3" width="27" height="16">
    <input type="image" src="images/4.gif" onclick="Stop();return false" value="Stop" name="4" width="27" height="16">
    </p>
    </form>
    www.jpdm.vze.com
    €([-=JpDm=-])

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    I noticed you are using that script on this page http://www.freewebs.com/jpdm/music.html
    It wont play right away because those files for the songs being played, are large so It takes forever to download the file before it will play (it took me about 3 and a half minutes to download that girl.wma seperatly to play in , even on dsl (with about 1.3 mbps speed)). The servers for that site seem to be overloaded (well it is a free service). You might try making the files smaller by using lower sampling rates. Its proboly working on your machine because those files have already been cached to your system, so they dont have to be downloaded.

    ALSO! you need to offset your array for your list of songs by -1, you are starting at 1, when the first button plays 0 which is undifined (so only buttons 2 and 3 do anything).

    the volume="0" is unesisary.

    note** that script you have there will only work for internet explorer, and equivalent browsers (not netscape).
    Last edited by kwhubby; 09-25-2003 at 11:41 PM.
    Kris Hubby
    kwhubby site

  • #3
    New Coder
    Join Date
    Feb 2003
    Location
    SD, CaLi
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    aw.. thx

    is there any other way to get the music to work?
    like putting on a different server or something =\

    or some different code to use... i dunno
    €([-=JpDm=-])

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    puting on a differnt server might help, but id recomend compressing the audio more, even tho it might not sound really high quality, it would work
    Kris Hubby
    kwhubby site

  • #5
    New Coder
    Join Date
    Feb 2003
    Location
    SD, CaLi
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    cool...

    i got it down to about 500k (it was around 1meg earlier )
    €([-=JpDm=-])


  •  

    Posting Permissions

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