Web Analytics Made Easy -
StatCounter music script not working please help! more details inside - CodingForum

Announcement

Collapse
No announcement yet.

music script not working please help! more details inside

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • music script not working please help! more details inside

    Hello all!
    I'm making a game, and so far i'm only having trouble with the music.
    Code:
    <script>
    <!--
    // This is just the part of the code i'm having trouble with.
    function music() {
    document.write("<bgsound src='win2.mid' loop='-1'>")
    }
    function check() {
    if (HP4 <= 0){
    window.alert("You win!")
    document.write("<bgsound src='win.mid' loop='1'>")
    setTimeout('music()', 10000)
    } else {
    if (HP2 <= 0) {
    window.alert("You Lose.")
    document.write("<bgsound src='lose.mid' loop='1'>")
    } else {
    }
    }
    }
    //-->
    </script>
    And it crashes after I win and after it plays win.mid.
    Any help is appreciated.
    Last edited by plutoniumman; Feb 15, 2004, 07:32 PM.

  • #2
    I forgot to mention that there is more code, but that shouldnt conflict with any of the code in my other post.

    Comment

    Working...
    X