Hello all!
I'm making a game, and so far i'm only having trouble with the music.
And it crashes after I win and after it plays win.mid.
Any help is appreciated
.
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>
Any help is appreciated

Comment