Hi. I'd like to know how to program a random music player that would work on any standard web browser. Here is the code I have so far:
Code:
<html>
<body>
<h2>NAME OF SONG</h2>
<object
height="50%"
width="50%"
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="AutoStart" value="0" />
<param name="FileName" value="URLtoSONG.wav" />
</object>
</body>
</html>
Now this is just basic HTML. I assume I need a Javascript, so this is what I need it to do:
1) I need it to work similar to the standard HTML code above as far as how user-friendly it is and how it is displayed.
2) I need either a random or sequential number within a range to be selected every time an external button (placed under the display, saying "Click here to change the song!") is clicked.
3) I need an "if" clause that aligns that range of numbers with URLs to different songs (which I will provide later), and then assigns them to the "FileName" value in the code above.
4) I also need the range of numbers to be assigned to the names of the songs, which will display in a label above the display.
5) If at all possible, it would also be cool if there can be a checkbox stuck next to the display that says "Autoplay?", and when checked, it would assign "AutoStart" value to "1", and when unchecked, it would assign that same value to "0".
Can anyone help me out with this? I've been wondering how to do this for quite some time. I've accomplished it in Visual Basic, but I have absolutely no experience with Javascript, and I haven't done any Visual Basic work at all for over 2 years.