Music on/off button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gaffer

    Music on/off button

    Is it possible to change the following code so that the music is 'off' when
    the page is loaded and the user gets the option to turn it on?



    ---------------------------------------------------
    <script language="JavaS cript"><!--
    function musicOff() {
    document.midi.s top()
    }function musicOn() {
    document.midi.p lay()
    }


    function changeButton() {
    if (document.onoff .B1.value=='Tur n music off') {
    document.onoff. B1.value='Turn music on';
    musicOff()
    }
    else {
    document.onoff. B1.value='Turn music off';
    musicOn()
    }
    }
    //-->
    </script><embed name="midi" src="psychotune .mp3" width="95" height="95"
    hidden>
    <form name="onoff">
    <input type="button" value="Turn music off" name="B1"
    onClick="change Button()" style="color: #000000; background-color: #FFFFFF;
    font-family: Tahoma; font-size: 10pt">
    </form>

    ---------------------------------------------------


    --
    Gaffer


  • Randy Webb

    #2
    Re: Music on/off button

    Gaffer said the following on 9/18/2005 8:31 AM:
    [color=blue]
    > Is it possible to change the following code so that the music is 'off' when
    > the page is loaded and the user gets the option to turn it on?[/color]

    <--snip-->
    [color=blue]
    > <embed name="midi" src="psychotune .mp3" width="95" height="95"
    > hidden>[/color]

    autostart="fals e"

    alt.html and comp.info.www.authoring.html are that way ======>

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

    Comment

    Working...