View Full Version : website music w/ start & stop button


salomeyasobko
02-19-2004, 11:05 PM
this question gets asked a lot in the forum, so i've decided to post it in here :)

add these codes between the <body></body> tags:


<input type=button value="start" onClick="document.vid.DoPlay()" name="buttonstart">

<input type=button value="stop" onClick="document.vid.DoStop()" name="buttonstop">

<embed src="URL" hidden="true" align="baseline" border="0" width="1" height="1" name="vid" type="audio/x-pn-realaudio">



if you want to position the buttons and change the font/background of them, you need to use this code instead:


<input style= "position: absolute; left: #px; top: #px; font-family: font; color: #hexcode; background-color: #hexcode; border: 1 px solid #hexcode;" type=button value="start" onClick="document.vid.DoPlay()" name="buttonstart">

<input style= "position: absolute; left: #px; top: #px; font-family: font; color: #hexcode; background-color: #hexcode; border: 1 px normal #hexcode;" type=button value="stop" onClick="document.vid.DoStop()" name="buttonstop">

<embed src="URL" hidden="true" align="baseline" border="0" width="1" height="1" name="vid" type="audio/x-pn-realaudio"><br>



by the way, in order for this code to work, your song file must be .rm
if yours isn't, you can make it a .rm file using real producer. a free download is available here (http://forms.real.com/rnforms/products/tools/producerbasic/index.html?key=QY92F1077239250).

salomeyasobko
02-20-2004, 01:13 AM
okay, so people have told me that it's not completely necessary to use a .rm file, so i guess it's not :D but if the code doesn't work for you, that's probably why :)

keishafan
03-16-2004, 04:16 PM
is there any way i could make the music start playng automaticly when you enter the page?

also, is there a way to change the look of it?

and am I able to add 2 or more tracks, so that when 1 finishes, there starts new?

nesianmysticfan
04-08-2004, 04:01 AM
<embed src="URL" hidden="true" align="baseline" border="0" width="1" height="1" name="vid" type="audio/x-pn-realaudio"><br>
You don't need the type="audio/x-pn-realaudio" part as thats what makes it only use a .rm I think. You could probably just have
<embed src="music url" hidden="true"> for it.