<Bgsound src> Stop button

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Lyle Christine

Established Member
Impact
0
Is it possible to code a 'stop button' for a page that has a <bgsound source> playing a looped wav. file.

I know I could get an interface using <embed> but they look really tacky.

Thanks for your help.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
i had a script somewhere and it had a select box aking whether you wanted Music on or music off, when i say select box, it waslike..a drop down menu, ill try find the code foryou, if not, theres quite a few "mp3 player" php scripts about, il get one of them for you

Inf

okay, heres the code.......... just change where it says "MUSICTITLE.mp3" to the name and directory of the file you wanna play

and paste this code in your template wherever you want it to be

Code:
<script>
musi="MUSICTITLE.mp3"
<!--Don't edit from here on-->
function mus1()
{
if (t.options.selectedIndex==0){
mus.innerHTML="<embed src="+musi+" loop=-1>"
}
if (t.options.selectedIndex==1){
mus.innerHTML=""
}
}
document.write("<span id='mus' style='position:absolute;top:-90000'><embed src="+musi+" width=0 height=0 loop=-1></span>")
  </script>
  <select name="t" onchange=mus1()>
    <option>Enable background music
    <option>Disable background music
  </select>

hope this helps

Inf
 
Last edited:
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back